-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix cesm link step in builds with high pcols values #22
Fix cesm link step in builds with high pcols values #22
Conversation
@sjsprecious, apologies if you aren't the right person to direct questions or this PR to. I added you as a reviewer for your opinion on this change. Should this be made even more GPU specific? Or, should I apply this to intel and gnu compilers too? Any other thoughts? |
Once incorporated, this will address EarthWorksOrg/EarthWorks Issue #56 |
Hi @gdicker1 , my understanding is that the
Therefore, I prefer not to set this flag by default and let a user add it manually when needed. Even for a GPU run, we may not have a large PCOLS value depending on the compset, resolution, number of CPU cores / GPUs per node, etc. On the other hand, using a large PCOLS value will unfortunately hurt the CPU performance. Thus using the default PCOLS value makes sense for any CPU simulation and we should not need to add this flag for GNU/Intel compiler. This is just my two cents. |
Thanks for the perspective @sjsprecious! I'll consider this a bit more... You're correct that we only need to consider adding this flag for higher |
@supreethms1809 could you offer some thoughts or review? I just updated this so |
From my limited tests on CPUs, I haven't seen the flag hurting the performance. But it is needed for GPU builds. @areanddee Do we expect to run with bigger PCOLs on CPUs as well? |
My 2 cents: |
When CAM is compiled with pcols set higher than 2048, builds will fail during the link step. Adding `-mcmodel=medium` allows builds to succeed.
Also move this to the bottom of the file and add a comment that indicates this change is only for EarthWorks.
c3bc0bd
to
b8a71e2
Compare
Thanks for your thoughts @areanddee. Since this will only activate for GPU builds (and more specifically OpenACC builds), I think this is good to move forward. |
In GPU runs of CAM, it is desirable to increase the number of physics columns each MPI rank is responsible for by increasing the pcols variable. When pcols grows somewhere beyond 2048, builds fail in the link step.
Adding
-mcmodel=medium
to the FFLAGS and LDFLAGS allow builds to proceed. Since this can have performance implications, this is only being applied to the NVHPC compilers (the main compilers for GPU applications right now).