fms2_io: Add collective writes#1733
Conversation
|
As we discuss on Monday, if using collective mpi netcdf the code is going to put out a NOTE stating that the io_domain will be ignored and only write out 1 file. These are some other changes that are needed: uramirez8707@5908a72 This is so that the code doesn't write the |
|
Please include this commit so that there is a function that we can use to determine if a file is using collective mpi netcdf: I found this useful when implementing this in the diag manager |
| buffer_includes_halos, msg="file:"//trim(fileobj%path)//" and variable:"//trim(variable_name)) | ||
|
|
||
| c = 1 | ||
| e = 1 |
There was a problem hiding this comment.
Rather than initializing e to 1, do
e(1:2) = shape(vdata)
And for the 3D case,
e(1:2) = shape(vdata)
e(3) = 1 ! unlimited dimension
There was a problem hiding this comment.
Is there a requirement for the last index to be the unlimited one? Will this have any effects on future efforts to implement generalized indices?
There was a problem hiding this comment.
I think we've been assuming so far in the generalized indices work (at least, I did in the test that I worked on) that the unlimited dimension would always be last.
It's not clear to me if this is a hard requirement. It seems like it might not be with NetCDF 4, but the NetCDF documentation also says (https://docs.unidata.ucar.edu/netcdf-c/4.9.3/unlimited_dims.html):
For programmers, the unlimited dimension will correspond with the slowest-varying dimension. In C this is the first dimension of an array, in Fortran, the last.
Add parallel writes unit test and address Uriel's review comments.
Don't break adding variables in the non-parallel case.
uramirez8707
left a comment
There was a problem hiding this comment.
Very minor documentation changes, but looks good otherwise.
Nice work on the tests!
Description
Adds parallel writes to fms2_io for 2D, 3D, 4D, and 5D cases with a new unit test.
Fixes #1715
How Has This Been Tested?
Builds with ifx 2025.2.0 on the AMD box and the test passes.
Checklist:
make distcheckpasses