Skip to content

Commit

Permalink
Merge branch 'develop' into feature/corona-pipeline-tpls
Browse files Browse the repository at this point in the history
  • Loading branch information
balos1 authored Jun 27, 2023
2 parents 0c9936a + 15a7944 commit 1ec7211
Show file tree
Hide file tree
Showing 44 changed files with 5,855 additions and 1,321 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Added the second order IMEX method from Giraldo, Kelly, and Constantinescu 2013
as the default second order IMEX method in ARKStep. The explicit table is given
by `ARKODE_ARK2_ERK_3_1_2` and the implicit table by `ARKODE_ARK2_DIRK_3_1_2`.

Updated the F2003 utility routines `SUNDIALSFileOpen` and `SUNDIALSFileClose`
to support user specification of `stdout` and `stderr` strings for the output
file names.

## Changes to SUNDIALS in release 6.5.1

Added the functions `ARKStepClearStopTime`, `ERKStepClearStopTime`,
Expand Down
7 changes: 2 additions & 5 deletions benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,9 @@ sundials_option(BENCHMARK_NVECTOR BOOL "NVector benchmarks are on" ON)
# Add specific benchmarks
#----------------------------------------

if(ENABLE_MPI AND ENABLE_RAJA)
add_subdirectory(advection_reaction_3D)
endif()

if(ENABLE_MPI)
add_subdirectory(diffusion_2D)
add_subdirectory(diffusion_2D)
add_subdirectory(advection_reaction_3D)
endif()

# Add the nvector benchmarks
Expand Down
137 changes: 6 additions & 131 deletions benchmarks/advection_reaction_3D/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ---------------------------------------------------------------
# Programmer(s): Cody J. Balos @ LLNL
# Programmer(s): Daniel R. Reynolds @ SMU
# ---------------------------------------------------------------
# SUNDIALS Copyright Start
# Copyright (c) 2002-2023, Lawrence Livermore National Security
Expand All @@ -12,135 +12,10 @@
# SUNDIALS Copyright End
# ---------------------------------------------------------------

if(BUILD_ARKODE AND BUILD_CVODE AND BUILD_IDA)

if((RAJA_BACKENDS MATCHES "TARGET_OPENMP") OR (RAJA_BACKENDS MATCHES "OPENMP"))
set(OTHER_LIBS OpenMP::OpenMP_CXX)
endif()

# ----------------------------------------------------------------------------
# MPI only
# ----------------------------------------------------------------------------

add_executable(advection_reaction_3D
advection_reaction_3D.cpp
arkode_driver.cpp
cvode_driver.cpp
ida_driver.cpp
rhs3D.hpp
ParallelGrid.hpp
backends.hpp)

# ensure the linker language is reset to CXX
set_target_properties(advection_reaction_3D PROPERTIES LINKER_LANGUAGE CXX)

target_include_directories(advection_reaction_3D
PRIVATE
${PROJECT_SOURCE_DIR}/utilities
${MPI_CXX_INCLUDE_DIRS})

target_link_libraries(advection_reaction_3D
PRIVATE
sundials_arkode
sundials_cvode
sundials_ida
sundials_nvecmpiplusx
sundials_nvecserial
RAJA
${MPI_CXX_LIBRARIES}
${OTHER_LIBS})

install(TARGETS advection_reaction_3D
DESTINATION "${BENCHMARKS_INSTALL_PATH}/advection_reaction_3D")

install(FILES README.md
DESTINATION "${BENCHMARKS_INSTALL_PATH}/advection_reaction_3D")

# ----------------------------------------------------------------------------
# MPI + CUDA
# ----------------------------------------------------------------------------

if(BUILD_NVECTOR_CUDA)

set_source_files_properties(advection_reaction_3D.cpp
PROPERTIES LANGUAGE CUDA)
set_source_files_properties(arkode_driver.cpp PROPERTIES LANGUAGE CUDA)
set_source_files_properties(cvode_driver.cpp PROPERTIES LANGUAGE CUDA)
set_source_files_properties(ida_driver.cpp PROPERTIES LANGUAGE CUDA)

add_executable(advection_reaction_3D_mpicuda
advection_reaction_3D.cpp
arkode_driver.cpp
cvode_driver.cpp
ida_driver.cpp
rhs3D.hpp
ParallelGrid.hpp
backends.hpp)

# ensure the linker language is reset to CXX
set_target_properties(advection_reaction_3D_mpicuda
PROPERTIES LINKER_LANGUAGE CXX)

target_include_directories(advection_reaction_3D_mpicuda
PRIVATE
${PROJECT_SOURCE_DIR}/utilities
${MPI_CXX_INCLUDE_DIRS})

target_link_libraries(advection_reaction_3D_mpicuda
PRIVATE
sundials_arkode
sundials_cvode
sundials_ida
sundials_nvecmpiplusx
sundials_nveccuda
RAJA
${MPI_CXX_LIBRARIES}
${OTHER_LIBS})

target_compile_definitions(advection_reaction_3D_mpicuda PRIVATE USE_CUDA_NVEC)

install(TARGETS advection_reaction_3D_mpicuda
DESTINATION "${BENCHMARKS_INSTALL_PATH}/advection_reaction_3D")

endif()

# ----------------------------------------------------------------------------
# MPI + HIP
# ----------------------------------------------------------------------------

if(BUILD_NVECTOR_HIP)

add_executable(advection_reaction_3D_mpihip
advection_reaction_3D.cpp
arkode_driver.cpp
cvode_driver.cpp
ida_driver.cpp
rhs3D.hpp
ParallelGrid.hpp
backends.hpp)

target_include_directories(advection_reaction_3D_mpihip
PRIVATE
${PROJECT_SOURCE_DIR}/utilities
${MPI_CXX_INCLUDE_DIRS})

target_link_libraries(advection_reaction_3D_mpihip
PRIVATE
sundials_arkode
sundials_cvode
sundials_ida
sundials_nvecmpiplusx
sundials_nvechip
RAJA
hip::device
${MPI_CXX_LIBRARIES}
${OTHER_LIBS})

target_compile_definitions(advection_reaction_3D_mpihip PRIVATE USE_HIP_NVEC)

install(TARGETS advection_reaction_3D_mpihip
DESTINATION "${BENCHMARKS_INSTALL_PATH}/advection_reaction_3D")

endif()
if(ENABLE_RAJA)
add_subdirectory(raja)
endif()

if(ENABLE_KOKKOS AND BUILD_NVECTOR_KOKKOS)
add_subdirectory(kokkos)
endif()
61 changes: 61 additions & 0 deletions benchmarks/advection_reaction_3D/kokkos/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# ---------------------------------------------------------------
# Programmer(s): Daniel R. Reynolds @ SMU
# ---------------------------------------------------------------
# SUNDIALS Copyright Start
# Copyright (c) 2002-2023, Lawrence Livermore National Security
# and Southern Methodist University.
# All rights reserved.
#
# See the top-level LICENSE and NOTICE files for details.
#
# SPDX-License-Identifier: BSD-3-Clause
# SUNDIALS Copyright End
# ---------------------------------------------------------------

# Add the build targets for each backend
if(BUILD_ARKODE AND BUILD_CVODE AND BUILD_IDA)
foreach(backend ${KOKKOS_EXAMPLES_BACKENDS})

# set benchmark target name
set(benchmark_target "advection_reaction_3D_kokkos.${backend}")

# benchmark source files
add_executable(${benchmark_target}
advection_reaction_3D.cpp
arkode_driver.cpp
cvode_driver.cpp
ida_driver.cpp
rhs3D.hpp
ParallelGrid.hpp
check_retval.h)

# which backend to use
target_compile_definitions(${benchmark_target} PRIVATE USE_${backend})

# directories to include
target_include_directories(${benchmark_target}
PRIVATE
${PROJECT_SOURCE_DIR}/utilities
${MPI_CXX_INCLUDE_DIRS}
)

# libraries to link against
target_link_libraries(${benchmark_target}
PRIVATE
sundials_arkode
sundials_cvode
sundials_ida
sundials_nvecmpiplusx
sundials_nveckokkos
${MPI_CXX_LIBRARIES}
${EXE_EXTRA_LINK_LIBS}
)

install(TARGETS ${benchmark_target}
DESTINATION "${BENCHMARKS_INSTALL_PATH}/advection_reaction_3D/kokkos")

install(FILES README.md ../scripts/compare_error.py ../scripts/compute_error.py ../scripts/pickle_solution_output.py
DESTINATION "${BENCHMARKS_INSTALL_PATH}/advection_reaction_3D/kokkos")

endforeach()
endif()
Loading

0 comments on commit 1ec7211

Please sign in to comment.