MATLAB Distributed Computing Server™ Licensing Guide ®

MATLAB® Distributed Computing Server™
Licensing Guide
How to Contact MathWorks
Latest news:
www.mathworks.com
Sales and services:
www.mathworks.com/sales_and_services
User community:
www.mathworks.com/matlabcentral
Technical support:
www.mathworks.com/support/contact_us
Phone:
508-647-7000
The MathWorks, Inc.
3 Apple Hill Drive
Natick, MA 01760-2098
MATLAB® Distributed Computing Server™ Licensing Guide
© COPYRIGHT 2013– 2014 by The MathWorks, Inc.
The software described in this document is furnished under a license agreement. The software may be used
or copied only under the terms of the license agreement. No part of this manual may be photocopied or
reproduced in any form without prior written consent from The MathWorks, Inc.
FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation
by, for, or through the federal government of the United States. By accepting delivery of the Program
or Documentation, the government hereby agrees that this software or documentation qualifies as
commercial computer software or commercial computer software documentation as such terms are used
or defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014. Accordingly, the terms and
conditions of this Agreement and only those rights specified in this Agreement, shall pertain to and
govern the use, modification, reproduction, release, performance, display, and disclosure of the Program
and Documentation by the federal government (or other entity acquiring for or through the federal
government) and shall supersede any conflicting contractual terms or conditions. If this License fails
to meet the government's needs or is inconsistent in any respect with federal procurement law, the
government agrees to return the Program and Documentation, unused, to The MathWorks, Inc.
Trademarks
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See
www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand
names may be trademarks or registered trademarks of their respective holders.
Patents
MathWorks products are protected by one or more U.S. patents. Please see
www.mathworks.com/patents for more information.
Revision History
March 2012
September 2012
March 2013
June 2013
July 2014
October 2014
Online only
Online only
Online only
Online only
Online only
Online only
Contents
1
Cluster Licensing Options
Choose Licensing Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
On-Site Cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Cloud Cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Prepare On-Site Cluster for MathWorks Hosted License
Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 1: Open Cluster Machine Ports . . . . . . . . . . . . . . . . . . .
Step 2: Disable FlexNet Licensing . . . . . . . . . . . . . . . . . . . . .
Step 3a: Modify License Parameters in Definitions File (MJS
Only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 3b: Set Cluster Object Property Value (Third-Party
Schedulers) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-2
1-2
1-2
1-4
1-5
1-5
1-5
1-6
1-7
Configure MathWorks Hosted License Manager in the
License Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 1: Select MathWorks Hosted License Manager . . . . . . .
Step 2: Manage Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-8
1-8
1-13
Configure Optional On-Demand Licensing in the License
Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 1: Enable On-Demand . . . . . . . . . . . . . . . . . . . . . . . . .
Step 2: Manage Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Disable or Reenable On-Demand . . . . . . . . . . . . . . . . . . . . .
Monitor On-Demand Worker Usage . . . . . . . . . . . . . . . . . .
1-15
1-15
1-19
1-21
1-22
Disable MathWorks Hosted License Manager and Switch to
FlexNet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 1: Select and Activate FlexNet . . . . . . . . . . . . . . . . . .
Step 2: Set Up FlexNet Licensing in On-Site Cluster . . . . . .
Step 3a: Modify License Parameter in Definitions File (MJS
Only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-24
1-24
1-26
1-26
iii
Step 3b: Reset Cluster Object Property Value (Third-Party
Schedulers) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
iv
Contents
1-26
1
Cluster Licensing Options
• “Choose Licensing Option” on page 1-2
• “Prepare On-Site Cluster for MathWorks Hosted License Manager” on page 1-5
• “Configure MathWorks Hosted License Manager in the License Center” on page
1-8
• “Configure Optional On-Demand Licensing in the License Center” on page 1-15
• “Disable MathWorks Hosted License Manager and Switch to FlexNet” on page
1-24
1
Cluster Licensing Options
Choose Licensing Option
In this section...
“Overview” on page 1-2
“On-Site Cluster” on page 1-2
“Cloud Cluster” on page 1-4
Overview
The following table provides an overview of the features and requirements of the
licensing options for MATLAB® Distributed Computing Server™.
License
Management
Option
Supported Cluster
Locations
Supported
Schedulers
Requirements
Fixed Count/
On-Demand
FlexNet
• On-site only
• Any scheduler
• Normal
activation
• Fixed only
• Any scheduler
• Configured in • Fixed
MathWorks®
• On-demand
License Center
• Both combined
with allowed
on same cluster
user list
MathWorks hosted • On-site, or
license manager
• Cloud
• On-site clusters
require access
to Internet
On-Site Cluster
With MATLAB Distributed Computing Server installed on-site, you have two licensing
options:
• “FlexNet License Manager” on page 1-2
• “MathWorks Hosted License Manager” on page 1-3
FlexNet License Manager
FlexNet® license management provides the traditional solution for licensing MATLAB
workers in your cluster. The FlexNet license manager is installed and started on the
1-2
Choose Licensing Option
same network as the cluster nodes. In this scenario, the number of licenses is limited to
a fixed count, and on-demand licensing is not supported. The following figure shows one
possible configuration for licensing an on-site cluster.
On-site
MDCS cluster
Head node
FlexNet license
manager
Client Node
PCT
Worker node
MDCS
Worker node
MDCS
Worker node
MDCS
FlexNet license management is required for any cluster that cannot access the Internet.
This configuration of license management is fully described in the MATLAB and
Simulink license management documentation.
MathWorks Hosted License Manager
When your cluster workers are licensed with the MathWorks hosted license manager,
when a worker starts executing a task in a job for a particular user, it checks out a
license from the MathWorks hosted license manager. The license is released when
the worker is finished performing tasks for that user. The following figure shows this
licensing configuration for an on-site cluster.
MathWorks license center
MathWorks hosted
license manager
Client Node
PCT
Worker node
MDCS
Worker node
MDCS
Worker node
MDCS
On-site
MDCS cluster
1-3
1
Cluster Licensing Options
Your on-site cluster can use the MathWorks hosted license manager if the cluster
machines have access to the Internet using HTTPS port 443.
This type of setup requires configuration steps on your cluster and in the License Center.
The following sections describe how to configure your cluster and select the MathWorks
hosted license manager, beginning with “Prepare On-Site Cluster for MathWorks Hosted
License Manager” on page 1-5.
Cloud Cluster
Using a MATLAB Distributed Computing Server cluster in the Amazon EC2 cloud, your
only licensing option is the MathWorks hosted license manager. The following figure
illustrates a possible licensing configuration for a cloud cluster.
MathWorks license center
MathWorks hosted
license manager
Worker node
Client Node
MDCS
MJSComputeCloud
scheduler
PCT
Job
submission
Worker node
MDCS
Worker node
MDCS
Amazon EC2
cluster
This configuration does not involve an on-site cluster. Instructions for enabling the
MathWorks hosted license manager are described in “Configure MathWorks Hosted
License Manager in the License Center” on page 1-8.
For information on starting and using a cluster in the Amazon EC2 cloud, visit the
MathWorks Cloud Center at:
https://www.mathworks.com/cloudcenter
1-4
Prepare On-Site Cluster for MathWorks Hosted License Manager
Prepare On-Site Cluster for MathWorks Hosted License Manager
In this section...
“Step 1: Open Cluster Machine Ports” on page 1-5
“Step 2: Disable FlexNet Licensing” on page 1-5
“Step 3a: Modify License Parameters in Definitions File (MJS Only)” on page 1-6
“Step 3b: Set Cluster Object Property Value (Third-Party Schedulers)” on page 1-7
Step 1: Open Cluster Machine Ports
For MathWorks hosted license manager, all the cluster worker machines require HTTPS
communication with the Internet. Be sure that port 443 is open on all cluster machines.
Step 2: Disable FlexNet Licensing
If this is a new cluster installation that never used FlexNet license management, you can
skip this step and proceed to the following section, “Step 3a: Modify License Parameters
in Definitions File (MJS Only)” on page 1-6.
FlexNet Manages Only MATLAB Distributed Computing Server Cluster
If the FlexNet license manager provides licensing for only the cluster workers of your onsite installation of MATLAB Distributed Computing Server:
1
Shut down the FlexNet server/daemon, and
2
Delete the license file found at:
FlexNetRoot/etc/license.dat
(Your license file name and location might vary.)
FlexNet Manages Multiple Products
It is possible that the FlexNet license manager provides licensing for multiple products,
such as MATLAB Distributed Computing Server on your cluster machines, MATLAB
with Parallel Computing Toolbox™ on your client computer, and other software products.
In this case, you need to disable the licensing only for MATLAB Distributed Computing
Server, while leaving all other licensing active.
1-5
1
Cluster Licensing Options
1
With your editor of choice, open the license file:
FlexNetRoot/etc/license.dat
(Your license file name and location might vary.)
2
In the file, locate and remove the entry that begins with the text:
INCREMENT MATLAB_Distrib_Comp_Engine ...
The entry might span more than one line in the file. Remove the entire entry and
save the file.
3
Restart FlexNet for the changes to take effect.
FlexNet utilities such as lmstat can verify that only the proper products are licensed.
Step 3a: Modify License Parameters in Definitions File (MJS Only)
The mdce process uses its parameter definitions file to control the behavior of the
MATLAB job scheduler (MJS) and workers. Where matlabroot indicates the folder of
the cluster MATLAB installation, the definitions file is located at:
matlabroot/toolbox/distcomp/bin/mdce_def.sh (UNIX)
matlabroot\toolbox\distcomp\bin\mdce_def.bat (Windows)
• When using MathWorks hosted license manager, modify the mdce_def file to set the
online licensing parameter value to true.
For R2012b or earlier, the line should read as either one of the following:
ONLINE_LICENSE_MANAGEMENT="true" (UNIX)
set ONLINE_LICENSE_MANAGEMENT=true (Windows)
For R2013a or later, the line should read as either one of the following:
USE_MATHWORKS_HOSTED_LICENSE_MANAGER="true" (UNIX)
set USE_MATHWORKS_HOSTED_LICENSE_MANAGER=true (Windows)
• If you want to release licenses when workers are idle, set the release idle license
parameter value to true . This parameter is useful if you are using the on-demand
feature.
This parameter is supported in R2013a and later. The line should read as either one
of the following:
1-6
Prepare On-Site Cluster for MathWorks Hosted License Manager
RELEASE_LICENSE_WHEN_IDLE="true" (UNIX)
set RELEASE_LICENSE_WHEN_IDLE=true (Windows)
By releasing licenses during idle times, other on-demand workers can use these
licenses, as needed.
With the new settings in the mdce_def file, restart the cluster resources (MJS and
workers) in the usual manner as described in the installation and configuration sections
of the MATLAB Distributed Computing Server documentation.
Step 3b: Set Cluster Object Property Value (Third-Party Schedulers)
When using a third-party scheduler, you must specify that workers are to use the
MathWorks hosted license manager. Do this in MATLAB by setting the cluster object
property RequiresMathWorksHostedLicensing to true. You can set this property in
the Cluster Profile Manager or at the command line.
Script Environment Variables (Generic Scheduler Only)
The set of generic scheduler interface scripts provided with the toolbox were updated in
R2012b with new environment variables to accommodate using the MathWorks hosted
license manager. The new variables in the scripts are:
MLM_WEB_LICENSE
MLM_WEB_USER_CRED
MLM_WEB_ID
MDCE_LICENSE_NUMBER
The scripts reside in the folder:
matlabroot/toolbox/distcomp/examples/integration (UNIX)
matlabroot\toolbox\distcomp\examples\integration (Windows)
If you use these scripts directly, the variables are automatically set as a result of your
setting the value of the cluster object property RequiresMathWorksHostedLicensing.
If you create customized versions of these scripts for setting environment variables
in your cluster operation, you should update your scripts to accommodate these new
variables.
For more information about using the generic scheduler interface and the example
scripts, see “Use the Generic Scheduler Interface” in the Parallel Computing Toolbox
documentation.
1-7
1
Cluster Licensing Options
Configure MathWorks Hosted License Manager in the License
Center
In this section...
“Step 1: Select MathWorks Hosted License Manager” on page 1-8
“Step 2: Manage Users” on page 1-13
Step 1: Select MathWorks Hosted License Manager
To configure your licensing with MathWorks hosted license manager, follow these steps.
1
In a web browser, navigate to the MathWorks License Center at:
https://www.mathworks.com/licensecenter
1-8
2
If you are not already logged into the License Center, log in with your MathWorks
account. The License Center displays all the licenses you are associated with, either
as an end-user or administrator.
3
Click the MATLAB Distributed Computing Server that you want to access for
modifying its settings.
Configure MathWorks Hosted License Manager in the License Center
4
Click the Activation and Installation tab to see if this license is using FlexNet or
the MathWorks hosted license manager.
5
To change the license management setting, click its edit icon.
1-9
1
Cluster Licensing Options
6
The next dialog depends on whether you are transferring your licensing from an
activated FlexNet managed installation or not.
a
1-10
If your FlexNet managed installation is not activated in the License Center,
a dialog presents you with a choice of MathWorks hosted license manager
or FlexNet license manager. This also applies if you are licensing a new
installation, or configuring your license for a cloud cluster.
Configure MathWorks Hosted License Manager in the License Center
Select MathWorks hosted license manager, then click Change License
Management.
b
If you are switching from an activated FlexNet managed installation to a
MathWorks hosted license manager, a dialog informs you of the steps involved
in the process: shutting down FlexNet licensing for your cluster, and changing
the setting in the License Center. The first step should already done, as
described in “Prepare On-Site Cluster for MathWorks Hosted License Manager”
on page 1-5. The second step is done when you proceed with this dialog.
Click Deactivate to Change License Management to proceed with changing
your setting in the License Center and to use MathWorks hosted license
manager for this license.
7
The next dialog indicates success in switching your license management. Click Done
to dismiss the dialog and return to the License Center page.
1-11
1
Cluster Licensing Options
The License Center display for this license now indicates that its license
management setting is the MathWorks hosted license manager.
If you have not yet installed MATLAB Distributed Computing Server on your
cluster, click Get File Installation Key to get the necessary key for product
installation. Because licensing is managed on the web, you do not need a license file
and there is no need for activation.
1-12
Configure MathWorks Hosted License Manager in the License Center
Step 2: Manage Users
For the MathWorks hosted license manager to know which users have permission to
check out a license, you have to define a list of allowed users for that license. Follow these
steps to control which users can access worker licenses.
1
For the selected license, click the End Users and License Contacts tab. Any users
already associated with this license appear in the list.
2
Click Add User to add a user to the list.
3
In the dialog, provide the user’s email address, and a set of names, then click
Continue Note that if the specified email address does not correspond to an existing
MathWorks Account, a new account is created for that user.
1-13
1
Cluster Licensing Options
4
To remove a user from the list for this license, on the right-hand side of the user list
click the red icon on the line for that user in the Remove User column.
Note When using the MathWorks hosted license manager, a MATLAB worker session
checks out a license when it begins executing a task in a job submitted by a particular
user. Because the licensing is managed from the web, the first time you submit a job
to the cluster, MATLAB prompts you to log in so that the MathWorks hosted license
manager can identify you and authenticate your permission to use a license. When a
MATLAB worker is finished performing tasks for that user, it releases the license.
When a different user submits a job to the cluster, new licenses are checked out for the
workers when that job starts running. So licensing is performed on a per-user basis.
1-14
Configure Optional On-Demand Licensing in the License Center
Configure Optional On-Demand Licensing in the License Center
Step 1: Enable On-Demand
On-demand licensing allows you to use additional workers as needed. The charge
for these workers is based on usage time, rather than on a fixed number of workers.
Enabling on-demand provides additional workers to the fixed count limit on your number
of workers, or it can be used as your only form of licensing.
Note On-demand licensing is not available in all areas. Contact your MathWorks
representative.
On-demand licensing for a particular license requires that license to be configured to
use the MathWorks hosted license manager. (On-demand licensing is not supported by
FlexNet license management.) This might be the default for a new license, or you can
enable it yourself as described in “Step 1: Select MathWorks Hosted License Manager” on
page 1-8.
For MathWorks hosted license manager, all the cluster worker machines require HTTPS
communication with the Internet. Be sure that port 443 is open on all cluster machines
When you have configured a license to use the MathWorks hosted license manager, the
On Demand tab is available for that license.
To enable on-demand licensing, follow these steps:
1
Select the On Demand tab.
1-15
1
Cluster Licensing Options
1-16
2
Click Start Using On-Demand (add new card).
3
Enter the billing address, accept the terms and conditions, and click Continue to
Add Payment Information.
Configure Optional On-Demand Licensing in the License Center
4
Enter information about the credit card you plan to use to pay for on-demand usage
and click Send.
1-17
1
Cluster Licensing Options
1-18
5
On the Confirmation screen, click Return to License Center.
6
On the On-Demand tab, verify that the status for On-Demand is On.
Configure Optional On-Demand Licensing in the License Center
Step 2: Manage Users
You must define a list of allowed users so that the MathWorks hosted license manager
can recognize which users have permissions to check out an on-demand workers.
1
For the selected license, click the End Users and License Contacts tab. Any users
already associated with this license appear in the list.
2
Click Add User to add a user to the list.
1-19
1
Cluster Licensing Options
In the dialog, you can set whether the user is allowed to use on-demand at this
time or not. This is only the initial setting. You can change the setting at any time
after the person is in the user list. Note that if the specified email address does not
correspond to an existing MathWorks Account, a new account is created for that
user.
3
On the right-hand side of the user list, you can click the red X or green check mark to
toggle that user’s permissions for on-demand usage.
The setting for On-demand Permissions for new End Users on the End Users and
License Contacts tab can be useful when users are allowed to add themselves to the
user list and you want to control whether they are allowed to use on-demand by default.
1-20
Configure Optional On-Demand Licensing in the License Center
Disable or Reenable On-Demand
You can disable and then reenable on-demand at any time.
Disable On-Demand
You can disable on-demand licensing at any time.
1
For the selected license, select the On-Demand tab.
2
Click Stop On-Demand.
3
In the Disable On-Demand confirmation window, click Disable On-Demand.
4
Click Done after on-demand workers are disabled.
1-21
1
Cluster Licensing Options
Reenable On-Demand
To enable on-demand after disabling it:
1
Return to the On-Demand tab for the selected license.
2
Click Restart On-Demand (use this card) to restart on-demand using the existing
credit card for payment. Or, click Start Using On-Demand (add new card) to
enable on-demand and use a different credit card.
3
Follow the on-screen instructions to complete the process.
Monitor On-Demand Worker Usage
To view reports of up to six months of on-demand worker usage:
1-22
1
For the selected license, click the On-Demand tab
2
Click On-Demand Usage History.
Configure Optional On-Demand Licensing in the License Center
3
Select the type of report to generate.
You can generate a report for current activity or a report for a specific time frame
within the previous six months.
4
Click Generate On-demand Usage Report.
1-23
1
Cluster Licensing Options
Disable MathWorks Hosted License Manager and Switch to
FlexNet
In this section...
“Step 1: Select and Activate FlexNet” on page 1-24
“Step 2: Set Up FlexNet Licensing in On-Site Cluster” on page 1-26
“Step 3a: Modify License Parameter in Definitions File (MJS Only)” on page 1-26
“Step 3b: Reset Cluster Object Property Value (Third-Party Schedulers)” on page
1-26
Step 1: Select and Activate FlexNet
If you want to switch back to FlexNet license management for your on-site cluster, you
first need to edit your License Management setting in the MathWorks License Center.
1
Log in to the MathWorks License Center with your MathWorks account at:
http://www.mathworks.com/licensecenter
1-24
2
Select the license you want to modify.
3
On the Activation and Installation tab, click the License Management edit icon.
4
Select FlexNet license manager, and click Change License Management.
Disable MathWorks Hosted License Manager and Switch to FlexNet
5
The dialog indicates success. Click Done.
6
Back on the Activation and Installation tab, click Activate to activate your
cluster installation licensing. This follows the standard procedure described in the
MATLAB and Simulink Installation documentation.
7
To download a new license file and file installation key, click Get License File.
1-25
1
Cluster Licensing Options
Step 2: Set Up FlexNet Licensing in On-Site Cluster
With the license file available from the MathWorks License Center, restart FlexNet for
your cluster installation. This procedure is fully described in the MATLAB and Simulink
Installation documentation.
Step 3a: Modify License Parameter in Definitions File (MJS Only)
On your cluster installation, open the mdce_def file (as described previously in “Step
3a: Modify License Parameters in Definitions File (MJS Only)” on page 1-6), and set the
online licensing parameter value to false.
For R2012b or earlier, the line should read as either one of the following:
ONLINE_LICENSE_MANAGEMENT="false" (UNIX)
set ONLINE_LICENSE_MANAGEMENT=false (Windows)
For R2013a or later, the line should read as either one of the following:
USE_MATHWORKS_HOSTED_LICENSE_MANAGER="false" (UNIX)
set USE_MATHWORKS_HOSTED_LICENSE_MANAGER=false (Windows)
With the new settings in the mdce_def file, restart the cluster resources (MJS and
workers) in the usual manner.
Step 3b: Reset Cluster Object Property Value (Third-Party Schedulers)
For third-party schedulers, you must specify that workers are to use the local FlexNet
license manger instead of MathWorks hosted license manager. Do this in MATLAB by
1-26
Disable MathWorks Hosted License Manager and Switch to FlexNet
setting the cluster object property RequiresMathWorksHostedLicensing to false.
You can set this property in the Cluster Profile Manager or at the command line.
1-27