-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding submit file for kelvin2 @ qub (#162)
This adds a submit script for Kelvin at qub: tested and working on kelvin on 20.12.24
- Loading branch information
1 parent
7fdc28e
commit 1bb04c8
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |