Monday, April 10, 2017

Managing MATLAB Users using MLM options for FlexLM

Step 1: Create a file to mlm.opt

Step 2: Edit your license.dat file
SERVER myMATLABLicense 00000000000000009
DAEMON MLM "/usr/local/MATLAB/R2016b/etc/MLM" port=1708 options="/usr/local/MATLAB/R2016b/etc/mlm.opt"
.....
.....

Step 3: Prepare mlm.opt
# Make user names and host names case insensitive when
# listed in a GROUP or HOST_GROUP.  This is not
# required but it is here to prevent some common errors.
GROUPCASEINSENSITIVE ON


# Define GROUP Users
GROUP MATLAB_BLOCK_USERS user1 user2 user3
GROUP MATLAB_INC_USERS user4 user5 user6


# EXCLUDE Users from MATLAB and selected Toolboxes
EXCLUDE "MATLAB asset_info=111111" GROUP MATLAB_BLOCK_USERS
EXCLUDE "Image_Toolbox asset_info=111111" GROUP MATLAB_BLOCK_USERS
EXCLUDE "Signal_Toolbox asset_info=111111" GROUP MATLAB_BLOCK_USERS


# RESERVE for selected for user1
RESERVE 1 "SIMULINK asset_info=111111" USER user1


# Restrict the number of licenses that can be used on machine "server1"
MAX 4 "MATLAB asset_info=111111" HOST server1


# To exclude ALL features 
EXCLUDEALL GROUP MATLAB_BLOCK_USERS


#Includes a user or pre-defined group of users, etc.
#Anyone not in an INCLUDEALL statement is not allowed to use these features. 
INCLUDEALL GROUP MATLAB_INC_USERS

References:
  1. https://www.mathworks.com/matlabcentral/answers/uploaded_files/2331/sampleMLM.opt
  2. The Options File
  3. Is there a way to administer FLEXnet based licenses? How do I create an Options file?

No comments: