Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ### Configure sbatch job ###
- #SBATCH --account=rrg-mdiamond
- #SBATCH --output=slurm_submission.log ### log file for job submission step
- #SBATCH --time=00:30:00 ### max duration in HH:MM:SS
- #SBATCH --mem-per-cpu=40960M ### max memory in MB
- #SBATCH --job-name=MyWimpJob ### optional job identifier
- if [ $# -lt 3 ]; then
- echo "Usage: sbatch submit_1eh.sh PREFIXNAME VOLTAGE PARTICLETYPE"
- echo "e.g. sbatch submit_1eh.sh MyFolder 100 G4CMPDriftElectron"
- exit 0
- fi
- PREFIXNAME=$1
- VOLTAGE=$2
- PTYPE=$3
- ### Set up SuperSim environment ###
- ## Load Offline Release container module
- module load scdms
- ### Job execution ###
- ## Configure output directory on scratch
- SIMDIR="/home/${USER}/projects/def-mdiamond/${USER}"
- ##/home/${USER}/scratch/${USER}/${JOBNAME}"
- ## Create output directory if not existing
- mkdir -p ${SIMDIR}
- ## Logfile name for single job
- LOGFILENAME="${SIMDIR}/${PREFIXNAME}.log"
- ## Execute application from within the container
- srun --output=${LOGFILE} apptainer exec $SCDMS_IMAGE CDMS_SimDraw 1eh_gun.mac ${PREFIXNAME} ${VOLTAGE} ${PTYPE}
- if [$3==G4CMPDriftElectron]; then
- mv *00"$PREFIXNAME".root "$VOLTAGE"V_E_"$PREFIXNAME".root
- fi
Advertisement
Add Comment
Please, Sign In to add comment