Commit 2a1e952f authored by Cedric Jourdain's avatar Cedric Jourdain 🐵
Browse files

add template for strong scaling

parent 1c44111a
#!/bin/bash
#SBATCH -J specfem_small_benchmark_run_to_test_more_complex_Earth
#SBATCH --account=prpb85
#SBATCH --nodes=4
#SBATCH --ntasks-per-node=24
#SBATCH --cpus-per-task=2
#SBATCH --time=01:29:59
#SBATCH --output specfem_small_benchmark_run_to_test_more_complex_Earth-4Nodes-%j.out
#SBATCH --exclusive
#SBATCH -p batch
#set -e
source ../env/env_juwels
grep "^[^#;]" ../env/env_juwels
cat job_juwels_small_benchmark_run_to_test_more_complex_Earth_strong.slurm
cd $install_dir/specfem3d_globe/EXAMPLES/small_benchmark_run_to_test_more_complex_Earth
export SLURM_CPU_BIND=NONE
export I_MPI_PIN=1
#export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK
alias mpirun='srun'
time ./run_this_example.sh
echo "=========="
echo "config.log"
echo "=========="
cat $install_dir/specfem3d_globe/config.log
echo "========"
echo "make.log"
echo "========"
cat $install_dir/specfem3d_globe/make.log
echo "done"
ls -lrth $install_dir/specfem3d_globe/EXAMPLES/small_benchmark_run_to_test_more_complex_Earth/OUTPUT_FILES/output_*.txt
cat $install_dir/specfem3d_globe/EXAMPLES/small_benchmark_run_to_test_more_complex_Earth/OUTPUT_FILES/output_mesher.txt
cat $install_dir/specfem3d_globe/EXAMPLES/small_benchmark_run_to_test_more_complex_Earth/OUTPUT_FILES/output_solver.txt
sleep 2
#!/bin/bash -x
#SBATCH -J Test_case_A_strong
#SBATCH --account=prpb85
#SBATCH --nodes=48
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=24
#SBATCH --time=00:59:59
#SBATCH --partition=batch
#SBATCH --output=specfem_%x_juwels-%j.output
##SBATCH --acctg-freq=task=1
set -e
source ../env/env_juwels
grep "^[^#;]" ../env/env_juwels
cat job_juwels_test_case_A.slurm
echo "=========="
echo "config.log"
echo "=========="
cat $install_dir/TestCaseA/specfem3d_globe/config.log
echo "========"
echo "make.log"
echo "========"
cat $install_dir/TestCaseA/specfem3d_globe/make.log
cd $install_dir/TestCaseA/specfem3d_globe
export I_MPI_PMI_VALUE_LENGTH_MAX=1800
#Make sure that OMP_NUM_THREADS / KMP_HW_SUBSET = cpus-per-task
export KMP_HW_SUBSET=1T
export OMP_NUM_THREADS=24 #${SLURM_CPUS_PER_TASK}
export KMP_AFFINITY=granularity=core,compact
export FORT_BUFFERED=true
ulimit -s unlimited
MESHER_EXE=./bin/xmeshfem3D
SOLVER_EXE=./bin/xspecfem3D
# backup files used for this simulation
cp DATA/Par_file OUTPUT_FILES/
cp DATA/STATIONS OUTPUT_FILES/
cp DATA/CMTSOLUTION OUTPUT_FILES/
##
## mesh generation
##
sleep 2
echo
echo `date`
echo "starting MPI mesher"
echo
MPI_PROCESS=` echo "$SLURM_NNODES*$SLURM_NTASKS_PER_NODE" | bc -l`
echo "SLURM_NTASKS_PER_NODE = " $SLURM_NTASKS_PER_NODE
echo "SLURM_CPUS_PER_TASKS = " $SLURM_CPUS_PER_TASK
echo "SLURM_NNODES=" $SLURM_NNODES
echo "MPI_PROCESS $MPI_PROCESS"
echo "OMP_NUM_THREADS=$OMP_NUM_THREADS"
time srun -n ${MPI_PROCESS} ${MESHER_EXE}
echo " mesher done: `date`"
echo
##
## forward simulation
##
sleep 2
echo
echo `date`
echo starting run in current directory $PWD
echo
time srun -n ${MPI_PROCESS} ${SOLVER_EXE}
echo "====================="
echo `date`
ls -lrth $install_dir/TestCaseA/specfem3d_globe/OUTPUT_FILES/output_*.txt
cat $install_dir/TestCaseA/specfem3d_globe/OUTPUT_FILES/output_mesher.txt
cat $install_dir/TestCaseA/specfem3d_globe/OUTPUT_FILES/output_solver.txt
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment