-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Add Tests for MPI version of code ### Task List - [x] add tests - [x] rebase to develop - [x] fix array ordering - [x] ~update the readthedocs / readme with install instructions~ (moved to #455) --- # Change Description I rebased @draenog's `mpi_local` and `mpi_local_tests` branches. This introduced a bug due to array reordering that occurred as part of #426. I have modified the MPI parts of `./core/src/RectGridIO.cpp` to reorder array so that they now match the order in the serial version of the code. --- # Test Description To run `testRectGrid_MPI` you will need the parallel netcdf config file `partition_metadata_1.nc`. I don't want to put it in the github repo for now. As discussed with @timspainNERSC , soon we will hopefully have an ftp server for netcdf files. You can generate the input using the following netcdf definition file `partition_metadata_1.cdl`. ``` // partition_metadata_1.cdl netcdf partition_metadata_1 { dimensions: P = 1 ; L = 1 ; globalX = 25 ; globalY = 15 ; group: bounding_boxes { variables: int global_x(P) ; int global_y(P) ; int local_extent_x(P) ; int local_extent_y(P) ; data: global_x = 0 ; global_y = 0 ; local_extent_x = 25 ; local_extent_y = 15 ; } // group bounding_boxes } ``` Then use `ncgen` to make the netcdf file `partition_metadata_1.nc` ``` ncgen partition_metadata_1.cdl -o partition_metadata_1.nc ```
- Loading branch information
Showing
9 changed files
with
674 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#define DOCTEST_CONFIG_IMPLEMENT | ||
|
||
#include <doctest/extensions/doctest_mpi.h> | ||
|
||
int main(int argc, char** argv) { | ||
doctest::mpi_init_thread(argc,argv,MPI_THREAD_MULTIPLE); | ||
|
||
doctest::Context ctx; | ||
ctx.setOption("reporters", "MpiConsoleReporter"); | ||
ctx.setOption("reporters", "MpiFileReporter"); | ||
ctx.setOption("force-colors", true); | ||
ctx.applyCommandLine(argc, argv); | ||
|
||
int test_result = ctx.run(); | ||
|
||
doctest::mpi_finalize(); | ||
|
||
return test_result; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.