JMMP-Group / CO_AMM7

AMM7 configuration for testing various vertical coordinate options
0 stars 2 forks source link

Seg Fault in 4.0.2 when compiling with GNU #20

Closed jdha closed 1 year ago

jdha commented 1 year ago

While the Cray compiler appears to work fine with the 4.0.2 code, when compiling with the GNU compiler the model fails with a Seg Fault relating to unallocated memory.

This issue arises in the AR5 diagnostics, when they are not selected! Which is a little odd - and probably worth investigating further.

Patch to fix in diaar5.F90:

87,88d86
<       IF(lwp) WRITE(numout,*) 'l_ar5 is ', l_ar5
<
98,103c96
<       ! JDHA: area is never allocated if l_ar5 is FALSE. Inserting IF
<       ! CALL iom_put( 'areacello', area(:,:) )
<       IF( l_ar5 ) THEN
<          CALL iom_put( 'areacello', area(:,:) )
<       ENDIF
<       ! JDHA: end inserting IF
---
>       CALL iom_put( 'areacello', area(:,:) )
jdha commented 1 year ago

Once patch applied check: