Recover number of "MATLAB" licenses available (not in use)

2 views (last 30 days)
I usually use the cluster of my university to run a couple of scripts on parallel, but it seems that many people is doing the same sniff!!! and I am facing this problem:
"MATLAB" v32, vendor: MLM License checkout failed.
License Manager Error -4
Maximum number of users for MATLAB reached.
Try again later.
To see a list of current users use the lmstat utility or contact your License Administrator.
Troubleshoot this issue by visiting:
Diagnostic Information:
Feature: MATLAB
License path: /user1/sad23/sad24/.matlab/R2014a_licenses:/soft/matlab/R2014a/licenses/license.dat:/soft/matlab/R
Licensing error: -4,132.
I tried lmstat on the linux terminal to see the number of licenses available
lmstat - Copyright (c) 1989-2010 Flexera Software, Inc. All Rights Reserved.
Flexible License Manager status on Sun 11/1/2015 11:45
License server status:
License file(s) on /var/tmp/lm_TMW.dat: license server UP (MASTER) v11.11
Vendor daemon status (on test.u-test.cq):
MLM: UP v11.11
Feature usage info:
Users of MATLAB: (Total of 50 licenses issued; Total of 50 licenses in use)
"MATLAB" v32, vendor: MLM
et voilà, MATLAB's users is maximum 50/50. So, I was wondering if there is a way to recover these values (total number of licenses in use and issued) to execute the matlab code inside my batch script until one license is available.
a) From the linux terminal, I submit the job to the cluster
: $ qsub
Your job 814813 ( has been submitted
b) and this is my Batch script
#$ -q batch -pe dmp* 24
module load matlab/R2014a
matlab -display no -r "matlabScript(),quit;"
and what I want is
#$ -q batch -pe dmp* 24
module load matlab/R2014a
GET number of MATLAB licenses in use and issued
WHILE number of MATLAB licenses in use == Number of MATLAB licenses issued (50)
GET number of MATLAB licenses in use and issued
matlab -display no -r "matlabScript(),quit;"
Thank you.
  1 Comment
martin hartmann
martin hartmann on 2 Feb 2018
I hope this helps:

Sign in to comment.

Answers (1)

Andreas Goser
Andreas Goser on 5 Feb 2018
The best advice depends on what licenses your university offers. Maybe there is a much better way, e.g. a MATLAB Distributed Computing Server. I suggest your IT for a straight forward solution.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!