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

Make rcfg_cloudsat a HEAP variable #99

Merged

Conversation

bartgol
Copy link
Contributor

@bartgol bartgol commented Sep 5, 2024

The rcfg_cloudsat variable can be large. If the cospIN object is on the stack, this can cause lots of stack memory, which can fail unless ppl run ulimit -s unlimited first. In particular, cospIN was 28MB, while the common stack size is 8MB.

@brhillman
Copy link
Contributor

@alejandrobodas, FYI, this is causing us issues with running in E3SM/SCREAM. We have been using a local version of the code with this change, but are trying to update to the latest version of the repo so it would be nice to get this in so we can actually track COSP2 development.

@alejandrobodas
Copy link
Collaborator

@bartgol @brhillman many thanks for this. The integrations tests fail, likely because the intel compiler has changed. I'm addressing that in #100. As soon as #100 is merged we'll make progress with this one.
I've looked at the changes and I wonder if you need a deallocate statement at the end of destroy_cospIN?

@bartgol
Copy link
Contributor Author

bartgol commented Sep 6, 2024

Uhm, aren't allocatable variables in Fortran automatically deallocated when they go out of scope (unlike pointers which need to be manually deallocated)? I thought that was the big advantage of allocatable with respect to pointer..

@alejandrobodas
Copy link
Collaborator

Uhm, aren't allocatable variables in Fortran automatically deallocated when they go out of scope (unlike pointers which need to be manually deallocated)? I thought that was the big advantage of allocatable with respect to pointer..

Indeed, please disregard my comment.

@alejandrobodas alejandrobodas self-requested a review September 17, 2024 12:36
@alejandrobodas alejandrobodas merged commit 342aa2c into CFMIP:master Sep 17, 2024
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants