MATLAB¶
Description¶
MATLAB is a high-level language and interactive environment that enables you to perform computationally intensive tasks faster than with traditional programming languages such as C, C++, and Fortran.
Environment Modules¶
Run module spider matlab
to find out what environment modules are available for this application.
Environment Variables¶
- HPC_MATLAB_DIR - installation directory
- HPC_MATLAB_BIN - executable directory
Additional Usage Information¶
MATLAB Use Policy¶
Note
Make an effort to compile MATLAB scripts. Many toolkit licenses are almost always checked out.
- Do not run MATLAB or compiled MATLAB executables interactively on the login servers. Long running (more than 10 minutes) MATLAB scripts must be compiled and submitted to the scheduler.
- Do not idle MATLAB or import and not use MATLAB toolkits. The number of UF licenses is limited and preventing other users from loading MATLAB or toolkits while not actively using them yourself may result in the suspension of your HiPerGator account.
Toolbox Licenses¶
UFIT Research Computing does not purchase software licenses. All MATLAB licenses (including the compiler) come from the campus-wide licensing server. For this reason, it is sometimes difficult to load a particular toolkit in high demand or MATLAB may take a long time to start. If your research depends on MatLab and you do not want to be delayed by licensing issues, you should consider purchasing MATLAB toolkit licenses for your personal or group use. We can set up a custom MATLAB install for your group on HiPerGator, which will restrict the configured license to your group.
The complete list of MATLAB toolboxes can be found on the MATLAB Add-On Availability website
We provide a matlab_show_license_use
command on HPG in all matlab environment modules. This
command will show you the actual list of toolkits available via the UF MATLAB licensing server and
the numbers used and available licenses. Alternatively, running a 'ver' command in the
Compiling MatLab Programs¶
We strongly encourage you to compile MATLAB programs via the MATLAB compiler before running that code on HiPerGator as standalone executables instead of running the full MATLAB GUI interface. To compile MATLAB programs, you should
- Start an interactive SLURM session. See the Development and Testing article to learn how to start an interactive developmental session on HiPerGator under SLURM.
- Set up your environment so that the libraries needed by the compiler can be found.
module load matlab
- Compile your MATLAB program (.m) files using the MatLab compiler.
Note: The "-R -singleCompThread" options on the mcc command line will result in a single-threaded executable. By default, multithreading is enabled in executables produced by mcc. One computational thread will be started for each processor in a machine that runs your executable. That's not usually what you want. Unless you know what you are doing and intend to take advantage of multithreading (including requesting the appropriate resources in your submission script), you should use these options and generate a single-threaded executable.
mcc -R -singleCompThread -m some_prog.m
Note: either mcr or matlab environment module load command should also be included in your SLURM script since your compiled MATLAB executable must also find the appropriate dynamically loaded libraries.
MCR Runtime¶
We provide both matlab and mcr environment modules. The latter only contain the MATLAB compiler runtime, which can be used to run compiled MATLAB applications or components without loading the full matlab environment.
Categories¶
math, language