Matlab

Revision as of 15:53, 1 July 2016 by Botto (talk | contribs) (Created page with "== Description == '''Matlab''' integrates mathematical computing, visualization, and a powerful language to provide a flexible environment for technical computing. The open a...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Matlab integrates mathematical computing, visualization, and a powerful language to provide a flexible environment for technical computing. The open architecture makes it easy to use Matlab and its companion products to explore data, create algorithms, and create custom tools that provide early insights and competitive advantages.

Version

  • r2016a

Authorized Users

  • CIRCE account holders
  • RRA account holders
  • SC account holders

Platforms

  • CIRCE cluster
  • RRA cluster
  • SC cluster
  • Workstation/PC

License Information

Matlab is available on the cluster for use any current USF student or faculty member. Matlab can also be installed to individual workstations, laptops, and Macs.

To request a copy of the license file and File Installation Key, please send a request to help@usf.edu

Available Products and Toolboxes

  • MATLAB
  • Simulink
  • Bioinformatics Toolbox
  • Communications System Toolbox
  • Control System Toolbox
  • Curve Fitting Toolbox
  • DSP System Toolbox
  • Data Acquisition Toolbox
  • Image Processing Toolbox
  • Instrument Control Toolbox
  • Mapping Toolbox
  • Optimization Toolbox
  • Parallel Computing Toolbox
  • Signal Processing Toolbox
  • SimMechanics
  • Simscape
  • Simulink Control Design
  • Stateflow
  • Statistics Toolbox
  • Symbolic Math Toolbox

Additional Toolboxes with Limited Availability

  • Database Toolbox++
  • Distributed Computing Server
  • Fuzzy Logic Toolbox
  • Global Optimization Toolbox ++
  • Image Acquisition Toolbox ++
  • MATLAB Compiler ++
  • Model Predictive Control Toolbox ++
  • Neural Network Toolbox ++
  • Partial Differential Equation Toolbox
  • System Identification Toolbox ++
  • Wavelet Toolbox

++NOTE: Less than 5 licenses available

Toolboxes with Restricted Availability

  • Computer Vision System Toolbox
  • Fixed-Point Designer
  • HDL Coder
  • Matlab Coder
  • RF Toolbox
  • SimElectronics
  • SimPowerSystems
  • Simulink 3D Animation +++
  • Simulink Coder +++
  • Simulink Design Optimization

+++ NOTE: Only Available with versions r2013a and previous

Installation

  • NOTE: If you are off-campus, you MUST be connected to the USF VPN (https://vpn.usf.edu) prior to installing/running Matlab.
  1. Download the appropriate Matlab R2016a Installation ISO disk image: http://mirror.rc.usf.edu/isos/Matlab/R2016a/
  2. For Windows users, you can burn the ISO image to a CD/DVD.
  3. For Mac users, Finder will handle the ISO image by simply double-clicking it
  4. For Linux users, your file manager should provide multiple options for working with the ISO file
  5. The Matlab installation instructions for all platforms are located here: http://www.mathworks.com/help/install/ug/install-and-activate-without-an-internet-connection.html

Running Matlab on CIRCE

Jobs Shorter than 30 Minutes in Length

Establishing a GUI connection to CIRCE/SC

To use Matlab, you will need to connect to CIRCE/SC with GUI redirection, either using:

  • CIRCE/SC Desktop Environment
  • SSH with X11 redirection
    • If connecting from OSX or Linux via SSH, please ensure that you use one of the following commands to properly redirect X11:
      • [user@localhost ~]$ ssh -X circe.rc.usf.edu
        or
      • [user@localhost ~]$ ssh -X sc.rc.usf.edu

Once connected to CIRCE, you can open Matlab using the steps below:

[user@login0 ~]$ module add apps/matlab/r2016a
[user@login0 ~]$ matlab

More Job Information

See the following for more detailed job submission information:

Jobs Longer than 20 Minutes in Length

To run Matlab jobs on CIRCE, users will need to submit “batch jobs” to the scheduling environment if their jobs takes more than 20 minutes to run on a standard PC.

Serial Batch Jobs

If, for example, you have a Matlab script file (named “matlab-test.m”) with all your functions defined in it, you would set up a submit script like this:

#!/bin/bash
#
#SBATCH --comment=matlab-test
#SBATCH --ntasks=1
#SBATCH --job-name=matlab-test
#SBATCH --output=output.%j.matlab-test
#SBATCH --time=00:10:00

#### SLURM 1 processor Matlab test to run for 10 minutes.

module load apps/matlab/r2016a
matlab -nodisplay -nosplash -r "matlab-test" 

 
Next, you can change to your job’s directory, and run the sbatch command to submit the job:

[user@login0 ~]$ cd my/jobdir
[user@login0 jobdir]$ sbatch ./matlab-test.sh
  • You can view the status of your job with the “squeue -u <username>” command

If you would rather call a different function, make sure the file which contains it is named after the function. For example, if you want to call function ‘addtwo’, make sure it is defined in a file named ‘addtwo.m’.

Matlab will automatically detect any other .m files in the same directory and be able to execute functions within those files.

Parallel Batch Jobs

Parallel batch jobs can be submitted using a script similar to the one below.

#!/bin/bash
#
#SBATCH --nodes=1
#SBATCH --ntasks=10
#SBATCH --job-name=matlab-smp-test
#SBATCH --output=output.%j.matlab-smp-test
#SBATCH --mem=10240
#SBATCH --time=04:00:00

#### SLURM 10 processor Matlab test to run for 4 hours.

module load apps/matlab/r2016a
matlab -nodisplay -r "test_parallel" 

In this example, you would have a Matlab script named test_parallel.m, and in it should be defined a ‘parpool’. Be sure that the ‘—ntasks’ defined in your submit script is 2 more than the number requested using ‘parpool’. In this case, ‘parpool’ would have been set at 8, therefore ‘—ntasks’ is defined as 10. The ‘—mem’ request is the amount of memory to reserve for the job, and is set to 10 gigabytes here. This can be adjusted as necessary.

 
Next, you can change to your job’s directory, and run the sbatch command to submit the job:

[user@login0 ~]$ cd my/jobdir
[user@login0 jobdir]$ sbatch ./matlab-test.sh
  • You can view the status of your job with the “squeue -u <username>” command


Documentation

Home Page, User Guides, and Manuals

More Job Information

See the following for more detailed job submission information:

Reporting Bugs

Report bugs with Matlab to the IT Help Desk: rc-help@usf.edu