-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MPI support to ParaGrid #560
Conversation
eb415e0
to
d762660
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @TomMelt! Some initial comments.
22444e2
to
36fa303
Compare
core/src/include/ModelArray.hpp
Outdated
struct DimensionSpec { | ||
std::string name; | ||
std::string altName; | ||
size_t length; | ||
size_t global_length; | ||
size_t local_length; | ||
size_t start; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding setters for the new class variables. Setting one member seems fine, but when several are set together (e.g. ModelArray.cpp
L211 ff), keeping this with the class itself is preferred.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean that you want separate setters for each variable e.g., setDimensionLocalLength
, setDimensionGlobalLength
?
And by keeping with the class do you mean in the header file i.e., core/src/include/ModelArray.hpp
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @timspainNERSC , this has now been resolved by f22b88f
As stated in the README, we follow WebKit style |
5c38bc5
to
eabb9b1
Compare
50e170b
to
eb2d3f4
Compare
add global_length, local_length, and start variables to `DimensionSpec` add logic to assign local dims and start in ParaGridIO update ParaGrid_test.cpp to handle MPI test wip: currently only runs for 1 MPI rank
add MPI backend and associated test for the IO functionality (get/dump model state) This currently passes but I still need to add MPI interface for the dynamics
* add mpi to ParaGridIO.cpp * finish mpi test cases for ParaGrid_test.cpp * reinstate ConfigOutput_test.cpp for MPI builds * update core/test/CMakeLists.txt to build tests and required input files
parallelize ERA5Atm_test and TOPAZOcn_test update CMakeLists.txt to only build MPI tests when MPI is enabled only test explicitly using mpi doctest will be built and run under MPI test run
`ModelArray::definedDimensions` were not set correctly. This commit sets default global size, local size and start position for each dimension
time is now the first dimension e.g., `var(time, ydim, xdim)`
eb2d3f4
to
1ec385a
Compare
Add MPI support to ParaGrid
closes #534
closes #454
closes #448
Task List
make_init_para24x30.py
to use new DG data layout and remove CG varsParaGrid_test.cpp
extent
andstart
variables intoModelArray
'sDimensionSpec
ParaGrid_test.cpp
getModelState
dumpModelState
writeDiagnosticTime
ConfigOutput_test.cpp
for MPI buildsERA5
/TOPAZ
testsChange Description
After #331 added MPI parallelisation for thermodynamics on the RectGrid, this PR does the same for the Parametric grid. This should then check off the second task in #120 ("MPI parallelization of thermodynamics where all operations, except for I/O, are local to an MPI rank")
Test Description
ParaGrid_test.cpp
tests core functionality of ParaGrid (serial and MPI)./nextsim --config-file config_para24x30.cfg
should provide an integration test (serial and MPI) (based on Simple 2D ParametricGrid restart file #506)Further work (for a future PR)