MATLAB is available on the training cluster Socrates and the large memory server Moneta. To use the program properly, you should load the module for it:

module load matlab/R2012a matlab/mcr

To have this environemnt set up for every time you login, give the command:

module initadd matlab/R2012a  matlab/mcr

While the MATLAB graphical user interface can be accessed via X11, it may be best to use the program without graphics, using the command:

matlab -nodisplay

It would be best to validate your environment via the GUI need to use X11 server - e.g. Mac OS X or Linux or with a third party Windows server)

The MATLAB Compiler will permit you to run MATLAB programs without the overhead of starting MATLAB (and the need to check out licenses). To run the compiler, the following steps need to be followed:

  1. Debug your program interactively with MATLAB, to ensure it works properly.
  2. Copy the .m file (or files) to the HPC computer.
  3. Load the module required 
  4. Compile the program using mcc. For example,
    mcc -R -nodisplay -R -singleCompThread -m myfile.m
  5. Create a single script file (e.g. Plato – Sample Script)  for each job
    with the command
    #PBS -l nodes=1:ppn=1
    and substituting
    for the line
    mpirun --hostfile $PBS_NODEFILE ./diffuse
  6. Use
    to submit each job.

MATLAB is also available on the WestGrid high performance consortium. The WestGrid site has information about using MATLAB on WestGrid.

Last modified on