Gfortran Nemo + Drakkar + SI3 compilation

Hello. We have working configuration for the North Antlantic region with Drakkar + Nemo + SI3 compiled with Intel compilers on Intel CPU. We also run this configuration inside Docker container. We recently bought new machine with AMD processor and decided to go for GNU compilers… Problem number 1 was that namelists from intel compiled model were uncompatible. We had to put ‘’ around some strings in namelists in order to run compiled model. Next problem - numerous allocation and segmentation errors in runtime. For example -

double free or corruption (out)

Program received signal SIGABRT: Process abort signal.

Or like this:
Backtrace for this error:

#0 0x14610e090960 in ???

#1 0x14610e08fac5 in ???

#2 0x14610dc8351f in ???

#3 0x14610dcd7a7c in ???

#4 0x14610dc83475 in ???

#5 0x14610dc697f2 in ???

#6 0x14610dcca6f5 in ???

#7 0x14610dce1d7b in ???

#8 0x14610dce3ac3 in ???

#9 0x14610dce64d2 in ???

#10 0x5650a81cad37 in __zpshde_MOD_zps_hde

at /base/nemo/WBARKA12-AMD1/cfgs/BARKA12-AMD1/BLD/ppsrc/nemo/zpshde.f90:117

I used gfortran base arch from your repo… What will you recommend to try in order to debug this?

Will provide everything you need - just name it.
Our NEMO version is 4.0.6

Hello.
Very interesting that you try gfortran. What is your optimization flag? Have you compiled with O0?

FCFLAGS -fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer -ffree-line-length-none

Used it as a baseline, tried whole bunch of other flags, mostly debug. Yes, we tried -O0.

gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)

Hello

Yes i see. As far as i remember there were some out of bounds error in nemo which can be ignored by ifort compiler and i guess not by gfortran by default. did you try these flags:

sanitize=address
fcheck=bounds

Best

Saeed

Added these two flags. Something definetly changed, now I have segfault without backtrace and error in ocean.output.*.ABORT.