Skip to content

Commit

Permalink
Update the install scripts note haven't tested locally but should wor…
Browse files Browse the repository at this point in the history
…k...
  • Loading branch information
rcarson3 committed Jan 4, 2024
1 parent a30ffbd commit 8311875
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
23 changes: 12 additions & 11 deletions scripts/install/unix_gpu_install_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
SCRIPT=$(readlink -f "$0")
BASE_DIR=$(dirname "$SCRIPT")
#change this to the cuda compute capability for your gpu
LOC_CUDA_ARCH='sm_70'
# LOC_CUDA_ARCH='sm_70'
#CMAKE_CUDA_ARCHITECTURES drops the sm_ aspect of the cuda compute capability
LOC_CUDA_ARCH='70'

# If you are using SPACK or have another module like system to set-up your developer environment
# you'll want to load up the necessary compilers and devs environments
Expand All @@ -15,7 +17,7 @@ LOC_CUDA_ARCH='sm_70'

# Build raja
if [ ! -d "raja" ]; then
git clone --recursive https://github.com/llnl/raja.git --branch v0.13.0 --single-branch
git clone --recursive https://github.com/llnl/raja.git --branch v2022.10.5 --single-branch
cd ${BASE_DIR}/raja
# Instantiate all the submodules
git submodule init
Expand All @@ -28,7 +30,7 @@ if [ ! -d "raja" ]; then
-DENABLE_OPENMP=OFF \
-DENABLE_CUDA=ON \
-DRAJA_TIMER=chrono \
-DCUDA_ARCH=${LOC_CUDA_ARCH} \
-DCMAKE_CUDA_ARCHITECTURESmbly=${LOC_CUDA_ARCH} \
-DENABLE_TESTS=OFF \
-DCMAKE_BUILD_TYPE=Release
make -j 4
Expand All @@ -54,13 +56,13 @@ if [ ! -d "ExaCMech" ]; then
cd ${BASE_DIR}/ExaCMech/build
# GPU build
cmake ../ -DCMAKE_INSTALL_PREFIX=../install_dir/ \
-DRAJA_DIR=${BASE_DIR}/raja/install_dir/share/raja/cmake/ \
-DRAJA_DIR=${BASE_DIR}/raja/install_dir/lib/cmake/raja/ \
-DENABLE_OPENMP=OFF \
-DENABLE_CUDA=ON \
-DENABLE_TESTS=OFF \
-DENABLE_MINIAPPS=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCUDA_ARCH=${LOC_CUDA_ARCH} \
-DCMAKE_CUDA_ARCHITECTURESmbly=${LOC_CUDA_ARCH} \
-DBUILD_SHARED_LIBS=OFF
make -j 4
make install
Expand All @@ -75,7 +77,7 @@ fi
cd ${BASE_DIR}
if [ ! -d "hypre" ]; then

git clone https://github.com/hypre-space/hypre.git --branch v2.20.0 --single-branch
git clone https://github.com/hypre-space/hypre.git --branch v2.26.0 --single-branch
cd ${BASE_DIR}/hypre/src
# Based on their install instructions
# This should work on most systems
Expand Down Expand Up @@ -109,8 +111,7 @@ cd ${BASE_DIR}

if [ ! -d "metis-5.1.0" ]; then

