How to Submit a Matlab Job
To schedule a job, you will need to write a SLURM batch script for your job. See the example below. Save your script as jobname.sbatch. Once you have written your script you will need to run it.
Run a SLURM Batch Script:
[user@Head ~]$ sbatch jobname.sbatch
Example SLURM Batch Script:
#!/bin/bash
#SBATCH –job-name=test
#SBATCH –output=matlab_simple.out
#SBATCH –error=matlab_simple.err
#SBATCH –time=00:10:00
#SBATCH –nodes=4
#SBATCH –ntasks=4
# Load Module
module load matlab/2017a
# Kick off matlab
matlab -nodisplay < matlab_simple.m