[MITgcm-devel] omp and OMPFLAG

Martin Losch Martin.Losch at awi.de
Tue Aug 8 06:02:17 EDT 2017


Hi,

I ran across a problem with omp and a cray compiler. Here’s the background:
(1) For a cray compiler, omp is defined by default, except for -O0 (no optimization, which is what we normally use when genmake2 is used with -ieee or when you run testreport (even without -devel).
(2) the order of flags matter, later flags override previous flags.
The consquence is, that if I want to run testreport I cannot use OpenMP, because the order of flags is
$FFLAGS (includes $OMPFLAG) $FOPTION (includes optimization flags): -homp … -O0
The latter will reset -homp to -hnoomp.
I could tweak the build_option file for a cray compiler, but wouldn’t it make more sense to add the OMPFLAG  to FOPTIM in genmake2 (even though it’s stricktly speaking not an optimization flag)?

Martin



More information about the MITgcm-devel mailing list