MetOffice / MetOffice/lfric_apps
lfric2um and um2lfric (?) read weights files on all ranks but should only do so on rank 0
- Dominant language
- Fortran
- Stars
- 31
- Forks
- 118
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 8
Description
### Are there any linked Issues or Pull Requests?
_No response_
### Brief description
lfric2um and um2lfric do all regridding on rank 0. But all the ranks read the weights files.
For C896 to N1280 this results in 7 arrays of 157MB each per model rank (and will rise when more weights files are added). The size of the weights arrays seems to be proportional to the size of the UM grid - i.e. the ratio of the C224 size is 1/6.25 that of the C896 size.
The current location of the weights file read takes place before the LFRic setup, and before the rank number has been set. Therefore, the code will need to be reordered. See also #590, as the weights are read before the logger is initialised.
The code in `lfric2um_main_loop_mod` accesses the `weights` unprotected by a check on rank number. Such a check is needed.
### Further details of the issue.
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.