Compiling CROCO with flang in Lenovo ThinkSystem SR645 V3

Hi,

We (@sbahamondez and others) are having problems running CROCO in a new cluster with servers Lenovo ThinkSystem SR645 V3 (the CPU is AMD EPYC)

Compilation is done with flang

and when we try the Benguela default case it crashes with a segmentation fault. @sbahamondez noticed that before that it shows the following

hmin hmax grdmin grdmax Cu_min Cu_max
************************* 0.197007298E+01 0.200078392E+01244.41329956319.53134155
volume= NaN open_cross= 0.000000000000000000000E+00

   lonmin =  -0.00  lonmax = ******  latmin = ******  latmax = ******

so it migth not be reading the croco_grd.nc file correctly.

Anyone with experience using flang? Here is the current jobcomp we use

jobcomp_main.txt (11.5 KB)

Hi,
@AndresSepulveda @sbahamondez

can you please try this option in jobcomp. Please send me the >compilation-log.text
thinking this is floating-point calculations issues, may be small value imprecision that could lead to NaNs.

FFLAGS1=“-O2 -g -mcmodel=medium -march=znver3 -fno-omit-frame-pointer -ffp-contract=off -ftrapping-math -fimplicit-none -fcheck=bounds -frounding-mode=precise”

see what happens.

Best,
Subhadeep

Hi Subhadeep,

With the following options it complies

            FFLAGS1="-O2 -g -mcmodel=medium -march=znver3 -fno-omit-frame-pointer  -ffp-contract=off -ftrapping-math "

The other ones gave me an error at compilation time

lang-16: error: unknown argument: ‘-fimplicit-none’
clang-16: error: unknown argument: ‘-frounding-mode=precise’

But even when it compiles, the problem persists:

NUMBER OF THREADS: 1 BLOCKING: 1 x 1.

Spherical grid detected.

hmin hmax grdmin grdmax Cu_min Cu_max
************************* 0.197007298E+01 0.200078392E+01244.41329956319.53134155
volume= NaN open_cross= 0.000000000000000000000E+00

   lonmin =  -0.00  lonmax = ******  latmin = ******  latmax = ******

Vertical S-coordinate System:

level S-coord Cs-curve at_hmin over_slope at_hmax

32   0.0000000   0.0000000           0.000       0.000       0.000
31  -0.0312500  -0.0001015             Inf************        -Inf
30  -0.0625000  -0.0004108             Inf************        -Inf