User Tools

Site Tools


platform:sungrid

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 network.com 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:

  • GAMS/BDMLP (LP/MIP)
  • GAMS/COINBONMIN (MINLP)
  • GAMS/COINCBC (LP/MIP)
  • GAMS/COINGLPK (LP/MIP)
  • GAMS/COINIPOPT (CNS/NLP)
  • GAMS/MILES (MCP)

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 rungams.sh 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 (trnsport.zip)
  • Logon to the Sun Grid: “Since Sunday, March 7, 2010, the network.com 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 (trnsport.zip)

  • Edit the catalog job GAMS and add trnsport.zip 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 rungams.sh (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 (batch.zip).
  7. Edit the job GAMS and add batch.zip 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).

#!/bin/ksh  
if [ -f $HOME/.profile ]; then
       . $HOME/.profile
fi
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
  do
    # 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
done 

Notes:

  • 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 rungams.sh 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*
bdmlp_indus89.sh.o25721:HOSTNAME=r133c23z1.network.com
cbc_indus89.sh.o25722:HOSTNAME=r129c24z0.network.com
chenery.sh.o25723:HOSTNAME=r130c05z0.network.com
fuel.sh.o25724:HOSTNAME=r130c25z1.network.com
gemmcp.sh.o25725:HOSTNAME=r133c25z1.network.com
glpk_indus89.sh.o25726:HOSTNAME=r133c23z0.network.com
openpit.sh.o25727:HOSTNAME=r129c26z0.network.com
waterx.sh.o25728:HOSTNAME=r133c36z1.network.com

→ 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

platform/sungrid.txt · Last modified: 2017/09/02 16:03 by support