This page introduces AMPL floating licenses and gives instructions for initial installation. Need help with a floating license that has already been installed? |
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):
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:
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:
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.
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. (For help with your username or password, contact licensing@ampl.com.) Download the needed files as follows:
License file
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.ampl_lic
link next to mswin
, 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.ampl
link next to either mswin32
(if you are running 32-bit Windows) or mswin64
(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.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:
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.
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. (For help with your username or password, contact licensing@ampl.com.) Download the needed files as follows:
License file
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.ampl_lic
link next to linux-intel32
(if you are running 32-bit Linux) or linux-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 formgzip -dc ???.tgz | tar xf -
ampl
link next to either linux-intel32
or linux-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.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:
4er@atest:~$ cd /usr/local/bin/ampl 4er@atest:~/ampl$ $(pwd)/ampl_lic
4er@atest:~/ampl$ ampl_lic status 20181220 15:52:30: No licenses in use on this machine.
4er@atest:~/ampl$ ampl_lic netstatus 20181220 15:53:22: No licenses in use. Available licenses: ampl 1 machine cplex 1 machine gurobi 1 machine
4er@atest:~/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:
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.
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.