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

Array elevclass_o in mksurfdata_esmf/src/mkglcmecMod.F90 is not allocated before use. #2802

Closed
olyson opened this issue Sep 30, 2024 · 3 comments · Fixed by #2829
Closed
Assignees
Labels
bug something is working incorrectly done Issues whose closing PR is done but not yet merged (pending test re-run ok) test: mksurfdata Test mksurfdata_esmf before merging

Comments

@olyson
Copy link
Contributor

olyson commented Sep 30, 2024

Brief summary of bug

Allocatable array elevclass_o in mksurfdata_esmf/src/mkglcmecMod.F90 is not allocated before use.
I'm not clear though whether this statement effectively accomplishes that:

    elevclass_o(:) = elevclass(:)

General bug information

CTSM version you are using: ctsm5.3.0

Does this bug cause significantly incorrect results in the model's science? Unknown

Configurations affected: Surface dataset creation.

Details of bug

Reported by Yuan Sun (https://bb.cgd.ucar.edu/cesm/threads/mksurfdata_esmf-done-around-glcmec.9624/#post-57405)

@slevis-lmwg
Copy link
Contributor

Testing on derecho:
PASS qsub mksurfdata_jobscript_single_2000.sh so as to compare today's output to that generated yesterday, now in /glade/derecho/scratch/slevis/temp_work/new_rawdata/tools/mksurfdata_esmf/bkup_T42
PASS ./run_ctsm_py_tests -s and ./run_ctsm_py_tests -u
PASS make black and make lint
PASS build-namelist_test.pl
IN PROGRESS aux_clm

@ekluzek
Copy link
Collaborator

ekluzek commented Sep 30, 2024

Yes, my inspection shows this as a problem as well. It's an allocatable array that's neither allocated nor deallocated and hence a problem. Although the other thing is that it never seems to be used either. So the intel compiler on Derecho must be optimizing that bit of code out. And other compilers and/or maybe with lower optimization levels leave it in and have trouble when they get to it.

So yes something we should fix.

@YuanSun-UoM
Copy link

Yes, in my case, the current code works with openmpi but fails when using mpich.

@slevis-lmwg slevis-lmwg moved this from In Progress to Done in LMWG: Sprint Planning Board Oct 1, 2024
@samsrabin samsrabin added test: mksurfdata Test mksurfdata_esmf before merging and removed support tools only labels Oct 3, 2024
@slevis-lmwg slevis-lmwg added the done Issues whose closing PR is done but not yet merged (pending test re-run ok) label Oct 7, 2024
@samsrabin samsrabin linked a pull request Oct 11, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something is working incorrectly done Issues whose closing PR is done but not yet merged (pending test re-run ok) test: mksurfdata Test mksurfdata_esmf before merging
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants