Matlab
![]() |
Note |
---|---|
This page is actively maintained by the Grid'5000 team. If you encounter problems, please report them (see the Support page). Additionally, as it is a wiki page, you are free to make minor corrections yourself if needed. If you would like to suggest a more fundamental change, please contact the Grid'5000 team. |
Contents
Matlab and Matlab Runtime modules
Matlab and Matlab Runtime Environment modules are currently provided for tests.
Requirements
Using Matlab module requires to have a personal access to a Matlab License server.
An automatic access opening to Matlab license server according to your GGA is planned. But for this testing period, you have to use a workaround:
- Have an access to your Matlab license server from your laptop/workstation, usually in your laboratory network, or with a VPN access.
- Connecting to you reserved node with ssh ports redirection, as explain below.
No Matlab License server is needed to use Matlab Runtime on nodes.
Using Matlab on a node
- Connect from your workstation to your previously reserved node with a ssh port redirection.
typically, for port 27000 only:
(workstation):~$ ssh -R 27000:<token.licenceserver.tld>:27000 <node>.<site>.g5k
For example, with a Université de Lorraine account:
(workstation):~$ ssh -R 27000:flexlm1.univ-lorraine.fr:27000 -R 27001:flexlm1.univ-lorraine.fr:27001 <node>.<site>.g5k
- Add the dedicated path to the current lmod MODULEPATH:
(node):~$ export MODULEPATH=/grid5000/spack/modules-others/modules:$MODULEPATH
- Set up the link to your Matlab License server through tour ssh connection, typically:
(node):~$ export LM_LICENSE_FILE=27000@127.0.0.1
- Load the Matlab module named matlab (with version accordingly to your provided licence), for example:
(node):~$ module load matlab/R2022a
- Start Matlab without graphical environment:
(node):~$ matlab -nodisplay -nodesktop -nosplash
Using Matlab Runtime on a node
Matlab Runtime is used to launch an application previously compiled with Matlab.
- Connect to your reserved node
- Add the dedicated path to the current lmod MODULEPATH:
(node):~$ export MODULEPATH=/grid5000/spack/modules-others/modules:$MODULEPATH
- Load the Matlab Runtime module named matlab-runtime (with version accordingly to Matlab used to compile the application), for example:
(node):~$ module load matlab-runtime/R2022a
- Launch your application. Here is for example a magicsquares application (using the corresponding deployedMCRroot):
(node):~$ ./magicsquarestandaloneApplication/run_magicsquare.sh /grid5000/spack/modules-others/matlab-runtime/R2022a 5