15.2. License Setup

15.2.1. Licensing Modes

pSeven Core uses FlexNet Publisher as a license manager. This manager has various licensing modes, and pSeven Core may be used with a node-locked license as well as a floating license. In the node-locked mode, the license is associated with a specific host (network node), allowing pSeven Core to run only on that node. In the floating mode, one of the nodes is configured to run the FlexNet Publisher License Server which operates a license pool, dynamically allocating licenses to other nodes running pSeven Core. A license is checked out from the pool when pSeven Core is started on any given node and checked back in when the task finishes. The benefit compared to the node-locked mode is that a pool of ten licenses, for example, may support a community of hundred users (as long as no more than ten users ever want to use pSeven Core simultaneously; see also the Limitations section).

If you use node-locked licenses, you will need a separate license file for each pSeven Core installation. This file is stored locally on the computer node running pSeven Core scripts. Refer to the Node-Locked License section for details on how to obtain and register a node-locked license.

If you use a floating license, the FlexNet Publisher License Server has to be installed on a server on your network and the license has to be registered with the server. Client (user) nodes running pSeven Core then have to be configured to receive the license from the server. Refer to the Floating License section for details of this setup.

15.2.2. Node-Locked License

15.2.2.1. Obtaining the License

A node-locked license is a text file with a .lic extension that is associated with a specific node identified by a FLEXnet host ID. Thus, the first step in obtaining the license is determining the FLEXnet host ID of the user node.

The recommended method is to use the FlexNet host identification utility (lmhostid). You can get it from the pSeven license server package available at the Download page (login required). Extract lmhostid and run it on the computer you have designated to be the license server host. For example:

> lmhostid.exe
lmhostid - Copyright (c) 1989-2013 Flexera Software LLC. All Rights Reserved.
The FLEXnet host ID of this machine is "e05806420eb4"

When you have the ID, submit a license request to the pSeven Helpdesk (see Customer Support) to receive your license file. The file name will be your request ID with an added .lic extension, for example 12345.lic. When you have received the file, save it on the user host and register as described in Registering the License.

A license file can be opened with any text editor to find license details. The beginning of the file is a comment section which contains licensing information: the licensed host ID, compatible pSeven Core version, license expiry date, the list of features enabled in the license, and other.

15.2.2.2. Registering the License

To register a node-locked license, you will have to set the DATADVD_LICENSE_FILE environment variable specifying the path to the license file. Refer to an appropriate section below (Linux or Windows).

15.2.2.2.1. Windows

The following command sets DATADVD_LICENSE_FILE for the current shell session and its child sessions:

> set DATADVD_LICENSE_FILE=<license_path>\12345.lic

where <license_path> and the license file name must be replaced with the actual filename and path.

To make environment settings permanent, you can use the System Properties dialog. Run control sysdm.cpl,,3 to open this window (switches to the Advanced tab automatically), then click the Environment Variables button to bring up the Environment Variables dialog.

If you are logged in as a privileged user, you can add DATADVD_LICENSE_FILE to system variables (the bottom list). Unprivileged user can only add DATADVD_LICENSE_FILE to user variables (the upper list named “User variables for user…”). For either, click the New… button under the list of variables to open the New Variable dialog. There, enter the following, replacing <license_path>\12345.lic with an actual path:

  • Variable name: DATADVD_LICENSE_FILE
  • Variable value: <license_path>\12345.lic

and click OK in the New Variable dialog window.

After this, click OK in the Environment Variables window and then in the System Properties window.

To verify the license configuration, you may check the value of the DATADVD_LICENSE_FILE variable using the Windows command prompt:

> echo %DATADVD_LICENSE_FILE%

should output the exact path to the license file.

15.2.2.2.2. Linux

The following command sets DATADVD_LICENSE_FILE for the current shell session and its child sessions:

$ export DATADVD_LICENSE_FILE=<license_path>/12345.lic

where <license_path> and the license file name have to be replaced with actual filename and path.

Various methods are available to make this setting permanent in Linux; please refer to your distribution documentation for the recommended method. As an example, if using bash, you may edit its startup file (.bashrc) in the user directory, adding the following lines:

if [ -f "<license_path>/12345.lic" ] ; then
  export DATADVD_LICENSE_FILE=<license_path>/12345.lic
fi

Replace both paths with an actual path to the license file. To verify the license configuration, you may check the value of the DATADVD_LICENSE_FILE variable:

$ echo $DATADVD_LICENSE_FILE

should output the exact path to the license file.

15.2.3. Floating License

To use pSeven Core with a floating license, you will have to install the FlexNet Publisher License Server on a server on your network (if one does not exist already) and register the license with it, then configure the client (user) nodes to receive licenses from the server.

The server setup files are included in a separate licensing package which can be downloaded from pSeven. Visit the Download page and get a package for the platform you intend to install the server on. To access downloads, you have to be registered as a customer (see Customer Support).

Note

The licensing package contains the pSeven vendor daemon which is needed even if you have the license server set up already.

Note

Floating licenses for pSeven Core 6.9 and above require the updated version of the pSeven vendor daemon. To get the updated daemon, re-download the License Server package available from the Download page at pSeven. The new version of the daemon is compatible with earlier versions of the license server and pSeven Core licenses.

The licensing package contains:

  • FlexNet host identification utility (lmhostid.exe for Windows, lmhostid for Linux).
  • FlexNet license server installer (lmadmin-x64_n6-11_14_0_1.exe for 64-bit Windows, lmadmin-i86_n3-11_14_0_1.exe for 32-bit Windows, lmadmin-i86_lsb-11_14_0_1.bin for Linux).
  • FlexNet command-line license server (lmgrd.exe for Windows, lmgrd for Linux).
  • pSeven vendor daemon (datadvd directory and its contents).
  • FlexNet Publisher License Administration Guide (fnp_LicAdmin.pdf).
  • Basic server installation and configuration guide (README.txt).

15.2.3.1. Obtaining the License

The pool of floating licenses is specified by a license file (a text file with a .lic extension) associated with the license server host (contrary to the node-locked license which is associated with a specific node running pSeven Core). The server host is identified by a FlexNet host ID, so the first step in obtaining the license file is to determine the host ID of the system which will host the FlexNet Publisher License Server.

To get the host ID, use the FlexNet host identification utility (lmhostid.exe for Windows or lmhostid for Linux) included into the licensing package.

In Windows:

> lmhostid.exe
lmhostid - Copyright (c) 1989-2012 Flexera Software LLC. All Rights Reserved.
The FLEXnet host ID of this machine is "e05806420eb4"

In Linux:

$ ./lmhostid
lmhostid - Copyright (c) 1989-2012 Flexera Software LLC. All Rights Reserved.
The FLEXnet host ID of this machine is "e05806420eb4"

Copy the output and include it into your license request submitted to the pSeven Helpdesk (see Customer Support) to receive your license file. The file name will be your request ID with an added .lic extension, for example 12345.lic.

A license file can be opened with any text editor to find license details. The beginning of the file is a comment section which contains licensing information: the licensed host ID, compatible pSeven Core version, license expiry date, the list of features enabled in the license, and other.

15.2.3.2. FlexNet Publisher License Server Installation

If a FlexNet server does not exist on your network, you will first need to install lmadmin using the installer from the pSeven licensing package.

Any computer on the network can function as the license server host, provided it satisfies the requirements below. This computer will run a FlexNet Publisher License Server (lmadmin) and a vendor daemon provided by pSeven. Select a license server computer that is not shut down frequently, as the license server must be running whenever clients are running pSeven Core using floating licenses.

15.2.3.2.1. Host Requirements

For Windows hosts:

  • Microsoft Visual C++ 2008 Redistributable Package (x86) is required to run lmadmin. This redistributable is bundled with the installer and you have an option to automatically install it with lmadmin.

For Linux hosts:

  • A distribution compliant with Linux Standard Base (LSB) version 3.0 or higher is recommended.
  • Graphical installer requires 32-bit versions of the X graphical libraries on 64-bit Linux systems (which are usually not installed by default). Without these libraries, the installer can run in the console mode.

15.2.3.2.2. Installation

In Linux, from the directory where you have extracted the package, run the following command as a privileged user to install lmadmin to /opt/FNPLicenseServerManager:

$ ./lmadmin-i86_lsb-11_14_0_1.bin -DUSER_INSTALL_DIR=/opt/FNPLicenseServerManager -i silent

When the installer finishes, start the server:

$ cd /opt/FNPLicenseServerManager
$ ./lmadmin

In Windows, run the installer and follow its instructions. When the installer finishes, run lmadmin.exe from the installation directory (C:\Program Files\FlexNet Publisher License Server Manager by default).

15.2.3.3. Server Configuration

Before configuring the license server, verify the following:

Note

If you are updating the pSeven vendor daemon, stop your license server before the update, then follow the steps described below.

In Windows:

  1. Manually copy the pSeven vendor daemon (datadvd directory and its contents) to the directory where lmadmin.exe is installed. The default installation directory is C:\Program Files\FLEXnet Publisher License Server Manager.
  2. Import the license. Open FlexNet Publisher License Server web interface, located by URL http://localhost:8090.
  3. In the upper right corner, click Administration. Default login:password are admin:admin.
  4. In the tab bar on the left click Vendor Daemon Configuration.
  5. Click Import License, then browse to the .lic file and click Import License button in the dialog.
  6. Go back to Dashboard (in the upper right corner). Click the Concurrent button. You should see an overview of all license keys and their current usage by client computers.

In Linux:

  1. Copy the pSeven vendor daemon (datadvd directory and its contents) to the lmadmin installation directory (/opt/FNPLicenseServerManager as an example):

    $ cp -R datadvd /opt/FNPLicenseServerManager
    
  2. Copy the license file (12345.lic as an example) to licenses/datadvd inside the FlexNet Publisher License Server installation directory (/opt/FNPLicenseServerManager/licenses/datadvd if you have installed the server as described in the FlexNet Publisher License Server Installation section):

    $ mkdir -p /opt/FNPLicenseServerManager/licenses/datadvd
    $ cp 12345.lic /opt/FNPLicenseServerManager/licenses/datadvd
    
  3. Import the license:

    $ cd /opt/FNPLicenseServerManager
    $ ./lmadmin -import licenses/datadvd/12345.lic
    

After you have completed the configuration steps above, the FlexNet Publisher License Server will issue licenses to client computers running pSeven Core. If you would like more information about lmadmin install and configuration, please refer to the FlexNet Publisher License Administration Guide (fnp_LicAdmin_11_10_1.pdf) included into the pSeven licensing package.

15.2.3.4. Client Configuration

On a user host, you will have to set the DATADVD_LICENSE_FILE environment variable specifying the license server IP address. For details on how to set the environment, refer to an appropriate section below (Windows or Linux).

15.2.3.4.1. Windows

The following command sets DATADVD_LICENSE_FILE for the current shell session and its child sessions (10.7.18.142 is used as an example server IP address):

> set DATADVD_LICENSE_FILE=@10.7.18.142

To make environment settings permanent, you may use the System Properties dialog. Run control sysdm.cpl,,3 to open this window (switches to the Advanced tab automatically), then click the Environment Variables button to bring up the Environment Variables dialog.

If you are logged in as a privileged user, you may add DATADVD_LICENSE_FILE to system variables (the bottom list). Unprivileged user can only add DATADVD_LICENSE_FILE to user variables (the upper list named “User variables for user…”). For either, click the New… button under the list of variables to open the New Variable dialog. There, enter:

  • Variable name: DATADVD_LICENSE_FILE
  • Variable value: @10.7.18.142

and click OK in the New Variable dialog window.

If you have configured the server to use a non-default port, specify the port number in front of the IP address. For example:

  • Variable value: 9977@10.7.18.142

After this, click OK in the Environment Variables window and then in the System Properties window.

To verify the license configuration, you may check the value of the DATADVD_LICENSE_FILE variable using the Windows command prompt:

> echo %DATADVD_LICENSE_FILE%

should output the license server IP address (and port, if not default).

15.2.3.4.2. Linux

The following command sets DATADVD_LICENSE_FILE for the current shell session and its child sessions (10.7.18.142 is used as an example server IP address):

$ export DATADVD_LICENSE_FILE=@10.7.18.142

Various methods are available to make this setting permanent in Linux; please refer to your distribution documentation for the recommended method. As an example, if using bash, you may add the export line at the end of its startup file in the user directory (/home/username/.bashrc):

export DATADVD_LICENSE_FILE=@10.7.18.142

If you have configured the server to use a non-default port, specify the port number in front of the IP address. For example:

export DATADVD_LICENSE_FILE=9977@10.7.18.142

To verify the license configuration, you may check the value of the DATADVD_LICENSE_FILE variable:

$ echo $DATADVD_LICENSE_FILE

should output the license server IP address (and port, if not default).

15.2.4. Limitations

A license feature (or features) are checked out from the pool whenever you instantiate an object of a class that requires a license — for example, a GTOpt Solver or GTApprox Model. If a feature is not available, the object is still created, but its methods that require this feature are unusable and raise a LicenseError exception.

Note

Simultaneously running a number of pSeven Core processes, which create many objects with licensed methods and request licenses from the same server, may sometimes cause license errors. See section License in Known Issues for details.

You can always check which features were requested and view their status from an object. See section License Usage for details.