Skip to content

Commit

Permalink
have to commit this for fear of reverting it back when I merge in mai…
Browse files Browse the repository at this point in the history
…n. Currently a GPU build in progress
  • Loading branch information
djdunning committed Feb 22, 2024
1 parent 0ee41db commit f773e3b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/Elements
Submodule Elements updated 1 files
+1 −1 matar
4 changes: 2 additions & 2 deletions scripts/build-fierro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,15 @@ 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
source hdf5-install.sh
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
Expand Down
13 changes: 13 additions & 0 deletions scripts/cmake_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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[@]}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "matar.h"
using namespace mtr;


/*
void init_state_vars(
const DCArrayKokkos <material_t> &material,
const DViewCArrayKokkos <size_t> &elem_mat_id,
Expand All @@ -24,3 +24,4 @@ void init_state_vars(
return;
}
*/

0 comments on commit f773e3b

Please sign in to comment.