Skip to content

Commit 32adf1c

Browse files
committed
build(demo/setup): add assertions, OpenMP
1 parent a55c086 commit 32adf1c

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

demo/setup.sh

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,25 @@ if [[ -z ${LC_RPATH:-} ]]; then
5959
exit 1
6060
fi
6161

62-
if [[ -z ${HDF5_LIB_PATH:-} ]]; then
63-
printf "Please set HDF5_LIB_PATH to the HDF5 library path and restart this script.\n\n"
62+
missing_prereq=false
63+
64+
if [[ -z ${HDF5_LIB_PATH:-} ]]; then
65+
printf "Please set HDF5_LIB_PATH to the HDF5 library path and restart this script.\n"
6466
printf "If Homebrew installed HDF5, try the following: export HDF5_LIB_PATH=\"\`brew --prefix hdf5\`/lib\"\n\n"
65-
exit 1
67+
missing_prereq=true
6668
fi
6769
if [[ -z ${NETCDF_LIB_PATH:-} ]]; then
68-
printf "Please set NETCDF_LIB_PATH to the NetCDF library path and restart this script.\n\n"
70+
printf "Please set NETCDF_LIB_PATH to the NetCDF library path and restart this script.\n"
6971
printf "If Homebrew installed NetCDF, try the following: export NETCDF_LIB_PATH=\"\`brew --prefix netcdf\`/lib\"\n\n"
70-
exit 1
72+
missing_prereq=true
7173
fi
7274
if [[ -z ${NETCDFF_LIB_PATH:-} ]]; then
73-
printf "Please set NETCDFF_LIB_PATH to the NetCDF-Fortran library path and restart this script.\n\n"
75+
printf "Please set NETCDFF_LIB_PATH to the NetCDF-Fortran library path and restart this script.\n"
7476
printf "If Homebrew installed NetCDF-Fortran, try the following: export NETCDFF_LIB_PATH=\"\`brew --prefix netcdf-fortran\`/lib\"\n\n"
77+
missing_prereq=true
78+
fi
79+
80+
if $missing_prereq; then
7581
exit 1
7682
fi
7783

@@ -142,7 +148,8 @@ echo "--compiler \"`pkg-config fiats --variable=FIATS_FPM_FC`\" \\" >> $RU
142148
if [[ ! -z ${FPM_RUNNER:-} ]]; then
143149
echo "--runner \"`pkg-config fiats --variable=FIATS_FPM_RUNNER`\" \\" >> $RUN_FPM_SH
144150
fi
145-
echo "--flag \"-cpp -O3 `pkg-config fiats --variable=FIATS_FPM_FLAG`\" \\">> $RUN_FPM_SH
151+
152+
echo "--flag \"-cpp -O3 -DASSERTIONS -fopenmp -fdo-concurrent-to-openmp=host `pkg-config fiats --variable=FIATS_FPM_FLAG`\" \\">> $RUN_FPM_SH
146153
echo "--link-flag \"`pkg-config fiats --variable=FIATS_FPM_LD_FLAG`\" \\" >> $RUN_FPM_SH
147154
echo "\$program_arguments" >> $RUN_FPM_SH
148155
chmod u+x $RUN_FPM_SH

0 commit comments

Comments
 (0)