Make changes
This commit is contained in:
64
slurm_scripts/execute.script
Executable file
64
slurm_scripts/execute.script
Executable file
@@ -0,0 +1,64 @@
|
||||
#!/bin/bash
|
||||
|
||||
usage() {
|
||||
>&2 cat << EOF
|
||||
Usage: $0
|
||||
[ -h | --help ]
|
||||
[ --start-temp input ]
|
||||
[ --end-temp input ]
|
||||
[ --points input ]
|
||||
[ --samples input ]
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Defaults
|
||||
start_temp=2.1
|
||||
end_temp=2.4
|
||||
points_temp=40
|
||||
samples=1000000
|
||||
array_arg=20
|
||||
time_arg="0-00:30:00"
|
||||
|
||||
VALID_ARGS=$(getopt -o h --long help,start-temp:,end-temp:,points:,samples:,array:,time: -- "$@")
|
||||
if [[ $? -ne 0 ]]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
eval set -- ${VALID_ARGS}
|
||||
while :
|
||||
do
|
||||
case "$1" in
|
||||
-h | --help)
|
||||
usage
|
||||
shift
|
||||
;;
|
||||
--start-temp)
|
||||
start_temp=$2
|
||||
shift 2
|
||||
;;
|
||||
--end-temp)
|
||||
end_temp=$2
|
||||
shift 2
|
||||
;;
|
||||
--points)
|
||||
points=$2
|
||||
shift 2
|
||||
;;
|
||||
--samples)
|
||||
samples=$2
|
||||
shift 2
|
||||
;;
|
||||
--array)
|
||||
array_arg=$(echo "${2// /}")
|
||||
shift 2
|
||||
;;
|
||||
--time)
|
||||
time_arg=$2
|
||||
shift 2
|
||||
;;
|
||||
--) shift; break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
sbatch --array=$array_arg --time=$time_arg ./jobs/pt.script $start_temp $end_temp $points_temp $samples
|
||||
22
slurm_scripts/pt.script
Executable file
22
slurm_scripts/pt.script
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
#SBATCH --account=ec54
|
||||
#SBATCH --job-name=pt
|
||||
#SBATCH --ntasks=10
|
||||
#SBATCH --mem-per-cpu=1G
|
||||
#SBATCH --cpus-per-task=10
|
||||
|
||||
set -o errexit # Exit the script on any error
|
||||
set -o nounset # Treat any unset variables as an error
|
||||
|
||||
module --quiet purge # Reset the modules to the system default
|
||||
module load Armadillo/11.4.3-foss-2022b
|
||||
module load OpenMPI/4.1.5-GCC-12.3.0
|
||||
|
||||
# Args
|
||||
start_temp=$1
|
||||
end_temp=$2
|
||||
points_temp=$3
|
||||
samples=$4
|
||||
|
||||
srun ./phase_transition_mpi $start_temp $end_temp $points_temp ${SLURM_ARRAY_TASK_ID} $samples 0
|
||||
17
slurm_scripts/pt_narrow.script
Normal file
17
slurm_scripts/pt_narrow.script
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
#SBATCH --account=ec54
|
||||
#SBATCH --job-name=pt_narrow
|
||||
#SBATCH --time=0-02:00:00
|
||||
#SBATCH --ntasks=8
|
||||
#SBATCH --mem-per-cpu=1G
|
||||
#SBATCH --cpus-per-task=10
|
||||
|
||||
set -o errexit # Exit the script on any error
|
||||
set -o nounset # Treat any unset variables as an error
|
||||
|
||||
module --quiet purge # Reset the modules to the system default
|
||||
module load Armadillo/11.4.3-foss-2022b
|
||||
module load OpenMPI/4.1.5-GCC-12.3.0
|
||||
|
||||
srun ./phase_transition_mpi 2.25 2.35 40 10000000
|
||||
Reference in New Issue
Block a user