#!/bin/bash #SBATCH -p gpu # targeting the gpu partition #SBATCH --ntasks-per-core=1 # disabling multithreading #SBATCH --gres=gpu:1 # ask for 1 GPU #SBATCH -J llg3d-gpu # job name #SBATCH --array=0-12 # creating a SLURM job array of 13 sub-jobs # Array of temperatures TEMPERATURES=(1000 1100 1200 1300 1350 1390 1400 1410 1450 1500 1550 1700 1900) # If the number of SLURM tasks is different from the size of TEMPERATURES, we exit if [ $SLURM_ARRAY_TASK_COUNT -ne ${#TEMPERATURES[@]} ] then echo "number of tasks != number of temperatures" echo "($SLURM_ARRAY_TASK_COUNT != ${#TEMPERATURES[@]})" exit 1 fi # JOB TASK ID with 3 zero padding id=$(printf %03d $SLURM_ARRAY_TASK_ID) # Run temperature let "temperature = ${TEMPERATURES[$SLURM_ARRAY_TASK_ID]}" # Activating the Python virtual environment source ../.venv/bin/activate # Launching the computation llg3d --solver opencl --N 20000 --start_averaging 12000 --Jx 3000 --dx 1e-9 --T $temperature --result_file run_T${temperature}K.npz