-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathopenmc_sub.sh
executable file
·48 lines (43 loc) · 1.27 KB
/
openmc_sub.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash -l
#SBATCH -A dp163
#SBATCH -p cosma7
#SBATCH -e errors
#SBATCH -o output
#SBATCH -D ./
#SBATCH --export=ALL
#SBATCH -N 1
#SBATCH -n 28
#SBATCH -t 15:00:00
module purge
module load neutronics
#EXEC="python convert_tendl_rand.py -b"
EXEC="openmc -s $SLURM_NTASKS"
#
# Should not need to edit below this line
#
echo ========================================================= echo SLURM job: submitted date = `date`
date_start=`date +%s`
echo ========================================================= echo Job output begins
echo -----------------
echo
hostname
# $SLURM_NTASKS is defined automatically as the number of processes in the # parallel environment.
echo Running with $SLURM_NTASKS cores
#mpirun -np $SLURM_NTASKS $EXEC
$EXEC
echo Done with OPENMC, processing
mv statepoint.$3.h5 ../statepoints-$1/statepoint.$2.h5
cd ..
rm -r $1-$2
echo
echo ---------------
echo Job output ends
date_end=`date +%s`
seconds=$((date_end-date_start))
minutes=$((seconds/60))
seconds=$((seconds-60*minutes))
hours=$((minutes/60))
minutes=$((minutes-60*hours))
echo =========================================================
echo SLURM job: finished date = `date`
echo Total run time : $hours Hours $minutes Minutes $seconds Seconds echo =========================================================