Table of Contents
GAMS looks for specific files in some system-wide and user-specific locations which are independent of the GAMS installation. This allows the user to store these files in one place without the need to adjust anything when moving from one GAMS version to another. These folders are referred to as standard locations and are split into two groups: configuration directories and data directories. Here are some examples of files, which will be found in the data directories (or subfolders of these):
- The GAMS license file
- LibInclude files
- External Equation libraries
- Extrinsic Function libraries
The GAMS configuration file is expected in one of the configuration directories.
The exact location depends on the operating system used and user specific settings. Running gamsinst -listdirs
on the command line shows the folders searched explicitly.
Standard Locations on macOS
Configuration Directories
These folders get searched on macOS (in the listed order):
- The GAMS system directory
- The subfolder
GAMS
in$HOME/Library/Preferences
($HOME
usually contains the user's home directory)
Here is an example output of gamsinst -listdirs
:
Data Directories
These folders get searched on macOS (in the listed order):
- The subfolder
GAMS
in$HOME/Library/Application Support
($HOME
usually contains the user's home directory) - The subfolder
GAMS
in/Library/Application Support
- The subfolder
Resources
next to the GAMS system directory - The GAMS system directory
Here is an example output of gamsinst -listdirs
:
Standard Locations on Unix
Configuration Directories
On Unix the environment variables XDG_CONFIG_HOME
and XDG_CONFIG_DIRS
(see XDG Base Directory Specification) influence the search directories. These folders get searched on Unix (in the listed order):
- The GAMS system directory
- The subfolder
GAMS
of folders from$XDG_CONFIG_DIRS
or the subfolderGAMS
in/etc/xdg
- The folder
$XDG_CONFIG_HOME
or the subfolderGAMS
in$HOME/.config
($HOME
usually contains the user's home directory)
Here is an example output of gamsinst -listdirs
:
Data Directories
On Unix the environment variables XDG_DATA_HOME
and XDG_DATA_DIRS
(see XDG Base Directory Specification) influences the search directories. These folders get searched on Unix (in the listed order):
- The folder
$XDG_DATA_HOME
or the subfolderGAMS
in$HOME/.local/share
($HOME
usually contains the user's home directory) - The subfolder
GAMS
of folders from$XDG_DATA_DIRS
or the subfolderGAMS
in/usr/local/share
and the subfolderGAMS
in/usr/share
- The GAMS system directory
Here is an example output of gamsinst -listdirs
:
Standard Locations on Windows
Configuration Directories
These folders get searched on Windows (in the listed order):
- The GAMS system directory
- The subfolder
GAMS
inC:\ProgramData
- The subfolder
GAMS
inAppData\Local
in the User's directory - The subfolder
GAMS
inDocuments
in the User's directory
Here is an example output of gamsinst -listdirs
:
Data Directories
These folders get searched on Windows (in the listed order):
- The subfolder
GAMS
inDocuments
in the User's directory - The subfolder
GAMS
inAppData\Roaming
in the User's directory - The subfolder
GAMS
inC:\ProgramData
- The subfolder
data
in the GAMS system directory - The subfolder
data\GAMS
in the GAMS system directory - The GAMS system directory
Here is an example output of gamsinst -listdirs
:
Note: When running as a service, the "User's directory" mentioned above is not C:\Users\UserName
but resolves to something like C:\Windows\system32\config\systemprofile
. So the above output could look like this: