User Tools

Site Tools


Using the SUN Grid Compute Utility

Note: In early 2010 Oracle announced it was discontinuing the Sun Cloud project. Since Sunday, March 7, 2010, the web site has been inaccessible

GAMS on the SUN Grid

Currently installed is GAMS distribution 22.5 for Solaris 10. Please check the information about the currently supported solvers on that platform. The installation includes these solvers without size restrictions:


The setup supports (any or all of which):

  • Sequential and Parallel Job Submission
  • GAMS Grid Computing Facility
  • Parallel Solver Threads

Simple GAMS Job Submission

Note: We use the model trnsport from the GAMS model library as an example.

  • Create a working directory
  • Copy all required model files (e.g. trnsport.gms) into the working directory directory
  • Create a script there. This file contains the full command line(s) to be executed, e.g.:
    gams/gams trnsport.gms lo=3 

    The entries gams/gams and lo=3 are mandatory. If your script has several lines, please make sure to save it in Unix Format (LF and not CR+LF)

  • Zip all files (
  • Logon to the Sun Grid: “Since Sunday, March 7, 2010, the web site has been inaccessible.

  • Goto to the Job Catalog and checkout the GAMS Job

  • Generate new resource (type Data) named trnsport and upload your compressed files (

  • Edit the catalog job GAMS and add as an user supplied resource. Don't forget to save the the modified job

  • Submit the job

  • Wait until it has finished and download the results

Parallel Job Submission

The example above submits the jobs sequentially to the GRID engine. If you want parallel submission of multiple jobs, you will need a modified setup:

  1. Create a subdirectory called models in your working directory
  2. Copy all model and data files into the directory models
  3. Copy the script (below) and your license file gamslice.txt (if any) into your working directory.
  4. Zip everything, e.g: zip -9r batch *
  5. Logon to the Sun Grid
  6. Generate new resource (type Data), e.g. Batch and upload your compressed files (
  7. Edit the job GAMS and add as an user supplied resource. Don't forget to save the the modified job.
  8. Finally submit the job, wait until it has finished and download the output.

Here are the input and the output-files of an example (batch).

if [ -f $HOME/.profile ]; then
       . $HOME/.profile
LD_LIBRARY_PATH=$HOME/gams:/usr/sfw/lib/amd64:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
PATH=$PATH:$HOME/gams; export PATH
for p in models/*.gms
    # get the file name without path and  extension
	fn=${p##*/};fn=${fn%.gms}.sh;  export fn
        echo "echo Filename: $fn                           " > $fn
        echo "env|grep -i hostname                         " >>$fn
        echo "gams/gams ${p} lo=3                          " >>$fn
        chmod 750 $fn
        qsub -cwd -V  $fn


  • If you want to provide your own GAMS license file (gamslice.txt), copy it into the working directory and not into the models directory. Also in change the GAMS call to: echo “gams/gams ${p} lo=3 license = gamslice.txt ” »$fn
  • Please note that we use simple distributed parallel processing: All jobs are being distributed independently, repetitive tasks to separate Sun Grid Compute Utility nodes for processing and do not require tasks to execute concurrently. Please check the Sun Grid Developer's Guide for more information.

Using the GAMS Grid Computing Facility on the SUN Grid Compute Utility

In addition to parallel job submission the GAMS Grid Computing Facility also supports parallel model solution, i.e. the generation and submission of models for solutions that can be solved independently. Just follow the instructions in Appendix J of the GAMS User's Guide for more information, how to setup your model. As an example you may use the input and output files for the trnsgrid-model of the GAMS model library.

Using Parallel Solver Threads (SMP)

Each CPU of the Sun Grid has 2 Cores with 2 * 4GB of RAM. Two parallel CPLEX solver threads are supported (with the proper license and a cplex option file). Please check the GAMS/CPLEX solver manual for more information.

Getting the number of different CPUs for running a job

  • Unzip the output file from a run into a temporary directory
  • Search for HOSTNAME in *.sh.o*, e.g, e.g.( if grep is installed) for the batch example you will something similar to:
grep -i hostname *.sh.o*

→ This job was running on 8 different CPUs.

Individual Installation of the Software

For more information about an individual installation of GAMS on the SUN Grid Compute Utility please visit the installation notes.

More Resources

IMPRESSUM / LEGAL NOTICEPRIVACY POLICY platform/sungrid.txt · Last modified: 2017/09/02 18:03 by support