Registration Guide Register for HPC Access to HPCNew User Guide How to Run Batch Jobs
Portal User Guide
About the Service Subscribe to Pay-Per-Use Service Subscribe to Condominium Service Terms and ConditionsUser Guide
High Performance Workspace Service Utility Storage ServiceResearch Data Management ServiceCentre for Computational Science & Engineering
| Need help? | ||
![]() |
||
-
How to start MATLAB?
Matlab interface can be run on MobileVisLab or xterm window on Atlasx cluster open from HPC/SGD portal. Type 'matlab' at the command line prompt to start the Matlab interface. To quite Matlab at any time, enter 'exit' at the Matlab prompt.
# matlab & -
How to run large and long CPU hours MATLAB jobs?
Matlab jobs that are large and need longer computing time to run can be submitted to LSF batch queue(s) to run as batch mode. As Matlab is not a parallelised program by default, batch Matlab jobs shall be submitted to serial queue matlab for memory usage less than 4GB, and large memory queues such as atlas4_large, atlas5_large, atlas6_large and atlas7_large. The following is a sample job submission command.
For a matlab program takes less than 4GB memory, use queue matlab:
# bsub -q matlab -o stdout.o "matlab -nojvm -nosplash -nodisplay -r prog1"
For a matlab program takes more than 4GB memory, use any large queue:
# bsub -q atlas7_large -o stdout.o "matlab -nojvm -nosplash -nodisplay -r prog1"
where- "prog1" is the filename of your Matlab program "prog1.m" without the extension ".m";
- "-nojvm -nosplash -nodisplay" are necessary flags to make batch Matlab running properly.
The Matlab program "prog1.m" should define all the tasks you need to execute properly and completely, and MUST contain, as a last command, the "exit" command.
-
How many Matlab jobs can I submit and run?
You can submit multiple Matlab jobs to batch queue linux64 and large memory queues such as atlas7_large etc. However, due to the license restriction, each user can have up to 5 Matlab jobs running at a time. If your Matlab program calls specific Toolbox(es), it may depend on the available license for the toolbox(es).
-
How to run more Matlab jobs using Matlab Compiler RUNTIME (MCR)?
You can use the Matlab Compiler RUNTIME, or MCR, to compile your Matlab program into standalone executable files, then you can run the program independently without the need of the Matlab and its license.
Assume your main Matlab program is main2.m, you can compile it via:
# matlab-mcc -m main2.m
After the compilation is completed, it will generate two files in the current directory: main2 and run_main2.sh.
Now you can run the compiled executable via:
# matlab-run ./run_main2.sh
The execution takes awhile (approximate one minute) in preparing the MCR environment. Once the program starts running, it will be executed seamlessly as it is in Matlab platform.
You can also submit the compiled program to run in batch queues. For example:
# bsub -q linux64 -o stdout.o "matlab-run ./run_main2.sh"
-
How to run Matlab jobs in parallel?
You have to parallelize your Matlab codes first then you can run your Matlab program on multiple CPU cores to speed up the computation. Matlab provides a Parallel Computing Toolbox, where you can find out more details and some useful tutorials on how to parallelize Matlab codes. Please take note that not all Matlab codes can be parallelized. You need to study it and try it out.
-
How to run Matlab on GPU?
Matlab GPU computing is supported on the GPU cluster Gold. Matlab GPU computing is provided by its Parallel Computing Toolbox, through which you can use the Matlab language to code your program make use of GPUs in accelerating your applications. Matlab provides details and some useful tutorials regards Matlab GPU computing support at its webpage.
![]()
Last Modified in Dec 2012. Copyright - All Rights Reserved.
