forked from Mantevo/miniMD
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'checkpoint-benchmarkIII' into 'master'
Checkpoint and Resilient execution benchmark additions See merge request kokkos-resilience/minimd!1
- Loading branch information
Showing
20 changed files
with
548 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
cmake_minimum_required(VERSION 3.12) | ||
project(minimd) | ||
|
||
add_executable(minimd) | ||
# Require C++14 | ||
if (CMAKE_CXX_COMPILER MATCHES ".*nvcc_wrapper" ) | ||
message("nvcc wrapper requires that CXX standard by set in kokkos build") | ||
else() | ||
target_compile_features(minimd PUBLIC cxx_std_14) | ||
endif() | ||
|
||
# Options | ||
option(MINIMD_SINGLE_PRECISION, "Use single precision" OFF) | ||
if (MINIMD_SINGLE_PRECISION) | ||
target_compile_definitions(minimd PRIVATE PRECISION=1) | ||
else() | ||
target_compile_definitions(minimd PRIVATE PRECISION=2) | ||
endif() | ||
|
||
option(MINIMD_AUTOMATIC_CHECKPOINT "Use resilience automatic checkpointing" OFF) | ||
option(MINIMD_MANUAL_CHECKPOINT "Use resilience manual checkpointing" OFF) | ||
|
||
target_compile_definitions(minimd PRIVATE PREC_TIMER) | ||
|
||
# Dependencies | ||
if (MINIMD_USE_MPISTUB) | ||
find_library( mpi_stub_ NAMES libmpi_stubs.a libmpi_stubs mpi_stubs HINTS ${PROJECT_SOURCE_DIR}/kokkos/MPI-Stubs ) | ||
#add_library(mpi_stubs) | ||
#target_link_libraries(minimd PRIVATE mpi_stubs) | ||
target_link_libraries(minimd PRIVATE ${mpi_stub_}) | ||
target_include_directories(minimd PUBLIC | ||
${PROJECT_SOURCE_DIR}/kokkos/MPI-Stubs | ||
) | ||
else() | ||
find_package(MPI REQUIRED) | ||
target_link_libraries(minimd PRIVATE MPI::MPI_CXX) | ||
endif() | ||
|
||
find_package(Kokkos REQUIRED NO_CMAKE_PACKAGE_REGISTRY) | ||
|
||
# Optional resilience | ||
if(MINIMD_AUTOMATIC_CHECKPOINT OR MINIMD_MANUAL_CHECKPOINT OR MINIMD_RESILIENT_EXECUTION) | ||
find_package(resilience REQUIRED) | ||
target_link_libraries(minimd PRIVATE Kokkos::resilience) | ||
target_compile_definitions(minimd PRIVATE MINIMD_RESILIENCE) | ||
if(MINIMD_AUTOMATIC_CHECKPOINT) | ||
target_compile_definitions(minimd PRIVATE KOKKOS_ENABLE_AUTOMATIC_CHECKPOINT) | ||
endif() | ||
if(MINIMD_MANUAL_CHECKPOINT) | ||
target_compile_definitions(minimd PRIVATE KOKKOS_ENABLE_MANUAL_CHECKPOINT) | ||
endif() | ||
if(MINIMD_RESILIENT_EXECUTION) | ||
target_compile_definitions(minimd PRIVATE KOKKOS_ENABLE_RESILIENT_EXECUTION) | ||
endif() | ||
endif() | ||
|
||
TARGET_LINK_KOKKOS(minimd PRIVATE) | ||
|
||
target_link_libraries(minimd PRIVATE "-L${resilience_LINK_DIRECTORIES}") | ||
|
||
# VeloC config | ||
add_custom_command(TARGET minimd PRE_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/minimd.cfg ${CMAKE_CURRENT_BINARY_DIR}/minimd.cfg) | ||
|
||
# Other inputs | ||
|
||
add_custom_command(TARGET minimd PRE_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/kokkos/in.lj.miniMD ${CMAKE_CURRENT_BINARY_DIR}/in.lj.miniMD) | ||
|
||
add_custom_command(TARGET minimd PRE_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/kokkos/Cu_u6.eam ${CMAKE_CURRENT_BINARY_DIR}/Cu_u6.eam) | ||
|
||
add_subdirectory(kokkos) | ||
|
||
|
||
##get_cmake_property(_variableNames VARIABLES) | ||
##list (SORT _variableNames) | ||
##foreach (_variableName ${_variableNames}) | ||
## message(STATUS "${_variableName}=${${_variableName}}") | ||
##endforeach() | ||
|
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,14 @@ | ||
target_sources(minimd PRIVATE | ||
${PROJECT_SOURCE_DIR}/kokkos/atom.cpp | ||
${PROJECT_SOURCE_DIR}/kokkos/comm.cpp | ||
${PROJECT_SOURCE_DIR}/kokkos/force_eam.cpp | ||
${PROJECT_SOURCE_DIR}/kokkos/force_lj.cpp | ||
${PROJECT_SOURCE_DIR}/kokkos/input.cpp | ||
${PROJECT_SOURCE_DIR}/kokkos/integrate.cpp | ||
${PROJECT_SOURCE_DIR}/kokkos/ljs.cpp | ||
${PROJECT_SOURCE_DIR}/kokkos/neighbor.cpp | ||
${PROJECT_SOURCE_DIR}/kokkos/output.cpp | ||
${PROJECT_SOURCE_DIR}/kokkos/setup.cpp | ||
${PROJECT_SOURCE_DIR}/kokkos/thermo.cpp | ||
${PROJECT_SOURCE_DIR}/kokkos/timer.cpp | ||
) |
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
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,59 @@ | ||
[ | ||
{ | ||
"name":"atom", | ||
"Layout_Config":{ | ||
"data_set":"atom_dataset", | ||
"rank":2, | ||
"layout":"REGULAR", | ||
"data_extents":["{DATA_SIZE}","{MPI_SIZE}"], | ||
"local_extents":["{DATA_SIZE}","1"], | ||
"offset":["0","{MPI_RANK}"], | ||
"stride":["1","{MPI_SIZE}"], | ||
"count":["1","1","1","1"], | ||
"block":["{DATA_SIZE}","1"], | ||
"local_offset":["0","0","0","0"], | ||
"local_stride":["1","1","1","1"], | ||
"local_count":["1","1","1","1"], | ||
"local_block":["{DATA_SIZE}","1","1","1"], | ||
"view_offset":["0","0"] | ||
} | ||
}, | ||
{ | ||
"name":"velocity", | ||
"Layout_Config":{ | ||
"data_set":"velocity_dataset", | ||
"rank":2, | ||
"layout":"REGULAR", | ||
"data_extents":["{DATA_SIZE}","{MPI_SIZE}"], | ||
"local_extents":["{DATA_SIZE}","1"], | ||
"offset":["0","{MPI_RANK}"], | ||
"stride":["1","{MPI_SIZE}"], | ||
"count":["1","1","1","1"], | ||
"block":["{DATA_SIZE}","1"], | ||
"local_offset":["0","0","0","0"], | ||
"local_stride":["1","1","1","1"], | ||
"local_count":["1","1","1","1"], | ||
"local_block":["{DATA_SIZE}","1","1","1"], | ||
"view_offset":["0","0"] | ||
} | ||
}, | ||
{ | ||
"name":"force", | ||
"Layout_Config":{ | ||
"data_set":"force_dataset", | ||
"rank":2, | ||
"layout":"REGULAR", | ||
"data_extents":["{DATA_SIZE}","{MPI_SIZE}"], | ||
"local_extents":["{DATA_SIZE}","1"], | ||
"offset":["0","{MPI_RANK}"], | ||
"stride":["1","{MPI_SIZE}"], | ||
"count":["1","1","1","1"], | ||
"block":["{DATA_SIZE}","1"], | ||
"local_offset":["0","0","0","0"], | ||
"local_stride":["1","1","1","1"], | ||
"local_count":["1","1","1","1"], | ||
"local_block":["{DATA_SIZE}","1","1","1"], | ||
"view_offset":["0","0"] | ||
} | ||
} | ||
] |
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.