MATLAB

From Montana Tech Computer Science Department
Jump to: navigation, search

MATLAB and the Parallel Computing Toolbox is installed. The Distributed Computing Server is not installed, so calculations are limited to single compute nodes. MATLAB jobs that do and do not use the Parallel Computing Toolbox can be submitted to TORQUE via a script containing:

#!/bin/sh
#PBS -l nodes=1:ppn=12
#PBS -N MatlabJob
#PBS -d /home/mtech/username
#PBS -S /bin/bash
#PBS -j oe
#PBS -l walltime=00:15:00
matlab -nodesktop -nosplash -r "your_matlab_program(input_parameters);quit;"


Since MATLAB is multithreaded, you should request 12 ppn even if you are not using the Parallel Computing Toolbox. Even for parallel MATLAB jobs, the matlabpool is limited to 12 workers.

Use qsub to submit your job script to TORQUE.

qsub matlabjob

where matlabjob contains the above script updated with your program and username info.

If you wish to run MATLAB interactively without the Desktop GUI, start an interactive job on a compute node with:

qsub -I -l nodes=1:ppn=12

This will return with a command prompt on a compute node, for example:

[smith@scyld Matlab]$ qsub -I -l nodes=1:ppn=12
qsub: waiting for job 463.hpc to start
qsub: job 463.hpc ready
[smith@n0 ~]$

The MATLAB Desktop GUI is currently limited to the management node. You will need to either use NX or run an xserver. Please respect other users and avoid long computational runs on the management node if other users are on the system.