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

[Build] Memory optimization for global allocation #151

Open
angehung5 opened this issue Feb 28, 2025 · 4 comments
Open

[Build] Memory optimization for global allocation #151

angehung5 opened this issue Feb 28, 2025 · 4 comments
Labels
enhancement New feature or request

Comments

@angehung5
Copy link
Collaborator

Huge memory is required by biogenic historic option when run globally (1536 x 3072 grid points).

In file 'canopy_alloc.F90', around line 68: Error allocating 909744537600 bytes: Cannot allocate memory

@MaggieMarvin What do you think? Seems like we need to disable hist_opt at least as default off (=0) in example namelist. I think we could move the historical calculations into the ifcanbio block of canopy_calcs and also move those alloc/dealloc variables inside the ifcanbio block as well though. We can address in future PR with your biogenic updates coming. -- Originally posted by @drnimbusrain

As discussed with @drnimbusrain, we should start with at least warning users about this issue in README.

@angehung5 angehung5 added the enhancement New feature or request label Feb 28, 2025
@drnimbusrain
Copy link
Member

drnimbusrain commented Mar 5, 2025

@MaggieMarvin Does this further imply we need a restart option like in issue #94 ? Running long time periods for simulation are prohibitive in biogenics considering the historical aspects, and a restart option would facilitate running shorter periods able to restart some variables that are needed historically (e.g., leaf temp, ppfd, age, etc.).

I agree warnings in the short term, and/or maybe other suggestions to reduce number of vertical layers significantly, if this even helps use historical option globally? @angehung5

@angehung5
Copy link
Collaborator Author

Job efficiency for global runs with all options on, ntime=1

10 layers, 5m resolution

Job ID: 3246239
Cluster: hopper
User/Group: whung/users
State: COMPLETED (exit code 0)
Cores: 1
CPU Utilized: 00:04:16
CPU Efficiency: 93.77% of 00:04:33 core-walltime
Job Wall-clock time: 00:04:33
Memory Utilized: 657.92 GB
Memory Efficiency: 82.24% of 800.00 GB

3 layers, 15m resol

Job ID: 3246642
Cluster: hopper
User/Group: whung/users
State: COMPLETED (exit code 0)
Cores: 1
CPU Utilized: 00:00:35
CPU Efficiency: 83.33% of 00:00:42 core-walltime
Job Wall-clock time: 00:00:42
Memory Utilized: 200.04 GB
Memory Efficiency: 25.01% of 800.00 GB

5 layers, 10m resol

Job ID: 3246645
Cluster: hopper
User/Group: whung/users
State: COMPLETED (exit code 0)
Cores: 1
CPU Utilized: 00:01:26
CPU Efficiency: 92.47% of 00:01:33 core-walltime
Job Wall-clock time: 00:01:33
Memory Utilized: 315.49 GB
Memory Efficiency: 39.44% of 800.00 GB 

Much improved after reducing number of vertical layers. 5 layers might be a good number? @drnimbusrain
Also the historical calculation should be moved inside of biogenic canopy_calcs. They are still on even after turning off biogenics.

@drnimbusrain
Copy link
Member

drnimbusrain commented Mar 5, 2025 via email

@MaggieMarvin
Copy link
Collaborator

Yes, I do definitely think we still need to work on a restart option and in the meantime we can turn default hist options off and/or move allocations to ifcanbio block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants