Matlab

Last modified by Niko-Ville Koljonen on 2024/02/16 14:49

Current version of Matlab installation in Cubbli 22 is 2023b as of 2023-09. This installation includes all downloadable Matlab add ons. By default the installation uses a network license server  when Matlab is started. The license server works only inside University of Helsinki network or when using a VPN connection. If Matlab does not start, connect to a VPN first. If you must use Matlab offline you can obtain a personal Matlab license file. Matlab can also be from the command line and over ssh sessions

License

Matlab is proprietary and expencive software and will not work without a license. If you can't use the default license server (you want to work offline), you can obtain a personal license file from mathworks.com and install it to  /opt/MATLAB/licenses/ directory. Remember to remove the network license file /opt/MATLAB/licenses/network.lic

Installing Matlab yourself

If you want to use a different version of Matlab or want to manage downloaded add ons and updates yourself, you can download Matlab by logging in to mathworks.com and logging in with your helsinki.fi email account. You don't need sudo (admin) rights when installing Matlab and if you have them, they shoud not be used. When Matlab asks where it should be installed, specify a subdirectory in your own home directory. If you attempt to install the full installation to a system directory the system partition will get full and it will interfere with the Matlab installation provided by Cubbli administrators and full system partition will interfere with everything. 

Technical details

Since Matlab installation requires a more than 25G space when uncompressed, Cubbli Matlab installation is saved instead in a xz compressed squashfs filesystem image, which is then mounted so that it looks like a regular filesystem. Only the license file directory is writable by local users and is pointed by a symlink from the readonly squashfs filesystem with a symlink.  Here are the directory containing licenses, the squashfs image and the directory where it is mounted: 

jjaakkol@melkki:~$ ls -lhd /opt/MATLAB/R2021b /opt/MATLAB R2021b.squashfs /opt/MATLAB/licenses/
drwxrwsr-x 2 root local 4.0K Nov 10 13:14 /opt/MATLAB/licenses/
dr-xr-xr-x 22 root root 613 Nov 10 09:33 /opt/MATLAB/R2021b
-rw-r--r-- 1 root root 11G Nov 10 12:23 /opt/MATLAB/R2021b.squashfs

Screenshots

Screenshot from 2021-11-10 11-34-46.png

Screenshot from 2021-11-10 13-42-52.png