MetOffice / MetOffice/lfric_apps
Fix CrayPat profiling for `lfric_atm`
- Dominant language
- Fortran
- Stars
- 31
- Forks
- 118
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 8
Description
### Are there any linked Issues or Pull Requests?
#103
### Brief description
Currently, CrayPat/perftools profiling only works with `gungho_model` on a single node. We want to be able to use these profiling tools for all applications and include perftools in a profiling suite.
### Further details of the issue.
When trying to profile `lfric_atm` with perftools, the error returned states that XIOS cannot open a NetCDF file in parallel. I have been able to get around this issue by instrumenting XIOS and `lfric_atm` with pre-instrumented versions of the `pnetcdf` library and a group of libraries contained under the perftools trace group named `io`:
`pat_build -u -g pnetcdf -g io xios_server.exe`
This allowed the `lfric_atm` and `xios_server` executables to be profiled.
> [!NOTE]
> 1. This was a traced run where all subroutine calls were logged. This is instead of sampling where perftools records the most called routines and then creates a newly instrumented executable that only traces the most called routines.
> 2. A traced run tracking every routine takes much longer to complete.
> 3. This was not able to profile MPI calls and no `MPICH_RANK_REORDER` file was generated
A possible solution could be to add a version of XIOS instrumented with the trace groups to the LFRic stack and update the `lfric_atm` perftools command to match.
Contributor guide
No contributing guide indexed for this repository
Research direction
No source file or test is named. Start by reviewing the perftools command for `lfric_atm`, the working `gungho_model` setup, and the linked issue #103; use the XIOS and `lfric_atm` profiling commands described here as the entry point. Done means profiling works for `lfric_atm` and other applications without the parallel NetCDF error and can be included in the profiling suite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fortran
- Domain
- performance, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100