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

9 次查看(过去 30 天)
Hello,
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:
http://www.mathworks.com/support/lme/R2014a/4
Diagnostic Information:
Feature: MATLAB
License path: /user1/sad23/sad24/.matlab/R2014a_licenses:/soft/matlab/R2014a/licenses/license.dat:/soft/matlab/R
2014a/licenses/network.lic
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: 27010@test.u-test.ca
License file(s) on test.u-test.ca: /var/tmp/lm_TMW.dat:
test.u-test.ca: 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 batchName.sh
Your job 814813 (batchName.sh) has been submitted
b) and this is my Batch script
:
#!/bin/ksh
#$ -q batch -pe dmp* 24
module load matlab/R2014a
matlab -display no -r "matlabScript(),quit;"
and what I want is
:
#!/bin/ksh
#$ -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 个评论
martin hartmann
martin hartmann 2018-2-2
I hope this helps: https://se.mathworks.com/matlabcentral/fileexchange/65935-martinarielhartmann-checklicense

请先登录,再进行评论。

回答(1 个)

Andreas Goser
Andreas Goser 2018-2-5
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.

类别

Help CenterFile Exchange 中查找有关 Manage Products 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by