Skip to content
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

new restart_simulator.x code #3040

Merged
merged 4 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Add restart benchmark code `restart_simulator.x` in bechmark directory
- Start implementing changes for vertical regridding in ExtData
- Made the POSITIVE field attribute defaults to "down" in case it is not found
- VLOCATION is not querried in MAPL_VerticalMethods.F90 for rank 2 fields
- Fixed time print in Cap GC (from slashes to colons)
- Added ability to read the attribute with explicit type "string" of a netcdf variable.
- Start to implement changes for vertical regridding in ExtData
- Add ability to connect export of the MAPL hierachy to ExtData via CAP.rc file
- Added new driver, CapDriver.x, to excerise the MAPL_Cap with the configuratable component also used by ExtDataDriver.x
- Added Fortran interface to UDUNITS2
Expand Down
1 change: 1 addition & 0 deletions benchmarks/io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ add_subdirectory(raw_bw)
add_subdirectory(gatherv)
add_subdirectory(combo)
add_subdirectory(checkpoint_simulator)
add_subdirectory(restart_simulator)
16 changes: 16 additions & 0 deletions benchmarks/io/restart_simulator/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
set(exe restart_simulator.x)
set(MODULE_DIRECTORY ${esma_include}/benchmarks/io/restart_simulator)

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

target_link_libraries (${exe} PRIVATE MAPL.shared MAPL.base MPI::MPI_Fortran FARGPARSE::fargparse ESMF::ESMF )
target_include_directories (${exe} PUBLIC $<BUILD_INTERFACE:${MAPL_SOURCE_DIR}/include>)
set_target_properties (${exe} PROPERTIES Fortran_MODULE_DIRECTORY ${MODULE_DIRECTORY})

# 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/restart_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
- "SCATTER\_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