Standard Locations

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 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 Mac OS X

Configuration Directories

These folders get searched on Mac OS X (in the listed order):

  • The GAMS system directory
  • The subfolder GAMS in /Library/Preferences below the User's home directory

Here is an example output of gamsinst -listdirs:

Config directories (searched for e.g. gamsconfig.yaml):
/Users/JaneDoe/GAMS32
/Users/JaneDoe/Library/Preferences/GAMS

Data Directories

These folders get searched on Mac OS X (in the listed order):

  • The subfolder GAMS in /Library/Application Support below 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:

Data directories (searched for e.g. gamslice.txt):
/Users/JaneDoe/Library/Application Support/GAMS
/Library/Application Support/GAMS
/Users/JaneDoe/Resources
/Users/JaneDoe/GAMS32

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 in XDG_CONFIG_DIRS or the subfolder GAMS in /etc/xdg
  • The subfolder GAMS in XDG_CONFIG_HOME or the subfolder GAMS in /.config below the User's home directory

Here is an example output of gamsinst -listdirs:

Config directories (searched for e.g. gamsconfig.yaml):
/home/JohnDoe/GAMS32
/etc/xdg/GAMS
/home/JohnDoe/.config/GAMS

Data Directories

On Unix the environment variable XDG_DATA_HOME (see XDG Base Directory Specification) influences the search directories. These folders get searched on Unix (in the listed order):

  • XDG_DATA_HOME or the subfolder GAMS in /.local/share below the User's home directory
  • The subfolder GAMS in XDG_DATA_HOME or the subfolder GAMS in /usr/local/share and the subfolder GAMS in /usr/share
  • The GAMS system directory

Here is an example output of gamsinst -listdirs:

Data directories (searched for e.g. gamslice.txt):
/home/JohnDoe/.local/share/GAMS
/usr/local/share/GAMS
/usr/share/GAMS
/home/JohnDoe/GAMS32

Standard Locations on Windows

Configuration Directories

These folders get searched on Windows (in the listed order):

  • The GAMS system directory
  • The subfolder GAMS in C:\ProgramData
  • The subfolder GAMS in AppData\Local in the User's directory
  • The subfolder GAMS in Documents in the User's directory

Here is an example output of gamsinst -listdirs:

Config directories (searched for e.g. gamsconfig.yaml):
C:\GAMS\32
C:\ProgramData\GAMS
C:\Users\JohnDoe\AppData\Local\GAMS
C:\Users\JohnDoe\Documents\GAMS

Data Directories

These folders get searched on Windows (in the listed order):

  • The subfolder GAMS in Documents in the User's directory
  • The subfolder GAMS in AppData\Roaming in the User's directory
  • The subfolder GAMS in C:\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:

Data directories (searched for e.g. gamslice.txt):
C:\Users\JohnDoe\Documents\GAMS
C:\Users\JohnDoe\AppData\Roaming\GAMS
C:\ProgramData\GAMS
C:\GAMS\32\data
C:\GAMS\32
data