License Setup

This section deals with the installation of a GAMS license. Information on different license types and licensing in general can be found on our website.

The classic GAMS license consists of six lines of text typically delivered via email. Users need to copy and paste this text into a file in some designated locations on their hard drive so GAMS can find it. In addition to this email-based delivery method, GAMS will increasingly rely on a modern delivery method for licenses. This approach supports new licensing options, such as network licenses, providing greater flexibility and improved resource management capabilities. Introduced in GAMS version 47, this license delivery method will continue to be refined over time. The core of this new method is a 36-character access code to the license. The access code enables users to retrieve their GAMS license from a license server, which provides an eight-line text-based license that again needs to be stored on the user's hard drive.

Install a License via GAMS Studio

The simplest way to install a license is through GAMS Studio. For detailed instructions, please refer to the GAMS Studio documentation.

Install a License Manually

If using GAMS Studio is not an option, you can install the license manually. If you received the license contents via email, copy all the lines into a new file named gamslice.txt and place this file in a location searched by GAMS. If you received the GAMS license as a 36-character access code, read more below.

Attention
If you install GAMS on macOS using the self-extracting archive, do not store the gamslice.txt in the GAMS system directory. Read more about this here.

Obtaining a License using an Access Code

Installing and activating a license using an access code is done using the command-line utilities gamsgetkey and gamsprobe that are located in the GAMS installation directory.

  1. Navigate to a directory that GAMS searches and where you have write permissions.
  2. Activate your license by running gamsgetkey in the terminal, using the access code as an argument. For example:

    /path/to/GAMS/installation/directory/gamsgetkey xxyyzzxx-yyzz-xxyy-zzxx-yyzzxxyyzzxx > gamslice.txt

    Using output redirection (> gamslice.txt) will send the command-line output directly to a file. Alternatively, you can omit this part and manually copy the output to a file.

    Note
    When using the gamsgetkey utility (or the GAMS licensing dialog in GAMS Studio, see above) to activate a license, the access code, along with the node ID, username, number of cores, and available memory, is sent to the GAMS license server once. This information is used to determine the validity and scope of the license. If network communication is not possible, use the gamsprobe utility as described in Obtaining a License without Network Communication.
  3. If not already done, place the gamslice.txt in a location searched by GAMS.

Obtaining a License without Network Communication

For machines that are not connected to the internet, you can probe the node's data and get a license via a machine connected to the internet. Follow these steps:

  1. On the target machine, navigate to a directory where you have write permissions and run gamsprobe to gather necessary device data:

    /path/to/GAMS/installation/directory/gamsprobe > info.json

    Using output redirection (> info.json) will send the command-line output directly to a file. Alternatively, you can omit this part and manually copy the output to a file.

  2. Transfer the info.json file and the access code to a machine with network access. There, run gamsgetkey to activate the license:

    /path/to/GAMS/installation/directory/gamsgetkey xxyyzzxx-yyzz-xxyy-zzxx-yyzzxxyyzzxx -i info.json > gamslice.txt

  3. Transfer the gamslice.txt to the target machine and place it in a location searched by GAMS.

License Problems

Errors or warnings triggered by a problem with the GAMS license file (gamslice.txt) are reported in stdout. In GAMS Studio these are visible in the system log. Below are some typical error and warning messages and instructions on how to overcome them.

No License File present

Without a license file, GAMS will not work. If you have received a license file or access code, follow the instructions from the previous section. Do not rename the license file or modify its contents. Without a license GAMS will give you an error message like the one below:

*** Error: No license file found.

Note that this error should not normally occur, as a demo license is included with every GAMS installation.

License File Invalid or Corrupted

Running GAMS with an invalid license will give you an error message like the one below:

*** Error: The installed license C:\Users\username\Documents\GAMS\gamslice.txt is invalid.

Do not try to modify your license file, any change will break it. If you received the license via email but no longer have the original file, please contact sales@gams.com and ask for a copy of your license file. Please attach the license file you are currently using. If your GAMS license was provided as a 36-character access code, you can re-install the license using the access code either through GAMS Studio or manually. Note that this must be done on the machine for which the license was issued.

This error also occurs if you are using a license file that was issued for a different platform.

License File expired

If you try to use an old license file with a newer GAMS distribution, you might encounter an error message stating:

*** License file too old for this version of GAMS.
*** Maintenance expired 2840 days ago.
*** More than 60 days since expiration, sorry...
*** Run an older GAMS system or renew the license

Replace that GAMS system with the one you got together with your license file (use the Check for Update utility of GAMS Studio to find out the latest version you can use with the current license; old systems are available on request from sales@gams.com) or update your license to the current version.

No License (for a particular Solver) found

If a solver you are trying to use (or the default solver) is not included in your license file, and the model size exceeds the limits of the free demo or community version, you will get an error stating:

*** No license found
*** To update your license, please contact your distributor.

Check whether the default solvers for a particular problem class are included in the license. Please note that some of the solvers call other solvers as a sub-solver. For example, GAMS/DICOPT requires an NLP and a MIP solver.

Warnings

License File too old for this Version of GAMS

The complete message is:

*** License file too old for this version of GAMS.
*** Maintenance expired xx days ago.

If GAMS continues working, you can ignore this warning. However, any forthcoming GAMS distribution will most likely not work, but downgrade to the limits of the free demo system.

License File has expired xx days ago

This warning (without further error messages) indicates that the time limited license (e.g. an evaluation license) will stop working soon.