sbatch
(followed by the name of the SLURM script).squeue -u $USER
to see all your jobs in the queue (or replace $USER by an username); R at ST means that your job is currently running.squeue --format="%.18i %.9P %.30j %.8u %.8T %.10M %.9l %.6D %R" --me
to extend the length of the output of squeue.scancel -u $USER
to scancel all your jobs or scancel
followed by a jobid to cancel the corresponding job.sacct -S now-7days -X --user=$USER --format="jobid,jobname,user,account,partition,AllocCPUS,AllocNodes,State,ConsumedEnergy,Elapsed,TimeLimit,ExitCode"
to gain information about all your jobs during the last 7 days.#!/bin/bash
#SBATCH --job-name=name ### the name of your job
#SBATCH --output=%x_%j.out ### the output file for errors etc.
#SBATCH --nodes=1 ### number of nodes
#SBATCH --ntasks=1 ### number of (MPI) tasks needed
#SBATCH --partition=small ### partition (small, small_shared, small_fat, dev)
#SBATCH --cpus-per-task=72 ### number of threads per task (OMP threads)
#SBATCH --time=24:00:00 ### maximum wall clock limit for job execution
oplrun myModel.mod myData.dat > log.txt
oplrun myModel.mod myData.dat > log.txt
such that these problems are solved one after the other.sbatch
(followed by the name of the corresponding SLURM script). Or you could use a bash script (chmod +x myBash
makes the bash script myBash executable, ./myBash
executes it) to start the different SLURM scripts. The following bash script starts runs for 30 different problems (each problem is indentical except that a different data file is used with j = 1, …, 30 with start p=1 and end P=30) and different numbers of threads (i.e., i = 1, 2, 4, 8, 16, 32, 64 with start t=1 and end T=72).#!/bin/bash
t=1
T=72
p=1
P=30
for (( j=$p ; j<=$P ; j++ ));
do
for (( i=$t ; i<=$T ; i*=2 ));
do
sbatch --job-name="threads$i.problem$j" --export=ALL,i="$i",j="$j" var_param_oplrun.slurm
done
done
The SLURM script var_param_oplrun.slurm is identical to the SLURM script from above, except that the lineoplrun myModel.mod myData.dat > log.txt
is changed tooplrun -D myThreads=$i myModel.mod myData$j.dat > log$i.$j.txt
.
oplrun -e myModel.mps myModel.mod myData.dat
int myThreads = ...;
int myParallelmode = ...;
execute
{
cplex.threads = myThreads;
cplex.parallelmode = myParallelmode;
}
oplrun myModel.mod myData.dat -D myThreads=4 -D myParallelmode=1
to run oplrun with 4 threads (default setting is 0 (zero) or equivalently without setting this parameter which leads to min(32, number of cores of the machine) threads, i.e., 32 threads on HSUper) in deterministic mode.oplrun -v -profile myModel.mod myData.dat
to run oplrun in verbose mode and output in addition profiler information.