HPC Matlab FAQ

Supercomputer documentation is always a work in progress! Please email questions, corrections, or suggestions to the HPC support team at help-hpc@uky.edu as usual. Thanks!

For help getting started with Matlab, see the Matlab README page.

[Coming Soon]

Frequently Asked Questions

1. How do I submit a Matlab job?

Under contruction

Build a job script to load the Matlab module. For more information about job scripts, see Getting Started - Job Scripts. Here is a sample job script:

#!/bin/bash
#SBATCH -n16
#SBATCH -t 24:00:00
#SBATCH --job-name=Matlabtest
module load matlab/R2012a
matlab -nodisplay -r "mymatlabprogram, exit"

This script requests 16 processors (one node) and one day (24 hours) of run time. The modules shown in the module load command are examples. Use the module avail command to see which versions of Matlab are available, and choose the one you need.

Use the sbatch command to submit your job. If the job script file were named matlab1.sh, then you could use the command sbatch matlab1.sh to submit it. You can specify sbatch directives in the job script or on the sbatch command itself. If a directive is specified in both places, the value on the sbatch command will be used.

2. How do I run Matlab on GPUs?

Under contruction

Build a job script to load the Matlab module. For more information about job scripts, see Getting Started - Job Scripts. Here is a sample job script:

#!/bin/bash
#SBATCH -n16
#SBATCH -t 24:00:00
#SBATCH --job-name=Matlabtest
module load matlab/R2012a
matlab -nodisplay -r "mymatlabprogram, exit"

This script requests 16 processors (one node) and one day (24 hours) of run time. The modules shown in the module load command are examples. Use the module avail command to see which versions of Matlab are available, and choose the one you need.

Use the sbatch command to submit your job. If the job script file were named matlab1.sh, then you could use the command sbatch matlab1.sh to submit it. You can specify sbatch directives in the job script or on the sbatch command itself. If a directive is specified in both places, the value on the sbatch command will be used.

859-218-HELP (859-218-4357) 218help@uky.edu

Text Only Options

Top of page


Text Only Options

Open the original version of this page.

Usablenet Assistive is a UsableNet product. Usablenet Assistive Main Page.