Matlab

First you must load the MATLAB module with the module load matlab command. Then the batch script tells the scheduler that your job will use the default single core, request 4gb of memory, and request a single MATLAB license.

$ module load matlab
$ cat matlab-job.txt
#!/bin/sh
#SBATCH --mail-type=ALL
#SBATCH --mail-user=uniqname@umich.edu
#SBATCH --license=MATLAB
#SBATCH --time=1-0
#SBATCH --job-name=test_matlab_job
#SBATCH --mem-per-cpu=4000

matlab -nodisplay -nodesktop -r matlab_file