Skip to content

Commit

Permalink
checkpoint simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
bena-nasa committed Oct 5, 2023
1 parent 4ca4e3a commit 1d196db
Show file tree
Hide file tree
Showing 5 changed files with 780 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Add new benchmark to simulation writing a cubed-sphere file using various tunable strategies

### Changed
- Modified fpp macro `_UNUSED_DUMMY(x) to use ASSOCIATE instead of PRINT. With this change it can be used in PURE procedures.
- Make error handling in Plain_netCDF_Time consistent with MAPL standard error handling
Expand Down
1 change: 1 addition & 0 deletions benchmarks/io/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
add_subdirectory(raw_bw)
add_subdirectory(gatherv)
add_subdirectory(combo)
add_subdirectory(checkpoint_simulator)
14 changes: 14 additions & 0 deletions benchmarks/io/checkpoint_simulator/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
set(exe checkpoint_simulator.x)

ecbuild_add_executable (
TARGET ${exe}
SOURCES checkpoint_simulator.F90
DEFINITIONS USE_MPI)

target_link_libraries (${exe} PRIVATE MAPL.shared MPI::MPI_Fortran FARGPARSE::fargparse esmf )
target_include_directories (${exe} PUBLIC $<BUILD_INTERFACE:${MAPL_SOURCE_DIR}/include>)

# CMake has an OpenMP issue with NAG Fortran: https://gitlab.kitware.com/cmake/cmake/-/issues/21280
if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "NAG")
target_link_libraries(${exe} PRIVATE OpenMP::OpenMP_Fortran)
endif ()
19 changes: 19 additions & 0 deletions benchmarks/io/checkpoint_simulator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
This benchmark simulates writing a series of 3D variables of a given cubed-sphere resolution to a file using the same strategies as used by the real checkpoint code in MAPL

The code has the following options and needs an ESMF rc file named checkpoint\_benchmark.rc

- "NX:" the x distribution for each face
- "NY:" the y distribution for each face
- "IM\_WORLD:" the cube resolution
- "LM:" the nubmer of levels
- "NUM\_WRITERS:" the number of writing processes either to a single or independent files
- "NUM\_ARRAYS:" the number of 3D variables to write to the file
- "CHUNK:" whether to chunk, default true
- "GATHER\_3D:" gather all levels at once (default is false which means a level at a time is gathered)
- "SPLIT\_FILE:" default false, if true, each writer writes to and independent file
- "WRITE\_BARRIER:" default false, add a barrier before each write to for synchronization
- "DO\_WRITES:" default true, if false skips writing (so just an mpi test at that point)
- "NTRIAL:" default 1, the number of trials to make writing
- "RANDOM\_DATA:" default true, if true will arrays with random data, if false sets the array to the rank of the process

Note that whatever you set NX and NY to the program must be run on 6*NY*NY processors and the number of writers must evenly divide 6*NY
Loading

0 comments on commit 1d196db

Please sign in to comment.