Configuring the Load Scripts
- SGE
- PBS Pro
- LSF
- Slurm
A script is provided that queries the FLEXlm license server and reports the number of tokens available for each license in a format that the queueing software can understand. You can also set up Grid Engine to internally track license resources. This is an additional protection against the premature release of jobs.
To make sure the lmutil utility and license file can be found when the script is run by the queueing software, you need to add the locations of the program and the license file to the script, by editing the configuration section at the top of the script. You must have permission to change this file.
-
Make a copy of the file
$SCHRODINGER/utilities/flexlm_sensor.pl, and open the copy in a text editor.One suggested location is in the parent directory of
$SCHRODINGER(i.e.$SCHRODINGER/..) or a parallel directory. The location should ideally be in a release-independent location, and should be accessible to any host in the same way as the installation directory. This location is referred to later as sensor-dir. -
Edit the line beginning
my $LICENSEso that the full path to the license file is between the quotation marks:my $LICENSE="full-path-to-license-file";
You can specify the license server instead of the license file as follows:
my $LICENSE="\@license-server";
or
my $LICENSE="port\@license-server";
The backslash is necessary as Perl interprets @ as a special character.
-
Edit the line beginning
my $LMUTILso that the full path tolmutilis between the quotation marks:my $LMUTIL="full-path-to-lmutil";
-
To reserve licenses for non-queue use, edit the line beginning
my $reservedto set the value to the fraction or percentage of licenses to reserve. For example, either of the following lines reserves 20% of the licenses for non-queue use.my $reserved = 0.2;
my $reserved = "20%";
-
Set the path to the qconf binary by editing the line beginning
my_$qconf. This allows the load sensor to change thecomplex_valuesattribute, enabling internal tracking of license resource.my $qconf = full-path-to-qconf-binary;
-
Set the prefix to add for each license feature to distinguish whether it is using FlexLM licenses or the Schrodinger Licensing Manager. This needs to match the prefix used in the setup to generate the configuration for license resource attributes (See the Adding License Attributes section).
my $SCHRODINGER_LICENSING_NAMESPACE = "SLM_";
If you are no longer using FlexLM licenses, and transitioned to use Schrodinger Licensing, this can be set to an empty string.
-
Set the command to run lictool for getting Schrodinger Licensing Manager license features. If the lictool binary is copied to a non-standard location, change this to the path of the binary. This is generally not advisable at the initial stage of transitioning to Schrodinger Licensing.
my $LICTOOL_CMD = "\"$SCHRODINGER/run\" lictool";
-
Save the modified script and close the editor.
Follow the instructions below to verify that the script is configured properly. If you test the script before and after specifying reserved licenses, you should see the number of licenses reported decrease by the specified percentage.
| 1. | Enter the following command: |
perl sensor-dir/flexlm_sensor.pl
| 2. | Press the ENTER key. |
You should get a block of output like
begin global:IMPACT_MAIN:20 global:MMLIBS:20 end
showing the number of tokens available for each license. Pressing the Enter key again updates the list, and the script waits for further input until you close the input stream by typing Ctrl+D.
The log output from the script is sent to the system logging facility (syslog), so you can examine the syslog to find information about the actions performed by the script. More verbose information is sent to the $logfile which is set manually (and optionally) inside the script.
A script is provided that queries the FLEXlm license server and reports the number of tokens available for each license in a format that the queueing software can understand. To make sure the lmutil utility and license file can be found when the script is run by the queueing software, you need to add the locations of the program and the license file to the script, by editing the configuration section at the top of the script. You must have permission to change this file.
-
Use a text editor to edit the file
$SCHRODINGER/utilities/pbs_lic_sensor.pl. -
Edit the line beginning
my $LICENSEso that the full path to the license is between the quotation marks:my $LICENSE="full-path-to-license-file";
You can specify the license server instead of the license file as follows:
my $LICENSE="\@license-server";
or
my $LICENSE="port\@license-server";
The backslash is necessary as Perl interprets @ as a special character.
-
Edit the line beginning
my $LMUTILso that the full path tolmutilis between the quotation marks:my $LMUTIL="full-path-to-lmutil";
-
To reserve licenses for non-queue use, edit the line beginning
my $reservedto set the value to the fraction or percentage of licenses to reserve. For example, either of the following lines reserves 20% of the licenses for non-queue use.my $reserved = 0.2;
my $reserved = "20%";
-
Set the prefix to add for each license feature to distinguish whether it is using FlexLM licenses or the Schrodinger Licensing Manager. This needs to match the prefix used in the setup to generate the configuration for license resource attributes (See the Adding License Attributes section).
my $SCHRODINGER_LICENSING_NAMESPACE = "SLM_";
If you are no longer using FlexLM licenses, and transitioned to use Schrodinger Licensing, this can be set to an empty string.
-
Set the command to run lictool for getting Schrodinger Licensing Manager license features. If the lictool binary is copied to a non-standard location, change this to the path of the binary. This is generally not advisable at the initial stage of transitioning to Schrodinger Licensing.
my $LICTOOL_CMD = "\"$SCHRODINGER/run\" lictool";
-
Save the modified script and close the editor.
-
Verify that the script is configured properly by entering the following command:
perl $SCHRODINGER/utilities/
pbs_lic_sensor.plMMLIBS
The script should print a single number, which is the number of available licenses of the type specified as the command-line argument. You can replace MMLIBS with any other license type.
If you test the script before and after specifying reserved licenses, you should see the number of licenses reported decrease by the specified percentage.
The log output from the script is sent to the system logging facility (syslog), so you can examine the syslog to find information about the actions performed by the script. More verbose information is sent to the $logfile which is set manually (and optionally) inside the script.
An External Load Information Manager (ELIM) script is provided that queries the FLEXlm license server and reports the number of tokens available for each license in a format that the queueing software can understand. It can also be configured to reserve licenses for non-queue use. To make sure the lmutil utility and license file can be found when the script is run by the queueing software, you need to add the locations of the program and the license file to the script, by editing the configuration section at the top of the script. You must have permission to change this file.
-
Use a text editor to edit the file
$SCHRODINGER/utilities/elim.schrodinger. -
Edit the line beginning
my $LICENSEso that the full path to the license is between the quotation marks:my $LICENSE="full-path-to-license-file";
You can specify the license server instead of the license file as follows:
my $LICENSE="\@license-server";
or
my $LICENSE="port\@license-server";
The backslash is necessary as Perl interprets @ as a special character.
-
Edit the line beginning
my $LMUTILso that the full path tolmutilis between the quotation marks:my $LMUTIL="full-path-to-lmutil";
-
To reserve licenses for non-queue use, edit the line beginning
my $reservedto set the value to the fraction or percentage of licenses to reserve. For example, either of the following lines reserves 20% of the licenses for non-queue use.my $reserved = 0.2;
my $reserved = "20%";
-
Set the prefix to add for each license feature to distinguish whether it is using FlexLM licenses or the Schrodinger Licensing Manager. This needs to match the prefix used in the setup to generate the configuration for license resource attributes (See the Adding License Attributes section).
my $SCHRODINGER_LICENSING_NAMESPACE = "SLM_";
If you are no longer using FlexLM licenses, and transitioned to use Schrodinger Licensing, this can be set to an empty string.
-
Set the command to run lictool for getting Schrodinger Licensing Manager license features. If the lictool binary is copied to a non-standard location, change this to the path of the binary. This is generally not advisable at the initial stage of transitioning to Schrodinger Licensing.
my $LICTOOL_CMD = "\"$SCHRODINGER/run\" lictool";
-
Save the modified script and close the editor.
-
Verify that the script is configured properly by entering the following command:
perl $SCHRODINGER/utilities/
elim.schrodinger
The script should print a line like the following every thirty seconds:
2 IMPACT_MAIN 10 MMLIBS 15
The first number is the number of different licenses you have, followed by the name and token count for each license. Exit the script by typing Ctrl+C.
If you test the script before and after specifying reserved licenses, you should see the number of licenses reported decrease by the specified percentage.
The log output from the script is sent to the system logging facility (syslog), so you can examine the syslog to find information about the actions performed by the script. More verbose information is sent to the $logfile which is set manually (and optionally) inside the script.
See the Slurm section in Setting Up License Checking for Queueing Systems.
Next: Installing the Load Script →