wiki:Installation

This page gives detailed instructions to help you installing the GAMSlinks on your system.

If you have problems with the installation of the GAMSlinks, don't hesitate to ask me by using the mailing list or by reporting a bug (you need to login first).

Obtain GAMSlinks package

The latest stable version is GAMSlinks-latest-stable.png. You can obtain it via subversion by

  svn checkout https://projects.coin-or.org/svn/GAMSlinks/stable/0.4 GAMSlinks

See also the COIN-OR documentation for the download of source code and the current issues page.

When you checkout the GAMSlinks, you will also get the following COIN-OR packages:

Main installation steps

  1. Install a GAMS system, if you do not have one.
  2. Download the GAMS I/O libraries for your system.
  3. Download additional COIN-OR solvers that are not included by default.
  4. Download and install Glpk, if you want to use the GAMS/GLPK link.
  5. Download and install Lapack, Blas, and HSL or MUMPS, if you want to use the GAMS/IPOPT or GAMS/Bonmin link.
  6. Download and install SCIP, if you want to use the GAMS/SCIP link.
  7. Setup the site script for the configure call of the GAMSlinks project.
  8. Call configure, make, and make install.
  9. Install the GAMS/COIN-OR links in your GAMS system.
  10. Troubleshooting?

Detailed instructions

1. Installation of a GAMS system

While it is possible to build the solvers with GAMS links without having a GAMS system available, a GAMS system will be needed to use them. It is recommended to have at least version 22.6.

You can download a GAMS demonstration system here. The demonstrations limits are:

  • Number of constraints: 300
  • Number of variables: 300
  • Number of nonzero elements: 2000 (of which 1000 nonlinear)
  • Number of discrete variables: 50 (including semi continuous, semi integer and member of SOS-Sets)

2. Installation of GAMS I/O libraries

The GAMSlinks use a set of GAMS I/O library to read an optimization model, write a solution file, and handle option files.

The directory ThirdParty/GAMSIO contains a script that downloads (precompiled) GAMS I/O libraries. Currently available are:

  • LNX: AMD or Intel-based 32-bit (x86_32) Linux systems with gcc/gfortran compilers
  • LX3: AMD or Intel-based 32-bit (x86_32) Linux systems without gfortran
  • LEG: AMD or Intel-based 64-bit (x86_64) Linux systems with gcc/gfortran compilers
  • LEI: AMD or Intel-based 64-bit (x86_64) Linux systems without gfortran
  • SIG: Solaris 10.0 or higher systems on a 64-bit Intel or AMD CPU.
  • DIG: Macintosh Intel-based systems (x86_32, Darwin) with the gcc/gfortran compilers
  • DII: Macintosh Intel-based systems (x86_32, Darwin) without gfortran
  • VIS: Windows XP, Windows Server 2003, and compatible on AMD- or Intel-based architectures (x86_32) with cl 13.10 (VS2003) and Compaq Fortran compiler
  • WEI: Windows Server 2003 64bit and compatible on AMD- or Intel-based (x86_64) architectures with Intel compilers

The VIS build is not suggested since the required compilers are very old and known to fail on compiling COIN-OR solvers!

3. Download additional COIN-OR solvers

By using the GAMS/OSI link, additional solvers which provide a COIN-OR OSI OSI (Open Solver Interface) can be easily connected to GAMS. Currently, the build system and the OSI link are prepared to compile with support for CPLEX and the COIN-OR solvers SYMPHONY, DyLP, and Vol.

To activate them, you only need to provide the corresponding solver. The easiest way to do this is by opening the file Externals from the GAMSlinks base directory in your favorite editor, uncommenting the line that corresponds to the solver(s) you want to use, and to update your GAMSlinks download:

   svn propset svn:externals -F Externals .
   svn update

4. GNU Linear Programming Toolkit (GLPK)

In the directory ThirdParty/Glpk you find the script get.Glpk that downloads the GNU Linear Programming Toolkit. Just run it or read the instructions in ThirdParty/Glpk/INSTALL.Glpk.
Note: It is YOUR RESPONSIBILITY to ensure that you are entitled to download and use this third party package.

5. Installation of Lapack, Blas, HSL, and MUMPS

Ipopt and Bonmin require some further third party packages. For Lapack, Blas, and Mumps you find download scripts in the directories ThirdParty/Lapack, ThirdParty/Blas, and ThirdParty/Mumps. Please read also the instructions regarding Ipopts requirements of external codes.

6. Solving Constrained Integer Programs (SCIP)

In the directory ThirdParty/SCIP you find the file INSTALL.SCIP with instructions on how to obtain and prepare SCIP for the build of a GAMS/SCIP interface. SCIP can be obtained from the SCIP website, it is free for academic use only.
Note: It is YOUR RESPONSIBILITY to ensure that you are entitled to download and use this third party package. Please read the SCIP licence terms.

7. Setup configure call

We suggest to compile the code in a different place than the one where the source code is located using the VPATH feature of the build system.

You should consider whether you need to the following options of the configure script (either as arguments in your configure call or by setting up a site-file):

  • When a GAMS system is in the search path, it will automatically be found by the GAMSlinks configure script. Alternatively you can provide a path with the --with-gamssystem option.

  • If you want to use the GAMS I/O libraries of the types LX3, LEI, or DII without having the Intel Fortran Compiler present, you have to either have a GAMS system available at build time or provide a directory with the Intel Fortran Compiler libraries with the --with-fort-libdir option. In the former case, the libraries of the Intel Fortran Compiler as they are distributed with a GAMS system are used (this option might not work for DII). For the latter case, the necessary libraries for some platforms are also available here.
  • If you need to overwrite the automatically determined GAMS system code, then you can do this with the --with-gamsio-code option. This is necessary, for example, when you want to compile 32-bit libraries on a 64-bit machine. In this case, you would give the additional argument --with-gamsio-code=LNX (or LX3) to configure.
  • By default, the Gams/OS link does not include the OS interfaces to COIN-OR solver into its binary. Thus, only remote solves are possible. To include also the OS solver interfaces, you can specify the argument --enable-os-solver.

When compiling under Windows with the Microsoft compiler, you might need to set also the following variables:

  • Unfortunately, while the GAMS I/O libraries are compiled with the Microsoft compiler and linked against LIBC, the COIN-OR buildsystem links by default against LIBCMT when compiling with the Microsoft compiler (cl). In this case you need to change the compiler flags that are used when COIN-OR packages are compiled:
       ADD_CXXFLAGS="-nologo -EHsc -GR"
       DBG_CXXFLAGS=" "
       OPT_CXXFLAGS="-O2 -DNDEBUG"
    
  • MAKE is the name of the make program to use. For me, I had to set it to gmake:
       MAKE=gmake
    

Now you can use the GAMSlinks build system as documented on the BuildTools webpage. That is, you just call

  1. configure (for VPATH-installations, see here)
  2. make (or the make program that you prefer, e.g., gmake)
  3. make install (or using the make program that you prefer)

This should setup the Makefiles, compile all COIN-OR packages and install binaries for the COIN-OR/GAMS links in the subdirectory bin.

9. Installation of COIN-OR solvers in your GAMS system

make install also creates the files gmscc_.zip, gmscg_.zip, gmsip_.zip, gmsbm_.zip, gmsosi_.zip, gmsos_.zip, gmssc_.zip which contain GAMS/Cbc, GAMS/GLPK, GAMS/Ipopt, GAMS/Bonmin, GAMS/Osi, GAMS/OS, and GAMS/SCIP. To install them in your GAMS system, you can copy these files into the GAMS system directory and call gamsinst there. gamsinst will then unpack the files and makes GAMS aware about the new solvers.
Alternatively, if the GAMSlinks build system knows the location of your GAMS distribution, then you can do a make gams-install. This will copy the files and call gamsinst for you.

To use the solvers under GAMS, you give the arguments MIP=Cbc, MIP=Glpk, NLP=Ipopt, MINLP=Bonmin, LP=OSI, MIP=OS, or MIP=SCIP to your gams call. Note, that CoinCbc, CoinGlpk, CoinIpopt, CoinBonmin, and CoinScip are already available with newer GAMS distributions. These are the COIN-OR solvers as they are shipped within the GAMS distribution, not the one that you have just compiled.

10. Troubleshooting

With a GAMS system before version 22.6, it can happen that calling Cbc, Glpk, or Osi fails with a message concerning a missing symbol in the library liboptdclib.so (or similiar, depending on the system type). This is due to a missing backward compatibility in the GAMS I/O libraries. You can easily upgrade the outdated library in your GAMS distribution by overwriting it with the corresponding file from ThirdParty/GAMSIO/<system-type>.

Last modified 9 years ago Last modified on Dec 2, 2009 11:03:42 AM