Skip to content

Commit 9e88f16

Browse files
committed
Add new flags and additional compilers
1 parent b0cdf4b commit 9e88f16

File tree

1 file changed

+35
-6
lines changed

1 file changed

+35
-6
lines changed

.github/workflows/testing.yml

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ jobs:
3434
include:
3535
- os: ubuntu-latest
3636
build: debug
37-
# python-version: 3.8
38-
# toolchain: {compiler: gcc, version: 14}
37+
toolchain: {compiler: intel, version: '2025.0'}
3938
- os: macos-latest
4039
toolchain: {compiler: gcc, version: 15}
40+
- os: macos-latest
41+
build: debug
42+
toolchain: {compiler: gcc, version: 15}
4143
exclude:
4244
- os: macos-latest
4345
toolchain: {compiler: intel, version: '2025.0'} # Intel not available on macOS runners
@@ -88,15 +90,23 @@ jobs:
8890
run: |
8991
if [ "${{ matrix.toolchain.compiler }}" = "gcc" ]; then
9092
if [ "${{ matrix.build }}" = "debug" ]; then
91-
export FFLAGS="-g -O0 -fcheck=all -fbacktrace"
93+
export FFLAGS="-O0 -g -fcheck=all -fbacktrace -fbounds-check -ffpe-trap=invalid,zero,overflow -finit-real=nan -finit-integer=nan -Wall -Wunderflow -Wextra -Wconversion -Wuninitialized -Warray-bounds -Wshadow -Wno-unused-function -Wno-unused-variable -Wno-unused-parameter -Wno-unused-label -Wno-unused-but-set-variable"
9294
export OMP_NUM_THREADS=1
9395
elif [ "${{ matrix.build }}" = "optimized" ]; then
94-
export FFLAGS="-O1 -fopenmp"
96+
export FFLAGS="-O1 -fopenmp -funroll-loops -finline-functions -ftree-vectorize -fstack-protector-strong -flto -march=native"
9597
export OMP_NUM_THREADS=2
9698
else
9799
echo "Unknown build type: ${{ matrix.build }}"
98100
exit 1
99101
fi
102+
elif [ "${{ matrix.toolchain.compiler }}" = "intel-classic" ]; then
103+
if [ "${{ matrix.build }}" = "debug" ]; then
104+
export FFLAGS="-O0 -debug all -check all -warn all,nodec,interfaces -gen_interfaces -traceback -fpe0 -ftrapuv -init=snan,arrays -check bounds"
105+
export OMP_NUM_THREADS=1
106+
elif [ "${{ matrix.build }}" = "optimized" ]; then
107+
export FFLAGS="-O -qopenmp -unroll -finline-functions -inline-forceinline -ipo -ip "
108+
export OMP_NUM_THREADS=2
109+
fi
100110
elif [ "${{ matrix.toolchain.compiler }}" = "intel" ]; then
101111
if [ "${{ matrix.build }}" = "debug" ]; then
102112
export FFLAGS="-g -O0 -check all -traceback"
@@ -108,13 +118,32 @@ jobs:
108118
echo "Unknown build type: ${{ matrix.build }}"
109119
exit 1
110120
fi
111-
elif [ "${{ matrix.toolchain.compiler }}" = "intel-classic" ]; then
121+
elif [ "${{ matrix.toolchain.compiler }}" = "nvidia-hpc" ]; then
122+
echo "nvidia-hpc compiler not yet supported"
123+
exit 1
112124
if [ "${{ matrix.build }}" = "debug" ]; then
113125
export FFLAGS="-g -O0 -check all -traceback"
114126
export OMP_NUM_THREADS=1
115127
elif [ "${{ matrix.build }}" = "optimized" ]; then
116-
export FFLAGS="-O1 -openmp"
128+
export FFLAGS="-O1 -qopenmp"
117129
export OMP_NUM_THREADS=2
130+
else
131+
echo "Unknown build type: ${{ matrix.build }}"
132+
exit 1
133+
fi
134+
elif [ "${{ matrix.toolchain.compiler }}" = "lfortran" ]; then
135+
echo "lfortran compiler not yet supported"
136+
exit 1
137+
if [ "${{ matrix.build }}" = "debug" ]; then
138+
export FFLAGS=""
139+
export OMP_NUM_THREADS=1
140+
elif [ "${{ matrix.build }}" = "optimized" ]; then
141+
export FFLAGS=""
142+
export OMP_NUM_THREADS=2
143+
else
144+
echo "Unknown build type: ${{ matrix.build }}"
145+
exit 1
146+
fi
118147
else
119148
echo "Unknown compiler: ${{ matrix.toolchain.compiler }}"
120149
exit 1

0 commit comments

Comments
 (0)