Guest User

1 Electron/Hole Submit Script

a guest
Oct 1st, 2024
3
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. #!/bin/bash
  2. ### Configure sbatch job ###
  3. #SBATCH --account=rrg-mdiamond
  4. #SBATCH --output=slurm_submission.log ### log file for job submission step
  5. #SBATCH --time=00:30:00 ### max duration in HH:MM:SS
  6. #SBATCH --mem-per-cpu=40960M ### max memory in MB
  7. #SBATCH --job-name=MyWimpJob ### optional job identifier
  8.  
  9. if [ $# -lt 3 ]; then
  10. echo "Usage: sbatch submit_1eh.sh PREFIXNAME VOLTAGE PARTICLETYPE"
  11. echo "e.g. sbatch submit_1eh.sh MyFolder 100 G4CMPDriftElectron"
  12. exit 0
  13. fi
  14.  
  15. PREFIXNAME=$1
  16. VOLTAGE=$2
  17. PTYPE=$3
  18.  
  19. ### Set up SuperSim environment ###
  20. ## Load Offline Release container module
  21. module load scdms
  22.  
  23. ### Job execution ###
  24. ## Configure output directory on scratch
  25. SIMDIR="/home/${USER}/projects/def-mdiamond/${USER}"
  26. ##/home/${USER}/scratch/${USER}/${JOBNAME}"
  27. ## Create output directory if not existing
  28. mkdir -p ${SIMDIR}
  29. ## Logfile name for single job
  30. LOGFILENAME="${SIMDIR}/${PREFIXNAME}.log"
  31.  
  32. ## Execute application from within the container
  33. srun --output=${LOGFILE} apptainer exec $SCDMS_IMAGE CDMS_SimDraw 1eh_gun.mac ${PREFIXNAME} ${VOLTAGE} ${PTYPE}
  34.  
  35. if [$3==G4CMPDriftElectron]; then
  36. mv *00"$PREFIXNAME".root "$VOLTAGE"V_E_"$PREFIXNAME".root
  37. fi
Advertisement
Add Comment
Please, Sign In to add comment