Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tools/betzy.env
Original file line number Diff line number Diff line change
@@ -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
26 changes: 26 additions & 0 deletions tools/betzy.sh
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions tools/olivia.env
Original file line number Diff line number Diff line change
@@ -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
32 changes: 32 additions & 0 deletions tools/olivia.sh
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions tools/saga.env
Original file line number Diff line number Diff line change
@@ -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
26 changes: 26 additions & 0 deletions tools/saga.sh
Original file line number Diff line number Diff line change
@@ -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
Loading