You need to try the following sequence:
- oarsub -I # you MUST take at least one core on a cluster node
- module load MATLAB # as of May 2013, default module version is 2013a
- matlab -nodisplay # add as a parameter with -r whatever .m script you need to run
- “ver” # use it, if you want to see all the available toolboxes, or another command you want to run
Some very important guidelines:
- most people would prefer to try first
matlab –nosplash –nodesktop –nodisplay –singleCompThread
and adjust later on as needed; RTFM. - oarsub -I only gets you one core; better reserve more cores if you need such with ‘-l nodes=1” parameter OR, use “-singleCompThread”
- if you can cope with 200GBs per node, it is wise to set
TMPDIR=/tmp
on gaia’s SSDs or chaos’ HDDs, especially for generating many small files - you may need to do “ssh -X” in order to obtain the graphical environment working (it may be slower over distant network connections)
- if the X connection gets broken after some time, you will need to log out and reconnect; there is no known remedy to this as of yet
- Matlab Compiler is a Matlab Toolbox with its own documentation and is available on the cluster
- use Matlab’s Compiler to compile your code into a standalone executable file; this is important for scalability
DISPLAY
variable is known to cause issues in various situations; try “unset DISPLAY” as needed.- We do provide “Parallel Computing Toolbox” but not “Distributed Computing Server”, as of May 2013.
Helpful pages from Mathworks and other HPC sites using MATLAB:
- Matlab documentation
- Matlab Compiler
- Webinars related to HPC: Cluster Computing, Parallel Computing, GPUs, Big Data
- GPU programming by Mathworks
- NVIDIA’s webinar on MATLAB w/ CUDA
- A blog from an Oxford fellow on MATLAB with GPUs
- Best Practices for MATLAB GPU Coding
- [Additional resource on how to use the Matlab compiler](https://wikis.uit.tufts.edu/confluence/display/TuftsUITResearchComputing/Application+faq]()
- Example wrapper script for compiled executables
- About the Parallel Computing Toolbox
- An Matlab/MPI example
- Solution if you face Java heap space issues