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

Remove unused variable elevclass_o in mkglcmecMod.F90 #2804

Merged
merged 3 commits into from
Oct 1, 2024

Conversation

slevis-lmwg
Copy link
Contributor

@slevis-lmwg slevis-lmwg commented Sep 30, 2024

Description of changes

User found that the mksurfdata_esmf tool fails on a certain computer with this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
and works when elevclass_o gets allocated before use in mkglcmecMod.F90.

Original post here:
https://bb.cgd.ucar.edu/cesm/threads/mksurfdata_esmf-done-around-glcmec.9624/post-57405

Specific notes

Contributors other than yourself, if any:
@olyson and @YuanSun-UoM

CTSM Issues Fixed (include github issue #):
Resolves #2802

Are answers expected to change (and if so in what way)?
No.

Any User Interface Changes (namelist or namelist defaults changes)?
No.

Does this create a need to change or add documentation? Did you do so?
No.

Testing performed, if any:
As posted in issue #2802, I'm 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

@slevis-lmwg
Copy link
Contributor Author

Now also started aux_clm on izumi.

Copy link
Collaborator

@ekluzek ekluzek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slevis-lmwg I actually recommend that you remove elevclass_o completly rather than allocate it. There seems to be no reason for it to exist.

In terms of testing I would make an f09 surface dataset and also run the MKSURFDATAESMF_P128x1.f10_f10_mg37.I1850Clm50BgcCrop.derecho_intel and compare it to the baseline. That's the only aux_clm test that's going to exercise this bit of code.

@slevis-lmwg
Copy link
Contributor Author

slevis-lmwg commented Sep 30, 2024

@ekluzek, thank you for noticing that the variable could be removed altogether.

  1. Removed the variable.
  2. Started ./create_test MKSURFDATAESMF_P128x1.f10_f10_mg37.I1850Clm50BgcCrop.derecho_intel -c /glade/campaign/cgd/tss/ctsm_baselines/ctsm5.3.002
  3. Rebuilt mksurfdata_esmf after removing the variable.
  4. Submitted qsub mksurfdata_jobscript_single_2000.sh this time pointing to crop-global-present_0.9x1.25.namelist which was used to generate the corresponding ctsm5.3.0 files.

@slevis-lmwg
Copy link
Contributor Author

The above tests passed, so this is ready.

@slevis-lmwg
Copy link
Contributor Author

@ekluzek thank you, I followed your suggestions and the tests pass. Let me know if you can think of anything else before approving.

@slevis-lmwg slevis-lmwg changed the title Allocate elevclass_o before use in mkglcmecMod.F90 Remove unused variable elevclass_o in mkglcmecMod.F90 Oct 1, 2024
@slevis-lmwg slevis-lmwg added the PR status: ready PR: this is ready to merge in, with all tests satisfactory and reviews complete label Oct 1, 2024
@slevis-lmwg slevis-lmwg merged commit ca4caa7 into ESCOMP:b4b-dev Oct 1, 2024
2 checks passed
@slevis-lmwg slevis-lmwg deleted the alloc_elevclass_o branch October 1, 2024 17:19
@samsrabin samsrabin mentioned this pull request Oct 10, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bfb bit-for-bit PR status: ready PR: this is ready to merge in, with all tests satisfactory and reviews complete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants