Skip to content

Commit

Permalink
complete merge
Browse files Browse the repository at this point in the history
  • Loading branch information
yu-nix committed Jul 11, 2023
2 parents 05cd64e + b8d32d9 commit 9f55581
Show file tree
Hide file tree
Showing 71 changed files with 6,220 additions and 1,471 deletions.
17 changes: 4 additions & 13 deletions .gitlab/lassen-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,13 @@
# ------------------------------------------------------------------------------

# Builds with CUDA, RAJA and other TPLs
# lassen_cuda_no_tpls:
# parallel:
# matrix:
# - COMPILER_SPEC: [[email protected], [email protected]]
# CUDA_SPEC: [[email protected], [email protected], [email protected]]
# variables:
# SPEC: "%${COMPILER_SPEC} cstd=99 cxxstd=14 precision=double ~int64 +mpi+openmp+cuda~raja~magma~superlu-dist~petsc~hypre~ginkgo cuda_arch=70 ^${CUDA_SPEC}+allow-unsupported-compilers"
# extends: .lassen_build_and_test

lassen_xl_cuda_tpls:
lassen_cuda_no_tpls:
parallel:
matrix:
- COMPILER_SPEC: [email protected]
CUDA_SPEC: [cuda@11.8.0]
- COMPILER_SPEC: [[email protected]]
CUDA_SPEC: [cuda@10.1.243]
variables:
SPEC: "%${COMPILER_SPEC} cstd=99 cxxstd=14 precision=double ~int64 +mpi+openmp+cuda+raja+magma+superlu-dist+petsc+hypre+ginkgo cuda_arch=70 ^ginkgo+cuda cuda_arch=70 ^hypre~cuda ^petsc~cuda ^superlu-dist+cuda cuda_arch=70 ^magma+cuda cuda_arch=70 ^raja+cuda~openmp~examples~exercises cuda_arch=70 ^${CUDA_SPEC}+allow-unsupported-compilers"
SPEC: "%${COMPILER_SPEC} cstd=99 cxxstd=14 precision=double ~int64 +mpi+openmp+cuda~raja~magma~superlu-dist~petsc~hypre~ginkgo cuda_arch=70 ^${CUDA_SPEC}+allow-unsupported-compilers"
extends: .lassen_build_and_test

lassen_gcc_cuda_tpls:
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ 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.

Updated CVODE, CVODES and ARKODE default behavior when returning the solution when
the internal time has reached a user-specified stop time. Previously, the output
solution was interpolated to the value of `tstop`; the default is now to copy the
internal solution vector. Users who wish to revert to interpolation may call a new
routine `CVodeSetInterpolateStopTime`, `ARKStepSetInterpolateStopTime`,
`ERKStepSetInterpolateStopTime`, or `MRIStepSetInterpolateStopTime`.

## 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 9f55581

Please sign in to comment.