slvtest.gms : Solver combination test

Description

This program tests return and status codes of all models in the GAMS
model library with all combinations of available solvers. This
generates a large number of files and may use some 20Mb of disk space
and therefore should be executed in a separate directory. Return and
status codes are collected in the 'Trace File' which can be further
analyzed by using 'A=GT', the gtrace option of gams. Further this program
tests whether solvers write to stdout and stderr.


Small Model of Type : GAMS


Category : GAMS Model library


Main file : slvtest.gms   includes :  gamsmod.inc  slvdata.inc  gamsref.inc

$title Makes a Trace of Models with all combinations of available Solvers (SLVTEST,SEQ=216)

$onText
This program tests return and status codes of all models in the GAMS
model library with all combinations of available solvers. This
generates a large number of files and may use some 20Mb of disk space
and therefore should be executed in a separate directory. Return and
status codes are collected in the 'Trace File' which can be further
analyzed by using 'A=GT', the gtrace option of gams. Further this program
tests whether solvers write to stdout and stderr.


GAMS Development Corporation, Modeling Tool Box.

By default, all models in the library will be executed.
You can override this with a U1 or USER1 command line
parameter. For example

 > gams slvtest               will run all models

 > gams slvtest u1=small      will run small models only

 > gams slvtest u1=big        will run big models only

 > gams slvtest u1="ord(s) < 5"  runs first 5 models

 > gams slvtest u1=initial    runs slvtest with initial Q&A tests

 > gams slvtest u1=lic        runs slvtest with full Q&A tests (requires license)

The model employs a skip list for models that
   - deserve to be skipped (set exsmd)
   - await a fix (set exsmw)
   - await classification (set exsmc)

In order to run all models, except those in the "deserve to be skipped"
list, the user can run with the --runall=yes option, i.e.

 > gams slvtest --runall=yes

Keywords: GAMS language features, GAMS model library
$offText

$eolCom //
$onDollar

$set setup     slvdata.inc      // gams program to generate new source
$set setupout  slvdata.lst      // listing file for setup
$set driveout  slvdrve.lst      // listing file for drive
$set drivelog  slvdrve.log      // log file for drive
$set tracerep  slvtest.rep      // Gtrace report file
$set trace     slvtest.txt      // trace file  (will be appended to)
$set tracelog  slvtesttrace.log // trace log file
$set drive     slvtest.inc      // new gams source generated by setup

*logoption will be set to 2 for all subsequent gams calls
$set gamslo 2

$set tl        6
$if not %gams.tl%==0    $set tl %gams.tl%

$if %runall%==yes  $set runall --runall=yes
$if %runall%==no   $set runall --runall=no
$if not set runall $set runall --runall=no

$if     set PREFIX $set PREFIX --PREFIX=%PREFIX%
$if not set PREFIX $set PREFIX --PREFIX=%system.buildcode%

$if not set weaktl $set weaktl 3
$set weaktlforward --weaktl=%weaktl%

$if     set c1 $set c1 --c1=%c1%
$if not set c1 $set c1
$if     set c2 $set c2 --c2=%c2%
$if not set c2 $set c2
$if     set c3 $set c3 --c3=%c3%
$if not set c3 $set c3
$if     set c4 $set c4 --c4=%c4%
$if not set c4 $set c4
$if     set c5 $set c5 --c5=%c5%
$if not set c5 $set c5

$if     set fail $ set fail --fail=%fail%
$if not set fail $ set fail --fail=failures_slv.gms

$if     set keepfail $ set keepfail --keepfail=1
$if not set keepfail $ set keepfail --keepfail=0

$if not '%gams.u1%' == '' $call gams %setup% u1="%gams.u1%" o=%setupout% lo=%gamslo% threads=%gams.threads% %runall% %PREFIX% tl=%tl% %weaktlforward% %c1% %c2% %c3% %c4% %c5% %fail% %keepfail%
$if     '%gams.u1%' == '' $call gams %setup% o=%setupout% lo=%gamslo% threads=%gams.threads% %runall% %PREFIX% tl=%tl% %weaktlforward% %c1% %c2% %c3% %c4% %c5% %fail% %keepfail%

$ifE errorLevel<>0 $echo  "Compilation error(s) RC= (%setup% failed)" > %tracerep%0
$ifE errorLevel<>0 $echo  "Compilation error(s) RC= (%setup% failed)" > %tracerep%1
$ifE errorLevel<>0 $abort "Compilation error of %setup%"

$call gams %drive% o=%driveout% lo=%gamslo% lf=%drivelog%

* may not have been deleted
$if dexist slv_optionfiles $call rm -rf slv_optionfiles

* produce report0
$call                    gams %trace%0 a=gt ps=0 pw=255 o=%tracerep%0 tl=%tl% lo=%gamslo% lf=%tracelog%0
$if exist slvtest.sum $call 'mv -f slvtest.sum slvtest.sum0'

* produce report1
$if exist %trace%1 $call gams %trace%1 a=gt ps=0 pw=255 o=%tracerep%1 tl=%weaktl% lo=%gamslo% lf=%tracelog%1
$if exist slvtest.sum $call 'mv -f slvtest.sum slvtest.sum1'