diff --git a/lib/Elements b/lib/Elements index 5bfc94f5e..0de655cd2 160000 --- a/lib/Elements +++ b/lib/Elements @@ -1 +1 @@ -Subproject commit 5bfc94f5e176d54ff2ef51f93541440be0c17510 +Subproject commit 0de655cd260e60e4f037a78561dddfb9c8757fc7 diff --git a/scripts/build-fierro.sh b/scripts/build-fierro.sh index 6e76c4941..17293bd68 100755 --- a/scripts/build-fierro.sh +++ b/scripts/build-fierro.sh @@ -185,7 +185,7 @@ if [ "$build_action" = "full-app" ]; then source hdf5-install.sh source heffte-install.sh ${heffte_build_type} ${machine} fi - source cmake_build.sh ${solver} + source cmake_build.sh ${solver} ${heffte_build_type} ${kokkos_build_type} elif [ "$build_action" = "install-trilinos" ]; then source trilinos-install.sh ${kokkos_build_type} elif [ "$build_action" = "install-hdf5" ]; then @@ -193,7 +193,7 @@ elif [ "$build_action" = "install-hdf5" ]; then elif [ "$build_action" = "install-heffte" ]; then source heffte-install.sh ${heffte_build_type} ${machine} elif [ "$build_action" = "fierro" ]; then - source cmake_build.sh ${solver} ${heffte_build_type} + source cmake_build.sh ${solver} ${heffte_build_type} ${kokkos_build_type} else echo "No build action, only setup the environment." fi diff --git a/scripts/cmake_build.sh b/scripts/cmake_build.sh index 04d9c2a26..cca151dd9 100644 --- a/scripts/cmake_build.sh +++ b/scripts/cmake_build.sh @@ -2,6 +2,7 @@ solver="${1}" heffte_build_type="${2}" +kokkos_build_type="${3}" #inititialize submodules if they aren't downloaded [ -d "${libdir}/Elements/elements" ] && echo "Elements submodule exists" @@ -100,6 +101,18 @@ else ) fi +if [ "$kokkos_build_type" = "cuda" ]; then + export OMPI_CXX=${TRILINOS_SOURCE_DIR}/packages/kokkos/bin/nvcc_wrapper + cmake_options+=( + -D CMAKE_CXX_COMPILER=${TRILINOS_SOURCE_DIR}/packages/kokkos/bin/nvcc_wrapper + ) +elif [ "$kokkos_build_type" = "hip" ]; then + export OMPI_CXX=hipcc + cmake_options+=( + -D CMAKE_CXX_COMPILER=hipcc + ) +fi + # Print CMake options for reference echo "CMake Options: ${cmake_options[@]}" diff --git a/src/Parallel-Solvers/Material-Models/User-Material-Models/init_state_vars.cpp b/src/Parallel-Solvers/Material-Models/User-Material-Models/init_state_vars.cpp index f7cde4d41..772b35f88 100644 --- a/src/Parallel-Solvers/Material-Models/User-Material-Models/init_state_vars.cpp +++ b/src/Parallel-Solvers/Material-Models/User-Material-Models/init_state_vars.cpp @@ -2,7 +2,7 @@ #include "matar.h" using namespace mtr; - +/* void init_state_vars( const DCArrayKokkos &material, const DViewCArrayKokkos &elem_mat_id, @@ -24,3 +24,4 @@ void init_state_vars( return; } +*/