diff --git a/tools/betzy.env b/tools/betzy.env new file mode 100644 index 000000000..b5b5ee96a --- /dev/null +++ b/tools/betzy.env @@ -0,0 +1,5 @@ +# Module environment for Betzy +module --quiet purge +module load foss/2024a +module load CMake/3.29.3-GCCcore-13.3.0 +module load Python/3.12.3-GCCcore-13.3.0 diff --git a/tools/betzy.sh b/tools/betzy.sh new file mode 100755 index 000000000..46c763843 --- /dev/null +++ b/tools/betzy.sh @@ -0,0 +1,26 @@ +#!/bin/bash -l + +if [ `hostname | grep -i login | wc -l` == 0 ]; then + echo "This script MUST be run on the LOGIN node as it requires internet access" + exit 1 +fi + +mrcpp_dir="$(pwd)" +source ${mrcpp_dir}/tools/betzy.env + +cd ${mrcpp_dir} +build_dir=${mrcpp_dir}/build +install_dir=${mrcpp_dir}/install + +if [ -d "${build_dir}" ]; then + echo "Build directory already exists, please remove" + exit 1 +else + ./setup --prefix=${install_dir} --omp --mpi --cxx=mpicxx ${build_dir} && \ + cd ${build_dir} && \ + make && \ + OMP_NUM_THREADS=1 ctest -L unit --output-on-failure && \ + make install +fi + +exit 0 diff --git a/tools/olivia.env b/tools/olivia.env new file mode 100644 index 000000000..037ee78a2 --- /dev/null +++ b/tools/olivia.env @@ -0,0 +1,7 @@ +# Module environment for Olivia +module reset +module load NRIS/CPU +module load Python/3.13.1-GCCcore-14.2.0 +module load OpenMPI/5.0.7-GCC-14.2.0 +module load CMake/3.31.3-GCCcore-14.2.0 +export CMAKE_TLS_VERIFY=0 diff --git a/tools/olivia.sh b/tools/olivia.sh new file mode 100755 index 000000000..10c17ce2d --- /dev/null +++ b/tools/olivia.sh @@ -0,0 +1,32 @@ +#!/bin/bash -l + +if [ -z "$1" ]; then + # If not, prompt the user for input + echo "This script requires an NRIS account for compilation on a compute node" + read -p "Please state your account (nnxxxxk): " account +else + # Otherwise, use the argument + account="$1" +fi + +mrcpp_dir="$(pwd)" +source ${mrcpp_dir}/tools/olivia.env + +cd ${mrcpp_dir} +build_dir=${mrcpp_dir}/build +install_dir=${mrcpp_dir}/install + +if [ -d "${build_dir}" ]; then + echo "Build directory already exists, please remove" + exit 1 +else + ./setup --prefix=${install_dir} --omp --mpi ${build_dir} && \ + cd ${build_dir} && \ + srun --cpus-per-task=4 --mem-per-cpu=2G --time=01:00:00 --account=$account bash -c \ + "source ${mrcpp_dir}/tools/olivia.env ; \ + make -j4 ; \ + OMP_NUM_THREADS=4 ctest -L unit --output-on-failure ; \ + make install -j4" +fi + +exit 0 diff --git a/tools/saga.env b/tools/saga.env new file mode 100644 index 000000000..e6da8287f --- /dev/null +++ b/tools/saga.env @@ -0,0 +1,5 @@ +# Module environment for Saga +module --quiet purge +module load foss/2024a +module load CMake/3.29.3-GCCcore-13.3.0 +module load Python/3.12.3-GCCcore-13.3.0 diff --git a/tools/saga.sh b/tools/saga.sh new file mode 100755 index 000000000..d2f25a2f1 --- /dev/null +++ b/tools/saga.sh @@ -0,0 +1,26 @@ +#!/bin/bash -l + +if [ `hostname | grep -i login | wc -l` == 0 ]; then + echo "This script MUST be run on the LOGIN node as it requires internet access" + exit 1 +fi + +mrcpp_dir="$(pwd)" +source ${mrcpp_dir}/tools/saga.env + +cd ${mrcpp_dir} +build_dir=${mrcpp_dir}/build +install_dir=${mrcpp_dir}/install + +if [ -d "${build_dir}" ]; then + echo "Build directory already exists, please remove" + exit 1 +else + ./setup --prefix=${install_dir} --omp --mpi --cxx=mpicxx ${build_dir} && \ + cd ${build_dir} && \ + make && \ + OMP_NUM_THREADS=1 ctest -L unit --output-on-failure && \ + make install +fi + +exit 0