diff --git a/slurm_scripts/execute.script b/slurm_scripts/execute.script index ae29b33..4beaa0b 100755 --- a/slurm_scripts/execute.script +++ b/slurm_scripts/execute.script @@ -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 diff --git a/slurm_scripts/pt.script b/slurm_scripts/pt.script index db0d0d6..d493df6 100755 --- a/slurm_scripts/pt.script +++ b/slurm_scripts/pt.script @@ -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