Skip to content

Commit

Permalink
Adding submit file for kelvin2 @ qub (#162)
Browse files Browse the repository at this point in the history
This adds a submit script for Kelvin at qub: tested and working on
kelvin on 20.12.24
  • Loading branch information
fmcneill49 authored Jan 19, 2025
1 parent 7fdc28e commit 1bb04c8
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions scripts/artis-kelvin2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash -x
#SBATCH --ntasks=1024
#SBATCH --ntasks-per-node=128
#SBATCH --time=24:00:00
#SBATCH --partition=k2-math-physics
#SBATCH --mail-type=ALL
##SBATCH --mail-user=fmcneill07@qub.ac.uk

module load libs/gcc/14.1.0
module load gsl/2.8/gcc-14.1.0
module load compilers/gcc/14.1.0
module load mpi/openmpi/5.0.3/gcc-14.1.0
module load apps/python3/3.12.4/gcc-14.1.0

module list

cd $SLURM_SUBMIT_DIR

echo "CPU type: $(c++ -march=native -Q --help=target | grep -- '-march= ' | cut -f3)"

hoursleft=$(python3 ./artis/scripts/slurmjobhoursleft.py ${SLURM_JOB_ID})
echo "$(date): before srun sn3d. hours left: $hoursleft"
# time srun --hint=nomultithread -- ./sn3d -w $hoursleft > out.txt
time mpirun -- ./sn3d -w $hoursleft > out.txt
hoursleftafter=$(python3 ./artis/scripts/slurmjobhoursleft.py ${SLURM_JOB_ID})
echo "$(date): after srun sn3d finished. hours left: $hoursleftafter"
hourselapsed=$(python3 -c "print($hoursleft - $hoursleftafter)")
echo "hours of runtime: $hourselapsed"
cpuhrs=$(python3 -c "print($SLURM_NTASKS * $hourselapsed)")
echo "ntasks: $SLURM_NTASKS -> CPU core hrs: $cpuhrs"

mkdir ${SLURM_JOB_ID}.slurm
./artis/scripts/movefiles.sh ${SLURM_JOB_ID}.slurm

if grep -q "RESTART_NEEDED" "output_0-0.txt"
then
sbatch ./artis/scripts/artis-kelvin2.sh
# sbatch $SLURM_JOB_NAME
fi

if [ -f packets00_0000.out ]; then
sbatch ./artis/scripts/exspec-gzip-kelvin2.sh
fi

0 comments on commit 1bb04c8

Please sign in to comment.