Supercomputing Networking Research Education Ohio Supercomputer Center Site Map Staff Directory Support
Supercomputing image

MATLAB

Introduction

MATLAB is a technical computing environment for high-performance numeric computation and visualization. MATLAB integrates numerical analysis, matrix computation, signal processing, and graphics in an easy-to-use envionment where problems and solutions are expressed just as they are written mathematically--without traditional programming.

The following tool boxes are available:

Simulink Sim Mechanics
Bioinformatics PDE
Curve Fitting Stateflow
Control Signal
Data Acq Simscape
Signal Blocks Statistics
Instr Control DCS
Image  

Version

Version R2009b is currently the default used at OSC. Additionally, previous versions from R2006b and newer are also available if required.

Availability

Ohio State University students and faculty: MATLAB is available on the Bale Cluster and the Glenn Cluster.
Non Ohio State University students/faculty: MATLAB is currently unavailable due to changes in The MathWorks licensing structure. A solution is being investigated and will be posted to this website when it becomes available.

Use of MATLAB requires validation. To obtain validation please complete and return the "Agreement for non-OSU/OSC use of Matlab DCS." This can be obtained from your site consultant or from the file matlab_dcs.txt located in the Academic Agreement Forms.

Usage

Initialization:

module load matlab

Running Interactively:

The following command will start an interactive, command line version of MATLAB on either cluster system:

matlab -nodisplay

This runs matlab on the login node you are connected to. As the login node is a shared resource, running scripts that require significant computational resources will impact the usability of the cluster for others. As such, you should not use interactive MATLAB sessions for any significant computation. If your script requires significant time, CPU power, or memory, you should run your code via the batch system (see the next section).

Running in Batch (non-interactively):

MATLAB should be run via the batch system for any scripts that are computationally intensive, long running, or memory intensive. In order to run MATLAB via the batch system, you will require a batch submission script and a MATLAB M-file containing the script that will be run via the batch system. Below is an example batch submission script and a simple M-file. The batch script runs the M-file via the batch system.

Example batch submission script, script.job:

#PBS blah
#PBS -l walltime=00:10:00
#PBS -l nodes=1:ppn=1
#PBS -N matlab_tutor
#PBS -j oe
module load matlab
matlab -nodisplay -r hello -logfile output.txt
# end of example file

Example M-file, hello.m:

%Example M-file for Hello World
disp 'Hello World'
exit
% end of example file

Create these two files in a working directory on Glenn. In order to run hello.m via the batch system, submit the script.job file with the following command:

qsub script.job

This will run hello.m via the batch system, and all output from the running of the script will be saved in the output.txt file.

Documentation

Official PDF documentation can be obtained from The MathWorks website by going to the following location: http://www.mathworks.com/access/helpdesk/help/techdoc/