Code profiling w/ nvhpc

I am looking to port a Fortran (yes, Fortran) application to use GPU/CUDA, using the nvhpc compilers.

Prior to any conversion work, I am looking to identify the code hotspots via a profiler. In the past I would use the pgprof profiler, but it looks like nvhpc has removed pgprof and uses nsys instead. I compiled with the -g -pg flags and a run generates a gmon.out file, but I can’t seem to find a way to get the profilers to recognize this.

I am using:

pgf90 (aka nvfortran) 23.1-0 64-bit target on x86-64 Linux -tp skylake-avx512
PGI Compilers and Tools
Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

Are there any tutorials out there on how to use the new nvhpc profilers that someone can point me to?

Thanks.

Hello Jeff @nucci,

The nsys profilers are called at time of execution of the program, ie nsys --profile <options> <executable> <args>.

Various trainings already exist online and a great resource page for GPU programming in general, including using profilers, can be found here: https://www.openhackathons.org/s/technical-resources

The NVIDIA and OpenACC organization’s maintained tutorial resource here gpubootcamp/hpc/miniprofiler at master · openhackathons-org/gpubootcamp · GitHub is one of my favorites.

Another resource I worked on at NCAR was a GPU Training workshop. Our sessions on Nsight Systems/Compute can be found here: GitHub - NCAR/GPU_workshop (See sessions 10 and 11).

If you don’t like any of the above resources, happy to suggest more. Can also provide direct advice too on Nsight and other tools if you have more specific asks or encounter problems.