gnu.mk file OPENMP, Undefined reference to `omp_get_ ...
The mk_make script builds with:
(cd exec/${CONFIG}_${COMPILER} ; make -j 8 OPENMP=Y NETCDF=3 ${COMP} AVX=${AVX} ${BIT} NCEPLIBS="${NCEPLIBS}" -f Makefile_fv3)
which indicates the use of OPENMP=Y. However in the gnu.mk template file https://github.com/NOAA-GFDL/SHiELD_build/blob/main/site/gnu.mk it has the openmp flag commented out, for example: FFLAGS_OPENMP = #-fopenmp at: https://github.com/NOAA-GFDL/SHiELD_build/blob/d6581a4610adf3961bb987061358bed1f40a80de/site/gnu.mk#L51 https://github.com/NOAA-GFDL/SHiELD_build/blob/d6581a4610adf3961bb987061358bed1f40a80de/site/gnu.mk#L58 https://github.com/NOAA-GFDL/SHiELD_build/blob/d6581a4610adf3961bb987061358bed1f40a80de/site/gnu.mk#L67
This causes a series of compile-time errors of the type omp_get_ ...
At the moment I'm changing this using:
sed "s/#-fopenmp/-fopenmp/g" < ${BUILD_ROOT}/${TEMPLATE} > OUT \
&& mv OUT ${BUILD_ROOT}/${TEMPLATE}
and the model seems to compile successfully.
Is there a reason for removing the openmp flags?