LM - LICENSE - FILE Environment Variable

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Beginning with MATLAB 6.

0 (R12), MLM_LICENSE_FILE can be set to make sure MATLAB is


using a specific license file (or server(s) for network licenses). LM_LICENSE_FILE environment
variable can also be set to do this, but any FLEXlm application will then use it.
MLM_LICENSE_FILE is specific to the MATLAB vendor daemon, MLM, and will not be
recognized by other FLEXlm applications.
Note: MATLAB may still read the LM_LICENSE_FILE variable if it is set, before it reads
MLM_LICENSE_FILE. One of these variables must be set for clients of a redundant server triad
to function properly.
How you find or set these environment variables depends on your Operating System:
Windows
1. Open the System Properties window by pressing the Windows key and “R”. This will open the
Run window. Type the following Run command:
SystemPropertiesAdvanced
Then hit enter.
2. Next click the Environment Variables button near the bottom.
3. Under the User variables and System variables, check for a LM_LICENSE_FILE and
MLM_LICENSE_FILE variable.
4. Go to New to make one of these variables (this can be set under user or system, depending
on the desired usage). The variable name will be:
MLM_LICENSE_FILE
and the value will either be the full path to the license file or port@host, for example:
C:\Program Files\MATLAB\R2009a\licenses\license.dat
or
[email protected]
If you are using a redundant server triad, use commas to separate the servers, for example:
1711@server1,1711@server2,1711@server3
Linux/Unix/Mac OS X 10.9 and below
This can be done in the shell using the setenv or export command depending on the shell. You
can either type the command in a shell session (which will make it only last for the session) or
you can add it to the appropriate file in your home directory (or create that file if it doesn't exist):
.cshrc (for c-shell)
.profile or .bashrc (for bash)
The . before the file means this is a hidden file. To edit this file, you will need to open it up in a
basic text editor and add the command (depending on your shell):
Examples, on c-shell:
setenv MLM_LICENSE_FILE "/usr/local/MATLAB/licenses/license.dat"
setenv MLM_LICENSE_FILE "1711@server1"
Examples, on bash:
export MLM_LICENSE_FILE=/usr/local/MATLAB/licenses/license.dat
export MLM_LICENSE_FILE=27000@server1,27000@server2,27000@server3
Please refer to your Operating System documention for more information on setting an
environment variable.
Mac OS X 10.10 and above
Apple is in the process of depreciating environment variables, so see this article for a
workaround if you are on OS X 10.10 "Yosemite" or higher:
How do I set environment variables on Mac OS X?
  2 Comments
Show 1 older comment

Kyle Perry  on 18 May 2018


Hello Hasassah,
Depending on what type of license your University is providing you, you may not see a license
file in your licenses folder as different license types place license files into different folders.. In
this situation, I would recommend contacting MathWorks Installation support so we can help
resolve the issue.
www.mathworks.com/support/contact_us/
Sign in to comment.

 More Answers (1)

Régis on 21 Jan 2014



Vote
1
 Link
Hello, I'm facing the same issue, due to a conflict with an environment variable (namely
"LM_LICENSE_FILE") used by another toolset. The actual license for Matlab is a network one
("network.lic" file), so Matlab is not supposed to use this environment variable. How can I force
Matlab to first look for the network license, then for a local one? regards,
  8 Comments
Show 7 older comments
Walter Roberson  on 11 May 2017
Sean Lin comments to Ajay:
This suggestion for me solve Matlab R2016a stuck in "Initializing" mode after Win10 creators
update
Sign in to comment.
Sign in to answer this question.

See Also
MATLAB Answers

Is it possible to install an Individual or Designated Computer license of MATLAB and 

You might also like