HKU MATLAB

From radwiki
Jump to navigation Jump to search

This page is for the installation notes of MATLAB under the HKU license. For instructions on the usage of MATLAB on our GPU cluster see matlab.

Install

Students may install MATLAB on their personal computers. Licenses must be activated online for each computer, this typically uses the MAC address of an ethernet interface.

Offline or commandline installation

The normal installer requires both an internet connection and a GUI interface. So offline or headless installations, like on a hpc node, require an extra step: obtaining install files. Previously used install files may be found under the /home/utility/ folder in the GPU Cluster.

If your desired MATLAB version is not available on the server, HKU license administrators may be contacted to provide install ISO files (see table below). Alternatively, designated departmental IT support staff (such as our department IT executive Alice) may download an ISO from Distribution Software under Site Licenses Coordinated by ITS

FirstName LastName email
Lilian Chan lilianyl@hku.hk
Grace Cheung graceclc@hku.hk
Bonnie Lau bonlauwl@hku.hk
Li Yuet Li ymli@hku.hk

If you requested and received new install files, please put a copy into /home/utility/ for the other users.

Detailed script-based installation

See https://www.mathworks.com/help/install/ug/install-noninteractively-silent-installation.html and https://www.mathworks.com/help/matlab/matlab_env/start-matlab-on-linux-platforms.html

Using the 2020a ISO:

Step 1 Unpack installation files

mkdir iso && sudo mount matlab_R2020a_Linux.iso ./iso/ -o loop will mount the install files in a newly created folder "iso".

  • by default the iso folder is read-only, so you can't add files to that folder.
  • if sudo privilege is not available, extract the files from the iso manually (e.g. using 7zip).
  • These iso files seem to include the installer script, so there was no need to download the linux installer from Mathworks. Upon inspection the web installer constitutes a subset of the iso files, but there are minor file size differences.

Step 2 Edit options file

Copy the installer_template.txt to a new file, e.g. ~/copiedconfig, and input the required information:

  • including the File Installation Key generated from the Mathworks HKU license page. It is a long string of digits.
  • ensure the target installation folder is writable by your user, e.g. ~/MATLAB, not /MATLAB.

Step 3 Run install script

From the iso directory run ./install -inputFile </path/to/copiedconfig> (no sudo/root required). If your target directory (e.g. ~/MATLAB) doesn't yet exist it will be created. This should also create a folder ~/.matlab with a subfolder R2020a.

Step 4 Add additional licenses

If no license file was supplied during installation (or an incorrect one), there are a few options to use a new license file:

  • Add your license file to ~/.matlab/R2020a_licenses, create the folder if it doesn't exist.
  • Alternatively, add your license file to <matlabroot>/licenses, create the folder if it doesn't exist.

Since HKU student accounts provide individual license files, each user must have a license file to run matlab, the name in this license file must match their linux account name. Note the GUI-based web installer automatically downloads the license file. If a GUI is available the license bash script should be able to run separately.