Floating license installation guide¶
Note
This page introduces AMPL floating licenses and gives instructions for initial installation.
Need help with a floating license that has already been installed?
To start and operate the floating license manager, see our Manager Guide.
To set options of the floating license manager, consult our Configuration Guide.
To interpret and fix error conditions, consult our Troubleshooting Guide.
Introduction¶
Floating licenses let you run an application on any computer, subject to a limit on the number of application sessions that can be active at the same time. You can purchase one or more floating licenses for AMPL and also for any of the solvers that we sell; the number of purchased floating licenses determines the number of simultaneous sessions allowed. Optionally you make your floating licenses available only to computers at specified network addresses.
To install floating licenses, you must choose one computer to be your AMPL floating license server. The server will need to be running and connected to the network whenever the floating licenses are being used. Additionally, the following machine characteristics of the server must be static (not changing):
at least one IP address
at least one MAC address
the hostname
the C drive label (Windows only)
The other computers that use the floating licenses are called clients. Each client computer must have a network connection to the server, but a client computer does not need to have a static IP address or other static machine characteristics.
One application session for a floating license can be defined in any of several ways. The following configurations are available on our price lists:
one user on one computer, running any number of simultaneous processes; for commercial licenses for AMPL and for the BARON, CONOPT, LGO, LOQO, MINOS, and SNOPT solvers
one user on one computer, running one process; for commercial licenses for CPLEX, Gurobi, Knitro, and Xpress.
any number of users on one computer, each running any number of simultaneous processes; for academic licenses
Other configurations may be available; contact our sales team for details.
The following sections give basic download and installation instructions for servers and clients under Microsoft Windows, Linux, and macOS. We recommend first creating a basic installation on your chosen server, and then creating and testing your client installations. If you encounter error conditions or special situations, consult our additional documentation:
The Floating License Manager Guide explains the use of the program
ampl_lic
to manage client-server communication and to monitor the status of floating licenses.The Floating License Configuration Guide explains additional settings that can be added to floating license files, for example to change the communication port or state-file location.
The Floating License Troubleshooting Guide gives instructions for interpreting common error messages and requesting technical support.
Client computers do not need to run the same operating system as the server. When installing a client, follow the download and installation instructions for the client’s operating system.
Windows Installation¶
Download files. On the computer that you have chosen as your AMPL license server, create a new Windows folder to hold your AMPL files; we will refer to this as your AMPL folder. Then go to the AMPL software download site and log in to your personalized download page by following the instructions that we have previously emailed to you. (If you have not logged in before or forgot your password, click on Login and then click on the password reset link.) Download the needed files as follows:
Click on
My Licenses
and then click on the ID number of your floating license. Scroll down to the box markedDownload ampl.netlic
where you will see a link ending in .netlic; click this link to download your server license file. Rename this file to ampl.netlic and move it into your AMPL folder.Create a client license file: Make a copy of the ampl.netlic file in your AMPL folder, rename the copy to ampl.lic, and then edit the ampl.lic file to delete all but the first line.
Click on
My Downloads
to find theampl_lic
link next tomswin
, and click the link to download a zipfile of all the AMPL floating license manager files. Double-click the zipfile icon, or apply an unzip utility, to extract the contents of the zipfile, and move all of the contained files into your AMPL folder.Find the
ampl
link next to eithermswin32
(if you are running 32-bit Windows) ormswin64
(if you are running 64-bit Windows), and click the link to download a zipfile of all the AMPL program files. Double-click the zipfile icon, or apply an unzip utility, to extract the contents of the zipfile, and move all of the contained files into your AMPL folder.If you will be using this computer to run solvers provided as part of your AMPL purchase, proceed in a similar way to click on solver links to download solver files, and to unzip and move the solver files to your AMPL folder.
Set up the server. In your AMPL folder, find the file sw.exe (or sw if filename extensions have been turned off). Double-click this file to bring up a command window with an sw:
prompt in the upper left. Type each of the following 4 commands at the prompt:
alic_run
ampl_lic status
ampl_lic netstatus
ampl
These commands will start the program ampl_lic
, which manages the floating licenses; will display some floating license status information; and will start the AMPL program. At the end, the contents of your window should look something like this:
sw: alic_run
sw: ampl_lic status
20181114 15:38:27: No licenses in use on this machine.
sw: ampl_lic netstatus
20181114 15:38:33: No licenses in use.
Available licenses:
ampl 3 machines
cplex 2 machines
gurobi 2 machines
knitro 1 machine
sw: ampl
ampl:
The ampl:
prompt indicates that AMPL has successfully started up and checked out a floating license. If the Available licenses
message shows that you have floating licenses for solvers, download a sample model and data file into your AMPL folder, and give AMPL commands as follows to check that each solver runs and reports an optimal solution:
ampl: reset;
ampl: model steelT.mod;
ampl: data steelT.dat;
ampl: option solver minos;
ampl: solve;
MINOS 5.51: optimal solution found.
15 iterations, objective 515033
ampl:
Enter quit
to end the AMPL session and return its license.
After the above steps are completed, the floating license manager ampl_lic
will be running as a background process on your computer. This program will handle all requests to check out and to return floating licenses, and thus it must be running whenever you want the licenses to be available to users. If ampl_lic
is stopped — such as by a restart of the computer — its state will be saved, and you can start it up again by repeating the above instructions.
If you see error messages instead of the messages shown above, consult our Troubleshooting Guide which provides advice on fixing common errors and requesting further help.
If you have special requirements for your installation, such as a particular communication port or folder for temporary files, see our Configuration Guide for instructions. If you need to automatically start ampl_lic
when the server starts up, consult our ampl_lic
start instructions.
Set up a client. Setting up a floating license client to run under Microsoft Windows is almost the same as setting up a floating license server under Windows:
Follow the download instructions for the server as given above;
or, if you have set up your server under Windows, copy your entire server AMPL folder to the client.Keep the ampl.lic file for use by the client,
but delete the ampl.netlic file which is only needed for the server.
Then follow the instructions given above for the server, to run the floating license manager, AMPL, and solvers, and to confirm that they are operating properly. Because you are running on a remote client, requests to check out AMPL and solver licenses will be handled through communications between the ampl_lic
program on the client and the ampl_lic
program that you previously started on the server.
Once you have confirmed that AMPL is successfully checking out floating licenses on a client, you can use AMPL on the client just like on any other computer. When you start AMPL, it will automatically start up ampl_lic
(if necessary) and check out a license.
Linux Installation¶
Download files. On the computer that you have chosen as your AMPL license server, create a new Linux directory to hold your AMPL files; we will refer to this as your AMPL directory. Then go to the AMPL software download site and log in to your personalized download page by following the instructions that we have previously emailed to you. (If you have not logged in before or forgot your password, please click on Login and then click on the password reset link.) Download the needed files as follows:
Click on
My Licenses
and then click on the ID number of your floating license. Scroll down to the box markedDownload ampl.netlic
where you will see a link ending in.netlic
; click this link to download your server license file. Rename this file to ampl.netlic and move it into your AMPL directory.Create a client license file: Make a copy of the ampl.netlic file in your AMPL folder, rename the copy to ampl.lic, and then edit the ampl.lic file to delete all but the first line.
Click on
My Downloads
to find theampl_lic
link next tolinux-intel32
(if you are running 32-bit Linux) orlinux-intel64
(if you are running 64-bit Linux), and click the link to download a compressed archive of all the AMPL floating license manager files. Unpack the archive with a command of the form
gzip -dc ???.tgz | tar xf -
where ??? is replaced by the name of the archive file you downloaded; the name will begin withampl_lic
.linux-intel32. orampl_lic
.linux-intel64. and end with an 8-digit date identifier. Move all of the unpacked files into your AMPL directory.Find the
ampl
link next to eitherlinux-intel32
orlinux-intel64
, and click the link to download a compressed archive of all the AMPL program files. Unpack the archive as in the previous step, and move all of the unpacked files into your AMPL directory.If you will be using this computer to run solvers provided as part of your AMPL purchase, proceed in a similar way to click on solver links to download solver file archives, and to uncompress and move the solver files to your AMPL directory.
Set up the server. Go to your AMPL directory and test your installation as follows:
(1) Use the cd
command to set the current directory to be your AMPL directory.
(2) Execute the command
$(pwd)/ampl_lic
to start the ampl_lic
program, which manages the floating licenses. (An equivalent form `pwd`/ampl_lic
is required by some Unix shells.)
(3) Enter each of the following three commands:
./ampl_lic status
./ampl_lic netstatus
./ampl
These commands will display some floating license status information, and will then start the AMPL program. At the end, the contents of your window should look something like this:
[email protected]:~$ cd /usr/local/bin/ampl
[email protected]:~/ampl$ $(pwd)/ampl_lic
[email protected]:~/ampl$ ampl_lic status
20181220 15:52:30: No licenses in use on this machine.
[email protected]:~/ampl$ ampl_lic netstatus
20181220 15:53:22: No licenses in use.
Available licenses:
ampl 1 machine
cplex 1 machine
gurobi 1 machine
[email protected]:~/ampl$ ./ampl
ampl:
The ampl:
prompt indicates that AMPL has successfully started up and checked out a floating license. If you have installed solvers, download a sample model and data file into your AMPL folder, and give AMPL commands as follows to check that each solver runs and reports an optimal solution:
ampl: reset;
ampl: model steelT.mod;
ampl: data steelT.dat;
ampl: option solver minos;
ampl: solve;
MINOS 5.51: optimal solution found.
15 iterations, objective 515033
ampl:
Enter quit
to end the AMPL session and return its license.
After the above steps are completed, the floating license manager ampl_lic
will be running as a background process on your computer. This program will handle all requests to check out and to return floating licenses, and thus it must be running whenever you want the licenses to be available to users. If ampl_lic
is stopped — such as by a restart of the computer — its state will be saved, and you can start it up again by repeating the above instructions.
If you see error messages instead of the messages shown above, consult our Troubleshooting Guide which provides advice on fixing common errors and requesting further help.
If you have special requirements for your installation, such as a particular communication port or folder for temporary files, see our Configuration Guide for instructions. If you need to automatically start ampl_lic
when the server starts up, consult our ampl_lic
start instructions.
Set up a client. Setting up a floating license client to run under Linux is almost the same as setting up a floating license server under Linux. To get the needed files, you can proceed in either of the following ways:
Follow the download instructions for the server as given above;
or, if you have set up your server under Linux, copy your entire server AMPL folder to the client.Keep the ampl.lic file for use by the client,
but delete the ampl.netlic file which is only needed for the server.
Then follow the instructions given above for the server, to run the floating license manager, AMPL, and solvers, and to confirm that they are operating properly. Because you are running on a remote client, requests to check out AMPL and solver licenses will be handled through communications between the ampl_lic
program on the client and the ampl_lic
program that you previously started on the server.
Once you have confirmed that AMPL is successfully checking out floating licenses on a client, you can use AMPL on the client just like on any other computer. When you start AMPL, it will automatically start up ampl_lic
(if necessary) and check out a license.
macOS Installation¶
Floating licenses are installed through the macOS Darwin operating system, which is similar to Linux. Thus, the instructions are much the same as given for Linux above. Contact licensing@ampl.com for additional assistance.