Skip to content

[WIP] NVIDIA/OpenACC hackathon May 2026 work#286

Draft
ekluzek wants to merge 26 commits into
ESMCI:mainfrom
ekluzek:nvidia-hackathon-26
Draft

[WIP] NVIDIA/OpenACC hackathon May 2026 work#286
ekluzek wants to merge 26 commits into
ESMCI:mainfrom
ekluzek:nvidia-hackathon-26

Conversation

@ekluzek

@ekluzek ekluzek commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Some changes mostly to the nvhpc compiler (and adding a nvhpc-prof compiler to also run profiling) for the OpenACC/NVIDIA Hackathon in late April and early May 2026.

There will probably be bits of this that we might want to bring into main development. But, it might not be clear until we are finished.

Things that likely would be good to bring in:

  • Documentation of what some of the nvhpc compiler options do
  • The additional nvhpc options for showing optimization
  • The nvhpc-prof compiler option to run the profiler?
  • Changes to optimization that we experiment with? (we'll have to verify anything here with the entire CESM, or isolate it to just CTSM code)

ekluzek added 22 commits April 25, 2026 01:43
…n, also add commented out version to report on all optimization
…FLAGS, and nvtx library to the linker LDFLAGS
…am to a crawl, make sure the leading dash is on the -Minfo flag
…because adding a new compiler nvhpc-prof didn't work as the the build failed at the link step
… nsys profiler, however it's FAILing at the link step of the build, however, just modifying the nvhpc compiler with the changes is working
… nsys profiler, however it's FAILing at the link step of the build, however, just modifying the nvhpc compiler with the changes is working
…er though, because it seems to only know about GPUs
…EBUG as it will be empty, use plain -Minstrument since the functions option is the default
…bably the missing piece to get nvhpc-prof working as an option
@ekluzek ekluzek added enhancement New feature or request Responsibility: CTSM Responsibility to manage and accomplish this issue is the CTSM Software group labels Apr 29, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

My 2 cents here: Adding an nvhpc-prof option is a little confusing since what you are doing is using the same NVHPC compiler but enabling the Nsight profiling tool (i.e., you are not adding an actually different compiler). I usually only need to override the MPI_RUN_COMMAND with the profiling command and keep the same nvhpc compiler setup.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It does add some to the compilation and link step so that the profiler can be run at the run phase. So there is a difference in compilation as well.

I mainly don't like the duplication it has in copying everything that nvhpc has with a few small changes. Possibly a better way would be to have an XML variable that turns on profiling? This would cut the duplication and make it easier to use for other compilers.

Since, you have to both change the compilation AND the mpirun I thought it better to have it wrapped up in one.

What do you think of the idea of adding an XML variable for this? I think it would have to go somewhere like in CMEPS/cime_config/config_component_cesm.xml though. Or under CIME. Maybe something like:

BUILD_AND_RUN_PROFILER

?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Pinging @billsacks @fischer-ncar on the above question. And in general on what's in this PR for what parts might be good to come to main at some point.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @ekluzek . I agree with your point here as I also feel uncomfortable with the large duplication of copying every from the existing nvhpc setups. I like your idea about adding an XML variable to turn on profiling and add the extra necessary compilation and link steps. Since it is specific for NVIDIA GPU profiling, maybe add something like ENABLE_NSYS_PROFILER to this section (https://github.com/ESCOMP/CMEPS/blob/main/cime_config/config_component.xml#L806-L852)?

@billsacks

Copy link
Copy Markdown
Member

Thank you for all of your work on this, @ekluzek . My feeling is that I want to see that this is useful to multiple people long-term before bringing it into main - for now having it on a branch is fine for the hackathon and then we can see how much we want to continue using it, and in what form, beyond that point.

@billsacks

Copy link
Copy Markdown
Member

(I should add, though, that I haven't looked in detail at what this adds, so it may be that some of this is stuff we more clearly want??)

ekluzek added 3 commits May 6, 2026 18:36
…he Makefile.common in the perf_testing directory of CTSM nvidia-hackathon-26 branch, also remove the timing of the compile for nchpc as it produces a ton of useless output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Responsibility: CTSM Responsibility to manage and accomplish this issue is the CTSM Software group

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants