Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seg Fault in 4.0.2 when compiling with GNU #20

Closed
jdha opened this issue Apr 20, 2023 · 1 comment
Closed

Seg Fault in 4.0.2 when compiling with GNU #20

jdha opened this issue Apr 20, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jdha
Copy link
Contributor

jdha commented Apr 20, 2023

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 jdha added the bug Something isn't working label Apr 20, 2023
@jdha jdha self-assigned this Apr 20, 2023
@jdha
Copy link
Contributor Author

jdha commented Apr 20, 2023

Once patch applied check:

  • code compiles and runs with GNU
  • code still compiles and runs with Cray
  • addition of ar5 diagnostics works as before

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant