Matlab License Checkout Failed Error 15

1 view
Skip to first unread message

Lotte Donohoe

unread,
Aug 3, 2024, 6:03:31 PM8/3/24
to naasoturto

I ran ./activate_matlab.sh and activated it through the license file AND login into MathWorks online. I deleted the installation .lic in R2020a/license/ and created a new one. I tried creating a license file with every mac address I could find. Nothing works. I keep getting this error. Only once I managed to use Matlab, which was right after installing it. Then after the first time closing it I'm I have been stuck on this error for 2 days. Please help me.

The following error was detected while installing vision_common: archive is not a ZIP archive Would you like to retry installing vision_common? If you press No, the installer will exit without completing the installation. More information can be found at /tmp/mathworks_root.log

Hi Lone_Wolf,
thanks for your help. Well, I solved the problem just adding 1GB of RAM to my virtual Arch. Now, I don't know why, if I run the Matlab application (in bin folder), I get the following license error:

License checkout failed.
License Manager Error -8
Make sure the HostID of the license file matches this machine, and that the HostID on the SERVER
line matches the HostID of the license file.

NOTE: Changing the Host ID listed in the commented section of the license file will not resolve the error. If your Host ID is incorrect, you will need to obtain a new license file generated for the correct Host ID.

If you are most comfortable with Microsoft Windows and only need a single CPU-core, consider running MATLAB using the Princeton Virtual Desktop. Choose "Student Labs" then "MATLAB". Central OIT maintains this service, so please open a Support Ticket with issues.

Learn More about Princeton Virtual Desktop.

If you are new to high-performance computing then you will find that the simplest way to use MATLAB on the HPC clusters is through the Open OnDemand web interface. You will need to use a VPN to connect from off-campus (GlobalProtect VPN is recommended). If you have an account on Adroit or Della then browse to or If you need an account on Adroit then complete this form.

To begin a session, click on "Interactive Apps" and then "MATLAB". You will need to choose the "MATLAB version", "Number of hours" and "Number of cores". Set "Number of cores" to 1 unless you are sure that your script has been explicitly parallelized using, for example, the Parallel Computing Toolbox (see below). Click "Launch" and then when your session is ready click "Launch MATLAB". Note that the more resources you request, the more you will have to wait for your session to become available.

The Gurobi optimization library is required for certain MATLAB packages. If you need to use Gurobi within your OnDemand MATLAB session then enter the environment module name (e.g., gurobi/9.0.1) in the field labeled "Additional environment modules to load" when creating the session. This will enable the software and allow the license to be found. Start the session by setting up the Gurobi MATLAB interface at the MATLAB prompt:

The web interface described above is good for interactive work. One can also submit MATLAB batch jobs to the Slurm scheduler. This applies to Adroit, Della and TigerGPU. A job consists of two pieces: (1) a MATLAB script and (2) a Slurm script that specifies the needed resources, sets the environment and lists the commands to be run. Learn more about Slurm or see the example below.

By invoking MATLAB with -singleCompThread -nodisplay -nosplash, the GUI is suppressed as is the creation of multiple threads. To run the MATLAB script, simply submit the job to the scheduler with the following command:

Most of the time, running MATLAB in single-threaded mode (as described above) will meet your needs. However, if your code makes use of the Parallel Computing Toolbox (e.g., parfor) or you have intense computations that can benefit from the built-in multi-threading provided by MATLAB's BLAS implementation, then you can run in multi-threaded mode. One can use up to all the CPU-cores on a single node in this mode. Multi-node jobs are not possible with the version of MATLAB that we have so your Slurm script should always use #SBATCH --nodes=1. Here is an example from MathWorks of using multiple cores (for_loop.m):

Note that -singleCompThread does not appear in the Slurm script in contrast to the serial case. One must tune the value of --cpus-per-task for optimum performance. Use the smallest value that gives you a significant performance boost because the more resources you request the longer your queue time will be. The example above runs in 30 s with 1 core and 9 s with 4 cores on Adroit.

If you use more than one thread then make sure that your code can take advantage of all the CPU-cores. The amount of time that a job waits in the queue is proportional to the requested resources. Furthermore, your fairshare value is decreased in proportion to the requested resources. To find the optimal number of CPU-cores for a MATLAB job see the "Multithreading" section on Chossing the Number of Nodes, CPU-cores and GPUs.

A parfor statement is a clear indication of a parallelized MATLAB code. However, there are cases when the parallelization is not obvious. One example would be a code that uses linear algebra operations such as matrix multiplication. In this case MATLAB will use the BLAS library which offers multithreaded routines.

There are two common ways to deteremine whether or not a MATLAB code can take advantage of parallelism without knowing anything about the code. The first to is run the code using 1 CPU-core and then do a second run using, say, 4 CPU-cores. Look to see if there is a significant difference in the execution time of the two codes. The second method is to launch the job using, say, 4 CPU-cores then ssh to the compute node where the job is running and use htop -u $USER to inspect the CPU usage. To get the name of the compute node where your job is running use the following command:

The Nobel cluster is a shared system without a job scheduler. Because of this, users are not allowed to run MATLAB in multi-threaded mode. The first step in using MATLAB on Nobel is choosing the version. Run module avail matlab to see the choices. Load a module with, e.g., module load matlab/R2019b. After loading a MATLAB module, to run MATLAB interactively on the script myscript.m:

In addition to the web interfaces on MyAdroit and MyDella, one can also launch MATLAB with its GUI on Tigressdata. Tigressdata is ideal for data post-processing and visualization. You can access your files on the different filesystems using these paths: /tiger/scratch/gpfs/, /della/scratch/gpfs/, /tigress and /projects. Mac users will need to have XQuartz installed while Windows users should install MobaXterm (Home Edition). Visit the OIT Tech Clinic for assistance with installing, configuring and using these tools. To run MATLAB interactively with its graphical user interface:

TigerCPU is designed for parallel, multi-node jobs. MATLAB cannot be used across multiple nodes so it is not allowed. If you try to run a MATLAB job on TigerCPU you will encounter the following error message:

Note that if all the GPUs are in use then you will have to wait. During busy times this may take hours or days. To check what is available, from the OnDemand main menu, click on "Clusters" and then "_Adroit Cluster Shell Access". From the black terminal screen run this command: ssh adroit-h11g1. Then run gpustat. There are four V100 GPUs on that node. If you see usernames associated with each of them then the node is occupied. Type exit to leave the compute node. Note that Adroit is a training cluster so it is not intended for lengthy production jobs.

You can embed MATLAB inside a Python script using the MATLAB Engine for Python. There are two sets of the directions below. The first shows how to do the installation in a standalone manner while the second uses a Conda environment.

You should run your jobs out of /scratch/gpfs/ on the HPC clusters. These filesystems are very fast and provide vast amounts of storage. Do not run jobs out of /tigress or /projects. That is, you should never be writing the output of actively running jobs to these filesystems. /tigress and /projects are slow and should only be used for backing up the files that you produce on /scratch/gpfs. Your /home directory on all clusters is small and it should only be used for storing source code and executables. The commands below give you an idea of how to properly run a MATLAB job:

It simply prints the value of the 3 arguments to the screen. Let us save this MATLAB function in a file called print_values.m. Now here is a SLURM script that shows you how to run using a SLURM script that uses a SLURM job array:

Note that this simple scripts demonstrates how to pass three types of arguments: 1. A string, STRING, note that the double quotes (") are part of the bash syntax and the single quotes ( ' ) are part of the MATLAB syntax. 2. A real number, GOLDEN, 3. A SLURM environment variable, SLURM_ARRAY_TASK_ID, which happens to be an integer. Assuming that this script is saved in a file called batch.sh, we submit to the scheduler with the command: The job can be submitted to the scheduler with:

It appears that two jobs are launching simultaneously and attempting to create this .mat file at the same time. How do I avoid this? The solution is to set the output to /tmp. Every job has a private /tmp directory when running so you can redirect this file to there. The code snippet becomes:

c80f0f1006
Reply all
Reply to author
Forward
0 new messages