Add account parameter

This commit is contained in:
Cory Balaton 2023-12-03 16:43:09 +01:00
parent 83468938bb
commit b9a77e5138
No known key found for this signature in database
GPG Key ID: 3E5FCEBFD80F432B
2 changed files with 15 additions and 4 deletions

View File

@ -8,6 +8,9 @@ Usage: $0
[ --end-temp input ]
[ --points input ]
[ --samples input ]
[ --array input ]
[ --time input ]
[ --account input (required) ]
EOF
exit 1
}
@ -19,8 +22,9 @@ points_temp=40
samples=1000000
array_arg=20
time_arg="0-00:30:00"
account=""
VALID_ARGS=$(getopt -o h --long help,start-temp:,end-temp:,points:,samples:,array:,time: -- "$@")
VALID_ARGS=$(getopt -o h --long help,start-temp:,end-temp:,points:,samples:,array:,time:,account: -- "$@")
if [[ $? -ne 0 ]]; then
usage
fi
@ -57,8 +61,16 @@ do
time_arg=$2
shift 2
;;
--account)
account=$2
shift 2
;;
--) shift; break ;;
esac
done
sbatch --array=$array_arg --time=$time_arg ./jobs/pt.script $start_temp $end_temp $points_temp $samples
if [ -z "$account" ]; then
usage
fi
sbatch --array=$array_arg --time=$time_arg --account=$account ./slurm_scripts/pt.script $start_temp $end_temp $points_temp $samples

View File

@ -1,6 +1,5 @@
#!/bin/bash
#SBATCH --account=ec54
#SBATCH --job-name=pt
#SBATCH --ntasks=10
#SBATCH --mem-per-cpu=1G
@ -19,4 +18,4 @@ end_temp=$2
points_temp=$3
samples=$4
srun ./phase_transition_mpi $start_temp $end_temp $points_temp ${SLURM_ARRAY_TASK_ID} $samples 0
srun ./bin/phase_transition_mpi $start_temp $end_temp $points_temp ${SLURM_ARRAY_TASK_ID} $samples 0