#!/bin/bash -l #SBATCH --job-name=matlab_multithread #SBATCH --mail-user=user@uni-hannover.de #SBATCH --mail-type=BEGIN,END,FAIL #SBATCH --nodes=1 #SBATCH --ntasks=4 #SBATCH --mem-per-cpu=4G #SBATCH --time=00:20:00 #SBATCH --output matlab_multithread-job_%j.out # Compute node the job ran on echo "Job ran on:" $HOSTNAME # Load modules module load MATLAB/2017a # Change to work dir: cd $SLURM_SUBMIT_DIR # Log file name LOGFILE=$(echo $SLURM_JOB_ID | cut -d"." -f1).log # The program to run matlab -nodesktop -nosplash < hello.m > $LOGFILE 2>&1