curl -o metis-5.1.0.tar.gz http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz
tar -xzf metis-5.1.0.tar.gz
curl -o metis-5.1.0.tar.gz https://mfem.github.io/tpls/metis-5.1.0.tar.gz tar -xzf metis-5.1.0.tar.gz
rm metis-5.1.0.tar.gz
cd metis-5.1.0
mkdir install_dir
Expand Down Expand Up @@ -143,7 +144,7 @@ if [ ! -d "mfem" ]; then
-DHYPRE_DIR=${HYPRE_DIR} \
-DCMAKE_INSTALL_PREFIX=../install_dir/ \
-DMFEM_USE_CUDA=ON \
-DCUDA_ARCH=${LOC_CUDA_ARCH} \
-DCMAKE_CUDA_ARCHITECTURESmbly=${LOC_CUDA_ARCH} \
-DMFEM_USE_OPENMP=OFF \
-DMFEM_USE_RAJA=ON -DRAJA_DIR=${BASE_DIR}/raja/install_dir/ \
-DCMAKE_BUILD_TYPE=Release
Expand Down Expand Up @@ -178,12 +179,12 @@ if [ ! -d "ExaConstit" ]; then
cmake ../ -DENABLE_MPI=ON -DENABLE_FORTRAN=ON \
-DMFEM_DIR=${BASE_DIR}/mfem/install_dir/lib/cmake/mfem/ \
-DECMECH_DIR=${BASE_DIR}/ExaCMech/install_dir/ \
-DRAJA_DIR=${BASE_DIR}/raja/install_dir/share/raja/cmake/ \
-DRAJA_DIR=${BASE_DIR}/raja/install_dir/lib/cmake/raja/ \
-DSNLS_DIR=${BASE_DIR}/ExaCMech/install_dir/ \
-DENABLE_SNLS_V03=ON \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_CUDA=ON \
-DCUDA_ARCH=${LOC_CUDA_ARCH} \
-DCMAKE_CUDA_ARCHITECTURESmbly=${LOC_CUDA_ARCH} \
-DENABLE_TESTS=ON
# Sometimes the cmake systems can be a bit difficult and not properly find the MFEM installed location
# using the above. If that's the case the below should work:
Expand Down
10 changes: 5 additions & 5 deletions scripts/install/unix_install_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ BASE_DIR=$(dirname "$SCRIPT")

# Build raja
if [ ! -d "raja" ]; then
git clone --recursive https://github.com/llnl/raja.git --branch v0.13.0 --single-branch
git clone --recursive https://github.com/llnl/raja.git --branch v2022.10.5 --single-branch
cd ${BASE_DIR}/raja
# Instantiate all the submodules
git submodule init
Expand Down Expand Up @@ -50,7 +50,7 @@ if [ ! -d "ExaCMech" ]; then
cd ${BASE_DIR}/ExaCMech/build
# GPU build
cmake ../ -DCMAKE_INSTALL_PREFIX=../install_dir/ \
-DRAJA_DIR=${BASE_DIR}/raja/install_dir/share/raja/cmake/ \
-DRAJA_DIR=${BASE_DIR}/raja/install_dir/lib/cmake/raja/ \
-DENABLE_OPENMP=OFF \
-DENABLE_TESTS=OFF \
-DENABLE_MINIAPPS=OFF \
Expand All @@ -69,7 +69,7 @@ fi
cd ${BASE_DIR}
if [ ! -d "hypre" ]; then

git clone https://github.com/hypre-space/hypre.git --branch v2.20.0 --single-branch
git clone https://github.com/hypre-space/hypre.git --branch v2.26.0 --single-branch
cd ${BASE_DIR}/hypre/src
# Based on their install instructions
# This should work on most systems
Expand Down Expand Up @@ -103,7 +103,7 @@ cd ${BASE_DIR}

if [ ! -d "metis-5.1.0" ]; then

curl -o metis-5.1.0.tar.gz http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz
curl -o metis-5.1.0.tar.gz https://mfem.github.io/tpls/metis-5.1.0.tar.gz
tar -xzf metis-5.1.0.tar.gz
rm metis-5.1.0.tar.gz
cd metis-5.1.0
Expand Down Expand Up @@ -170,7 +170,7 @@ if [ ! -d "ExaConstit" ]; then
cmake ../ -DENABLE_MPI=ON -DENABLE_FORTRAN=ON \
-DMFEM_DIR=${BASE_DIR}/mfem/install_dir/lib/cmake/mfem/ \
-DECMECH_DIR=${BASE_DIR}/ExaCMech/install_dir/ \
-DRAJA_DIR=${BASE_DIR}/raja/install_dir/share/raja/cmake/ \
-DRAJA_DIR=${BASE_DIR}/raja/install_dir/lib/cmake/raja/ \
-DSNLS_DIR=${BASE_DIR}/ExaCMech/install_dir/ \
-DENABLE_SNLS_V03=ON \
-DCMAKE_BUILD_TYPE=Release \
Expand Down

0 comments on commit 8311875

Please sign in to comment.