Skip to content

Commit 56942bf

Browse files
committed
Add Viper machine
Fix
1 parent 50cffd3 commit 56942bf

File tree

3 files changed

+109
-0
lines changed

3 files changed

+109
-0
lines changed

support/Environments/viper.sh

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/bin/env sh
2+
3+
# Distributed under the MIT License.
4+
# See LICENSE.txt for details.
5+
6+
spectre_load_modules() {
7+
module load gcc/13
8+
module load impi/2021.11
9+
module load boost/1.83
10+
module load gsl/2.7
11+
module load cmake/3.30
12+
module load hdf5-serial/1.14.1
13+
module load python-waterboa/2024.06
14+
module load doxygen/1.10.0
15+
module load paraview/5.11
16+
# Load Spack environment
17+
source /u/guilara/repos/spack/share/spack/setup-env.sh
18+
spack env activate env3_spectre_impi
19+
# Load python environment
20+
source /u/guilara/envs/spectre_env/bin/activate
21+
# Define Charm paths
22+
export CHARM_ROOT=/u/guilara/charm_impi/mpi-linux-x86_64-smp
23+
export PATH=$PATH:/u/guilara/charm_impi/mpi-linux-x86_64-smp/bin
24+
}
25+
26+
spectre_unload_modules() {
27+
module load gcc/13
28+
module load impi/2021.11
29+
module load boost/1.83
30+
module load gsl/2.7
31+
module load cmake/3.30
32+
module load hdf5-serial/1.14.1
33+
module load python-waterboa/2024.06
34+
module load doxygen/1.10.0
35+
module load paraview/5.11
36+
# Unload Spack environment
37+
spack env deactivate
38+
# Unload python environment
39+
deactivate
40+
}
41+
42+
spectre_run_cmake() {
43+
if [ -z ${SPECTRE_HOME} ]; then
44+
echo "You must set SPECTRE_HOME to the cloned SpECTRE directory"
45+
return 1
46+
fi
47+
spectre_load_modules
48+
49+
cmake -D CMAKE_C_COMPILER=gcc \
50+
-D CMAKE_CXX_COMPILER=g++ \
51+
-D CMAKE_Fortran_COMPILER=gfortran \
52+
-D CHARM_ROOT=$CHARM_ROOT \
53+
-D CMAKE_BUILD_TYPE=Release \
54+
-D DEBUG_SYMBOLS=OFF \
55+
-D BUILD_SHARED_LIBS=ON \
56+
-D MEMORY_ALLOCATOR=JEMALLOC \
57+
-D BUILD_PYTHON_BINDINGS=ON \
58+
-D MACHINE=Viper \
59+
-D SPEC_ROOT=/u/guilara/repos/spec \
60+
-D Catch2_DIR=/u/guilara/repos/Catch2/install_dir/lib64/cmake/Catch2 \
61+
"$@" $SPECTRE_HOME
62+
}

support/Machines/Viper.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Distributed under the MIT License.
2+
# See LICENSE.txt for details.
3+
4+
Machine:
5+
Name: Viper
6+
Description: |
7+
Supercomputer at the Max Planck Computing Data Facilty.
8+
DefaultProcsPerNode: 128
9+
DefaultQueue: "p.general"
10+
DefaultTimeLimit: "1-00:00:00"
11+
LaunchCommandSingleNode: ["srun", "-n", "1"]

support/SubmitScripts/Viper.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{% extends "SubmitTemplateBase.sh" %}
2+
3+
# Distributed under the MIT License.
4+
# See LICENSE.txt for details.
5+
6+
# Supercomputer at the Max Planck Computing Data Facility.
7+
# More information:
8+
# https://docs.mpcdf.mpg.de/doc/computing/viper-user-guide.html
9+
10+
{% block head %}
11+
{{ super() -}}
12+
#SBATCH --nodes {{ num_nodes | default(1) }}
13+
#SBATCH --ntasks-per-node=1
14+
#SBATCH --ntasks-per-core=1
15+
#SBATCH --cpus-per-task=128
16+
#SBATCH -t {{ time_limit | default("1-00:00:00") }}
17+
#SBATCH -p {{ queue | default("p.general") }}
18+
{% endblock %}
19+
20+
{% block charm_ppn %}
21+
# Two thread for communication
22+
CHARM_PPN=$(expr ${SLURM_CPUS_PER_TASK} - 2)
23+
{% endblock %}
24+
25+
{% block list_modules %}
26+
source ${SPECTRE_HOME}/support/Environments/viper.sh
27+
spectre_load_modules
28+
29+
{% endblock %}
30+
31+
{% block run_command %}
32+
srun -n ${SLURM_NTASKS} ${SPECTRE_EXECUTABLE} \
33+
--input-file ${SPECTRE_INPUT_FILE} \
34+
++ppn ${CHARM_PPN} +pemap 0-62,64-126 +commap 63,127 \
35+
${SPECTRE_CHECKPOINT:+ +restart "${SPECTRE_CHECKPOINT}"}
36+
{% endblock %}

0 commit comments

Comments
 (0)