...
An example job submission script (matlabjob.sh) is provided below. It requests 48 processors, 190GB of memory, 400GB of local disk space for 10 2 hours in the normal queue and tells the job to mount /g/data/ab01 and /scratch/ab01 project folder into it. Within the job it passes the number of CPUs as the number of matlabWorkers and the PBS_JOBFS folder as the output directory outputDir,
both of which are variables used in the matlab script mfile.m
.
...
Code Block | ||
---|---|---|
| ||
#!/bin/bash #PBS -q normal #PBS -l walltime=02:00:00 #PBS -l ncpus=48 #PBS -l mem=190GB #PBS -l jobfs=400GB #PBS -l storage=gdata/ab01+scratch/ab01 #PBS -l software=matlab_<institution> #PBS -l wd module load matlab/R2019b module load matlab_licence/<institution> # Must include `#PBS -l storage=scratch/ab12+gdata/yz98` if the job # needs access to `/scratch/ab12/` and `/g/data/yz98/`. Details on # https://opus.nci.org.au/display/Help/PBS+Directives+Explained. matlab -nodisplay -nosplash -r "outputDir='$PBS_JOBFS',numberOfWorkers=$PBS_NCPUS, mfile, exit" > /g/data/ab01/$USER/job_logs/$PBS_JOBID.log |
Please note, the flag -nodisplay
passed to matlab
enables running without the GUI, while the flag -nosplash
disables the display of the Matlab logo.
...
Code Block | ||
---|---|---|
| ||
#!/bin/bash #PBS -q normal #PBS -l ncpus=1 #PBS -l walltime=00:02:00 #PBS -l mem=250MB #PBS -l storage=gdata/ab01+scratch/ab01 #PBS -l software=matlab_<institution> #PBS -l wd module load matlab/R2019b module load matlab_licence/<iname> # Must include `#PBS -l storage=scratch/ab12+gdata/yz98` if the job # needs access to `/scratch/ab12/` and `/g/data/yz98/`. Details on # https://opus.nci.org.au/display/Help/PBS+Directives+Explained. matlab -nosplash -nojvm -singleCompThread < mfile.m > /g/data/ab01/$USER/job_logs/$PBS_JOBID.log |
...