$onText Data file for running slvtest. Option --runall=yes will include models in the skip lists (sets exsmw, exsml). $offText $offListing $include gamsmod.inc $onListing $eolCom // $onDollar $set slvcreate slvcreate.gms $set trace slvtest.txt // trace file (will be appended to) $set SLASH \ $if %system.filesys% == UNIX $set SLASH / $if not set weaktl $set weaktl 3 $if not set PREFIX $set PREFIX %system.buildcode% $if not set fail $set fail failures_slv.gms $if not set keepfail $set keepfail 0 $setNames %fail% v1 v2 v3 $set fail2 %v2%I%v3% $if %keepfail%==0 $call rm -f %fail% %fail2% $if not exist %fail% $echo "$call rm -f %fail2%" >> %fail% $echo * Failures of slvtest run started at %system.date% %system.time% >> %fail% $set cond %gams.u1% $if '%cond%' == '' $set cond 'ord(s) <= card(s)' $ifI '%cond%' == 'test' $set cond 'ord(s) = 23' $ifI '%cond%' == 'initial' $set cond '(ord(s)=1 or ord(s)=27 or ord(s)=99 or ord(s)=124 or ord(s)=131 or ord(s)=149 or ord(s)=208 or ord(s)=212 or ord(s)=248 or ord(s)=269 or ord(s)=284 or ord(s)=291 or ord(s)=311)' $ifI '%cond%' == 'big' $set cond 'big(s)' $ifI '%cond%' == 'small' $set cond 'not big(s)' $ifI '%cond%' == 'small_1' $set cond '(not big(s) and ord(s) <= 150)' $ifI '%cond%' == 'small_2' $set cond '(not big(s) and ord(s) > 150 and ord(s) <= 300)' $ifI '%cond%' == 'small_3' $set cond '(not big(s) and ord(s) > 300 )' $ifI '%cond%' == 'lic' $set licensed 1 $ifI '%cond%' == 'lic_1' $set licensed 1 $ifI '%cond%' == 'lic_2' $set licensed 1 $ifI '%cond%' == 'lic_3' $set licensed 1 $ifI '%cond%' == 'lic' $set cond 'ord(s) <= card(s)' $ifI '%cond%' == 'lic_1' $set cond '( ord(s) <= 150)' $ifI '%cond%' == 'lic_2' $set cond '(ord(s) > 150 and ord(s) <= 300)' $ifI '%cond%' == 'lic_3' $set cond '(ord(s) > 300 )' $onText initial includes: 'ord(s)=1' lp trnsport 'ord(s)=212' cns korcns 'ord(s)=27' nlp sample 'ord(s)=248' scenred srkandw 'ord(s)=124' minlp alan 'ord(s)=269' mpec nash 'ord(s)=131' mcp two3mcp 'ord(s)=284' qcp qdemo7 'ord(s)=149' mpsge kehomge 'ord(s)=291' miqcp qmeanvar 'ord(s)=208' mip absmip 'ord(s)=311' gsolver $offText $set cond1 1 $set cond2 1 $set cond3 1 $set cond4 1 $set cond5 1 $if set c1 $set cond1 sameas(s1,'%c1%') $if set c2 $set cond2 sameas(s2,'%c2%') $if set c3 $set cond3 sameas(s3,'%c3%') $if set c4 $set cond4 sameas(s4,'%c4%') $if set c5 $set cond5 sameas(s5,'%c5%') $set TESTLIM 2000 $set MYWORKSPACE 500 $set MINLPSpecial skip = ((sameas('MINLP',t1) or sameas('MIQCP',t1)) and minlpskip(s1,s2,s3)) or (sameas('MIQCP',t1) and miqcpskip(s1,s2,s3)) * s Model Sequence Numbers * m model names in alphabetic order parameter test model type summary; test(s,t) = ts(t,s); test(s,'total') = sum(t, test(s,t)); test('total',t) = sum(s, test(s,t)); *display test; test(s,'mcp' )$ts('mpsge',s) = 1; test(s, 'mpsge') = 0; * this enables looping over nlp/qcp and mip subsolvers for minlp/miqcp solvers test(s,'nlp' )$ts('minlp',s) = 1; test(s,'mip' )$ts('minlp',s) = 1; test(s,'qcp' )$ts('miqcp',s) = 1; test(s,'mip' )$ts('miqcp',s) = 1; test(s,'gams')$ts('gams' ,s) = 0; * sets below are defined in gamsmod.inc * big(s) cannot be solved with student system * notest(s) should not be used for testseries * t model types DECIS, GAMS, LP, MIP, ... $onEmpty set solver master set of solvers / alphaecp, antigone, baron, cbc, conopt3, conopt, copt, cplex dicopt, gurobi, gurobiold, highs, ipopt, ipopth, jams, knitro, lindo, miles, minos mosek, nlpec, odhcplex, path, pathnlp quadminos, sbb, scip, shot, snopt, soplex, xpress, xpressold / dsolver dummy solvers to access solvers / decisc / gsolver(solver) solvers with 10x10 demo limit / antigone, baron, lindo / gsolverlim(solver) solvers with 2000x3000 global limit / / gsolverdet(solver) "solvers that are deterministic global for nonlinear nonconvex problems (cplex and gurobi have this off by default)" / antigone, baron, lindo, scip / ; alias (solver,minlpslv,nlpslv,qcpslv,mipslv); set minlpskip(minlpslv,nlpslv,mipslv) 'never use these combos for MINLP' miqcpskip(minlpslv,qcpslv,mipslv) 'never use these combos for MIQCP'; * most MINLP/MIQCP solvers do not care about GAMS options NLP/QCP/MIP to select subsolvers, so run only with default subsolvers minlpskip(solver,nlpslv,mipslv) = yes; minlpskip(solver,'%system.nlp%','%system.mip%') = no; miqcpskip(solver,qcpslv,mipslv) = yes; miqcpskip(solver,'%system.qcp%','%system.mip%') = no; * for AlphaECP, however, since MIPs can grow large, and because cplex may hang (#6075), only use free MIP solvers minlpskip('ALPHAECP','%system.nlp%','%system.mip%') = yes; miqcpskip('ALPHAECP','%system.qcp%','%system.mip%') = yes; minlpskip('ALPHAECP','%system.nlp%','Cbc') = no; miqcpskip('ALPHAECP','%system.qcp%','Cbc') = no; * for DICOPT, run with all NLP solver that are not in gsolverdet and all MIP solver except for BARON and LINDO minlpskip('DICOPT',nlpslv,mipslv)$(not gsolverdet(nlpslv)) = no; miqcpskip('DICOPT',qcpslv,mipslv)$(not gsolverdet(qcpslv)) = no; minlpskip('DICOPT',nlpslv,'BARON') = yes; minlpskip('DICOPT',nlpslv,'LINDO') = yes; * for SBB, run with all NLP solver that are not in gsolverdet, SBB does not solve MIPs minlpskip('SBB',nlpslv,'%system.mip%')$(not gsolverdet(nlpslv)) = no; miqcpskip('SBB',qcpslv,'%system.mip%')$(not gsolverdet(qcpslv)) = no; set ssc solver subsystem codes / 00 'GAMS/Demo GAMS Development Corp' AT 'ANTIGONE Princeton University' BA 'BARON University of Illinois at Urbana-Champaign' CT 'COPT Cardinal Operations' CL 'CPLEX/L Cplex Optimization' CO 'CONOPT ARKI Consulting' CM 'CPLEXPAR Cplex Optimization' CP 'CPLEX Cplex Optimization' DI 'DICOPT EDRC, CMU' EC 'ALPHAECP Abo Akademi University, Finland' FR 'FREE Maintained Freeware' GE 'MPS/GE Thomas Rutherford' GU 'GUROBI Gurobi Optimization' IP 'IPOPT COIN-OR Initiative' HI 'HIGHS ERGO' KN 'KNITRO Artelys' LD 'LINDO Lindo Systems Inc.' LI 'LINDOGLOB Lindo Systems Inc.' M5 'MINOS Stanford University' MC 'MILES Thomas Rutherford' MK 'MOSEK/MIP EKA Consulting ApS' OD 'ODHCPLEX Optimization Direct Inc.' PT 'PATH University Wisconsin, Madison' SB 'SBB ARKI Consulting' SN 'SNOPT Stanford University' XP 'XPRESS Dash Associates' /; set sc(solver,ssc) / alphaecp.EC antigone.AT baron.BA (cbc,ipopt,scip,shot,soplex).00 ipopth.IP highs.00 (conopt3,conopt).CO copt.CT cplex.(CP,CM) odhcplex.OD dicopt.DI gurobi.GU gurobiold.GU knitro.KN lindo.LD miles.MC (minos,quadminos).M5 mosek.MK (path,pathnlp).PT sbb.SB snopt.SN xpress.XP xpressold.XP /; *--------! Skip lists !--------* set exm(s) exclusion list for model / /; exm(deprecated(s)) = yes; set exS(solver) exclusion list for solvers / /; set exsmd(s,solver) model solver combination that deserve exclusion / 239.pathnlp 'pathnlp ends due to non-sufficient lemke_rank_deficiency_iterations' //with increased lemke_rank_deficiency_iterations path still stops due to lack of progress (95,387,395).(cplex, odhcplex, gurobi, gurobiold, mosek, xpress, xpressold) 'do not support QCPs that are not SOCP-representable so far' 296.(copt,mosek) 'nonconvex MIQP (cplex etc. can do nonconvex products of binaries)' 273.(conopt3, conopt, cplex, lindo, minos, pathnlp, snopt) 'Difficult SOCP' 338.lindo 'Difficult MIP, should not spend too much time on it' (382,392).lindo 'Lindo does not solve equilibrium EMPs' (68,426).lindo 'Mosek call by Lindo fails with assert, at least on DEG, #5739' (321,423).(antigone,baron,lindo,scip) 'there is no point in doing a stochastic searches with a global solver' 398.(baron,pathnlp) 'GUSS requires a solvelink 5 solver' 399.(baron,pathnlp) 'GUSS requires a solvelink 5 solver' 400.(baron,pathnlp) 'GUSS requires a solvelink 5 solver' 423.pathnlp 'GUSS requires a solvelink 5 solver' 424.miles 'GUSS requires a solvelink 5 solver' 228.(xpress,xpressold) 'MILES fails with eval error after Xpress solve' 205.minos 'cycling: expand frequency (see useopt3) does not help, #1700 wontfix' 23.snopt 'cannot solve one DNLP (DNLPs not officially supported)' (139*156,304).knitro 'knitro does not support MPSGE' $if not set licensed 379.knitro 'NNZ exceed additional knitro demo limit' $if %system.buildcode% == WEI (315,400).mosek 'grid on windows does not really work, especially with mosek, #3811' 226.mosek 'DICOPT generates MIPs with so large coefficients that they are rejected by Mosek, #2063' (23,68,259,265,426).(gurobi,gurobiold) 'function abs not supported' 300.(gurobi,gurobiold) 'function gamma not supported' 301.(gurobi,gurobiold) 'function betareg not supported' (302,303).(gurobi,gurobiold) 'function loggamma not supported' 393.(gurobi,gurobiold) 'function centropy not supported' 217.(gurobi,gurobiold) 'function signpower not supported' 111.(gurobi,gurobiold) 'function errf not supported' 305.(gurobi,gurobiold) 'function beta not supported' 250.(gurobi,gurobiold) 'cannot solve to required accuracy' 267.(xpress,xpressold) 'default optcr=0.1 may not terminate with one of the expected solutions' /; // end exsmd * solnpool (326) sets the MIP solver hard to CPLEX exsmd('326',solver)$(not sameas(solver, 'cplex')) = yes; * dicegrid (330) sets the MIP solver hard to CPLEX exsmd('330',solver)$(not sameas(solver, 'cplex')) = yes; * ccoil (370) has its own logic to set the MIP solver exsmd('370',solver)$(not sameas(solver, 'cplex')) = yes; * solmpool (394) sets the MIP solver hard to CPLEX exsmd('394',solver)$(not sameas(solver, 'cplex')) = yes; * asyncjobs (403) sets the MIP solver hard to GUROBI exsmd('403',solver)$[(not sameas(solver, 'gurobi')) and (not sameas(solver, 'gurobiold'))] = yes; * quadminos is a slow LP solver, so run only on small models exsmd(s,'quadminos')$big(s) = yes; * model has dicontinuities all over the place, run only with Lindo for now exsmd('407',solver)$(not sameas(solver, 'lindo')) = yes; * model has dicontinuities all over the place and Lindo timeouts exsmd('408',solver) = yes; exsmd('409',solver) = yes; * cbenders (415) sets the MIP solver hard to CPLEX and SCIP exsmd('415',solver)$(not sameas(solver, 'cplex')) = yes; set exsmw(s,solver) waiting for fix / $if set licensed (24,69,80,234).scip 'cplex does not provide ray for unbounded LP, #3587' 123.cbc 'clp in cbc has issues to solve relaxation and does not stop on timelimit on 2nd MIP generated by DICOPT on DEG, https://github.com/coin-or/Cbc/issues/507' $if %system.buildcode% == DAC 379.cplex 'hangs when multithreading is enabled, #5816' $if %system.buildcode% == WEI 329.knitro 'fails' $if %system.buildcode% == DEG 329.knitro 'fails' $if %system.buildcode% == WEI 391.knitro 'fails' $if %system.buildcode% == DAC 233.antigone 'hangs, #6505' $if %system.buildcode% == LAG 327.knitro 'crash #6762' 35.baron 'wrong marginals from BARON lead to division by zero on LEG' /; set exsml(s,solver) off limits / *reslim 600 without finding feasible point (205,350).alphaecp 'reslim exceeded' (395,432).minos 'reslim exceeded on tricp, trussm' (81,97,107,209,210,211,212,233,239,240,241).scip 'reslim exceeded' 270.dicopt 'reslim exceeded in generated mip relaxation' $if %system.buildcode% == LEG 328.ipopt 'with the update to Mumps 5.6.0, Ipopt keeps iterating without progress on one LP, on anton' $if %system.buildcode% == DAC (273,383).baron 'reslim exceeded, maybe because Ipopt is currently off on DAC' $if %system.buildcode% == WEI 397.baron 'reslim exceeded' 383.knitro 'iterlim / reslim without finding feasible point' $if %system.buildcode% == WEI 224.knitro 'stuck without finding feasible point' $if %system.buildcode% == DEG 123.knitro 'iterlim / reslim without finding feasible point' 399.lindo 'With Lindo 15 not all scenarios can be solved within 600s reliably' 434.(cbc,highs) '30s timelimit exceeded' (81,117,125,202,205,206,209,223,224,226).(xpress,xpressold) 'iterlim / reslim without finding feasible point' 118.(xpress,xpressold) '15s subproblem timelimit exceeded' 401.(xpress,xpressold) '60s subproblem timelimit exceeded' (24,25,69,81,84,100,117,125,223,227,267,401,410).(gurobi,gurobiold) 'iterlim / reslim without finding feasible point' *other limits 148.miles 'Miles iteration limit exceeded' 125.minos 'Minos writes 10GB log' 321.minos 'minor iterlim exceeded on knp' 270.sbb 'node limit exceeded on kport' 273.ipopt 'mumps may run out of memory (WEI: Problem with integer stack size)' (206,223,270,350).shot 'no luck on nonconvex model (gasnet: sometimes nondeterministic)' 293.mosek 'terminated due to slow progress' (257,346,383).(xpress,xpressold) 'iterlim exceeded' (236,244).scip 'may reach maximum branching depth' 41.scip 'LP solver fails to solve LP' (251,253).(conopt3,conopt) 'residuals too large, exceed Lim_Variable' 433.baron 'Somewhat difficult MIP not with 10secs as requested by the model' * take long (>= 600s), but does not fail; run only in long tests $ifThen not set licensed 24.(baron,lindo,scip) 296.sbb (223,224).alphaecp (125,205,223,250).dicopt 265.minos 85.ipopt (22,25,28,68,69,84,117,125,205,223,227,228,250,263,267,373,410,426,431).scip (120,264,425).(xpress,xpressold) (22,28,263).(gurobi,gurobiold) $endIf * take very long (>= 3000s), but does not fail; do not even run in long tests (41,254).lindo 'prolog takes 3000s, pool takes 9593s' (251,253).(antigone,baron,lindo,scip) 'lmp1 and lmp3 models take long to solve to global optimality' 252.antigone 'lmp2 models take long to solve to global optimality' 383.(lindo,scip) 'lindo takes 3782s, scip takes 8403s' $if %system.buildcode% == WEI 357.(xpress,xpressold) 'sddp can take 5028s' 85.scip 23.scip 'model linear runs very many solver combinations; we cannot affort that scip runs into reslim on some (d)nlp in many of these combinations' (22,24,25,28,47,68,69,80,85,100,161,227,250,263,296,373,378,426).(xpress,xpressold) /; set exsm(s,solver) exclusion list for model solver combination; exsm(exm,solver) = yes; exsm(s,exS) = yes; exsm(s,solver)$exsmd(s,solver) = yes; * do not use NLPEC for any model without an MPEC/RMPEC exsm(s,'NLPEC')$[not (test(s,'MPEC') or test(s,'RMPEC'))] = yes; * BCH Models only with Cplex, and SBB exsm(s,solver)$(as('BCH',s)) = yes; exsm(s,'CPLEX')$(as('BCH',s)) = no; $if %runall%==yes $goTo dorunall exsm(s,solver)$exsmw(s,solver)=yes; exsm(s,solver)$exsml(s,solver)=yes; $label dorunall *--------! Weak test lists !--------* set weakm(s) exclusion list for model / 330 'dicegrids first solve returns (1,14)' 357 'sddp with GUSS returns (4,14)' 398 'gussex1 returns (1,14) because of SkipBaseCase=1' 423 'guss2dim returns (1,14) because of SkipBaseCase=1' 424 'obstacle returns (1,14) because of SkipBaseCase=1' /; set weakS(solver) 'list of weakly-checked solvers' / /; set weakMSd(s,solver) model solver combination that deserve weak check / (224,229,236,237,257*261,265, 266,388,425).(antigone,baron) 'cannot handle trigonometric functions' 111.(antigone,baron,copt,scip) 'cannot handle errorf' (299,300,301,302,303,305,393).( antigone,baron,copt,lindo, scip,xpress,xpressold) 'cannot handle gamma, loggamma, betareg, beta, or centropy' 265.(copt,scip,xpress,xpressold) 'cannot handle mod' 217.(antigone,baron,copt,xpress,xpressold) 'cannot handle signpower' (109,163,270,351,385,386).(baron, highs,mosek) 'cannot handle SOS' 228.miles 'Failure to converge, similar to #808, wontfix' 123.(ipopt,ipopth) 'NLP relaxation too difficult for Ipopt (run in DICOPT, SBB)' 226.(ipopt,ipopth) 'NLP relaxation too difficult for Ipopt (run in SBB)' 265.(ipopt,ipopth) 'step computation failed, problem is DNLP' 110.(ipopt,ipopth) 'search direction becomes too small' 321.pathnlp 'KNP is a nonconvex NLP' 110.conopt3 'initial function value too large for some instances (now leads to exit with 6/5)' (125,226).minos 'NLP relaxation/subproblem difficult to solve within dicopt or sbb (comes and goes)' 296.sbb 'QCP relaxations are nonconvex, which is not appreciated by xpress cplex ..., #1644' 224.alphaecp 'AlphaECP does not have to succeed on nonconvex models like windfac (exits with 4/14)' (125,223,250).snopt 'NLP relaxation too difficult for SNOPT (within SBB or DICOPT)' 239.snopt 'numerical issues within SNOPT' (236,265).minos 'current point cannot be improved' 124.(xpress,xpressold) 'numerical issues' (228,129,169,136).knitro 'knitro as mcp solver cannot reach required accuracy' (251,253).knitro 'cannot improve infeasible solution further and returns intermediate infeasible' $if %system.buildcode% == DEG 410.knitro 'cannot improve infeasible solution further and returns intermediate infeasible' $if %system.buildcode% == WEI 319.knitro 'cannot improve infeasible solution further and returns intermediate infeasible' /; set weakMSw(s,solver) 'should not be here - waiting on a fix' / (123,125,223,238,250,253,346,380).pathnlp 'fails to solve various models (if MINLP, then as subsolver of SBB), #4182' /; set weakMSl(s,solver) off limits / (140,142,146).path 'iterlim exceeded which on purpose is set to 0' (204,205).dicopt 'DICOPT hits maxcycles limit before finding feasible point' /; set weakMS(s,solver) 'list of weakly-checked model-solver combinations'; weakMS(weakm,solver) = yes; weakMS(s,weakS) = yes; weakMS(s,solver)$weakMSd(s,solver) = yes; $if %runall%==yes $goTo dorunallw weakMS(s,solver)$weakMSw(s,solver)=yes; weakMS(s,solver)$weakMSl(s,solver)=yes; $label dorunallw *--------! Stdout/Stderr test skip lists !--------* set noso(s) skip model for test of stdout lines / 197*199 'DECIS writes to stdout' 315,327,391,400 'grid/multi-threaded solve leaves files around when reaching time limit, which makes gamsx write to stdout' 310 'GAMS Transfer Python future warnings from pandas 2.2 use, #6176' /; set nose(s) skip model for test of stderr lines / 173 'BARON 23.3.11 writes to stderr (seems like an error from the CPLEX global solver)' $if not set licensed 100 'SoPlex in SCIP writes warning to stderr (if licensed, then SCIP uses CPLEX)' /; set noso2(solver) skip solver for test of stdout lines / $if %system.buildcode% == DEG shot 'cannot turn off CPLEX output completely' /; set nose2(solver) skip solver for test of stderr lines / $if %system.buildcode% == DEG shot 'cannot turn off CPLEX output completely' /; $if exist %sysenv.USRSLVTESTSKIPS% $include %sysenv.USRSLVTESTSKIPS% *--------! Option file lists !--------* $if not set optdir $set optdir slv_optionfiles $call rm -rf %optdir% && mkdir %optdir% $set optdirS %optdir%%SLASH% parameter useopt(s,solver) option file number for model solver combination / 385.mosek 385 /; parameter useopt2(s,solver,solver) option file number for model solver combination / /; parameter useopt3(s,solver,solver,solver) option file number for model solver combination / *minos cycles, #1700 206.sbb.minos.%system.mip% 899 /; $echo expand frequency 500 > %optdirS%minos.899 $onEcho > %optdirS%sbb.899 rootsolver minos subsolver minos.899 $offEcho * use tighter feastol for MIP solves to avoid problems MIP optimal value decreasing after adding cut * (some linearizations have large coefs, so that optimal value can vary quite a bit with default feastol) useopt3('206','dicopt',solver,'copt') = 206; $onEcho > %optdirS%dicopt.206 mipoptfile 206 $offEcho $onEcho > %optdirS%copt.206 FeasTol 1e-8 $offEcho * use as tight as possible integer tolerance for Mosek on bidpwl model * some test in the model expects that if one has constraints * x(b) = ... + 100000*BidPwlBin(b,3) + BidPwlSeg(b,3) + .... and BidPwlSeg(b,3) <= 50000*BidPwlBin(b,3), * then x(b) will be within 1e-6 of 0, even though BidPwlBin=1e-10, BidPwlSeg=5e-6, x=1.5e-5 is perfectly feasible, too * mosek does not allow to tighten the integrality tolerance below 1e-9, but setting it to 1e-9 seems to help already $onEcho > %optdirS%mosek.385 MSK_DPAR_MIO_TOL_ABS_RELAX_INT 1e-9 $offEcho parameter useopt4(s,solver,solver,solver,solver) option file number for model solver combination / /; parameter useopt5(s,solver,solver,solver,solver,solver) option file number for model solver combination / /; $offEmpty *--------! Create tester file !--------* sets ttt(t) temp subset of model types sss(solver) temp subset of solvers lic(solver) subset of licensed solvers; lic(solver) = sum(ssc$LicenseCodes(ssc), sc(solver,ssc)); lic(solver) $= sc(solver,'00'); alias(ttt,t1,t2,t3,t4,t5),(sss,s1,s2,s3,s4,s5); $call rm -f slvtest.inc file tester /'slvtest.inc'/, fx, pf /'pfile.txt'/; put tester; tester.lcase=1; tester.ap=1; tester.pw=500; fx.lcase=1; pf.lcase=1; * Uncomment next line to do a shorter test involving runs only with solver selected in compile time variable solvertest * Or set environment variable GSOLVERTEST to a solvername *$set solvertest conopt $if setEnv GSOLVERTEST $if not "%sysenv.GSOLVERTEST%" == "" $set solvertest %sysenv.GSOLVERTEST% put '*' / '* %system.gstring%' / '* %system.date% %system.time%' / '*' / '* SLVTEST u1=%gams.u1%' / '*' / '$onDollar' / '$echo "*" >> %trace%0' / '$echo "*" >> %trace%1' / '$echo "* %system.gstring%" >> %trace%0' / '$echo "* %system.gstring%" >> %trace%1' / '$echo "* %system.date% %system.time%" >> %trace%0' / '$echo "* %system.date% %system.time%" >> %trace%1' / '$echo "*" >> %trace%0' / '$echo "*" >> %trace%1' $if set solvertest / '$echo "* Ran with solvertest=%solvertest%" >> %trace%0' $if set solvertest / '$echo "* Ran with solvertest=%solvertest%" >> %trace%1' / '$echo "* Solvers tested:'; loop(solver$Solvers(solver), put ' 'solver.tl:0); put '" >> %trace%0' / '$echo "* Solvers tested:'; loop(solver$Solvers(solver), put ' 'solver.tl:0); put '" >> %trace%1' put / '$echo "*" >> %trace%0'; put / '$echo "*" >> %trace%1'; put / / '$set err 0'; put / '$set GAMStime 0'; put / '$set DECIStime 0'; loop(solver$Solvers(solver), put / '$set 'solver.tl:0'time 0'; ); put / '$set GAMScalls 0'; put / '$set DECIScalls 0'; loop(solver$Solvers(solver), put / '$set 'solver.tl:0'calls 0'; ); put / / '$echo Runs with more than %TESTLIM% seconds > overtime.gms' put / '$echo -------------------------------- >> overtime.gms' put / / '$echo Resource Usage per Run > resused_run.txt' put / '$echo ----------------------- >> resused_run.txt' $set mainsolver "'s1.tl:0'" $set solve1 "'t1.tl:0'='s1.tl:0'" $set solve2 "%solve1% 't2.tl:0'='s2.tl:0'" $set solve3 "%solve2% 't3.tl:0'='s3.tl:0'" $set solve4 "%solve3% 't4.tl:0'='s4.tl:0'" $set solve5 "%solve4% 't5.tl:0'='s5.tl:0'" $set folder0 "%PREFIX%_slv_'m.tl:0'" $set folder1 "%folder0%_'t1.tl:0'_'s1.tl:0'" $set folder2 "%folder1%_'t2.tl:0'_'s2.tl:0'" $set folder3 "%folder2%_'t3.tl:0'_'s3.tl:0'" $set folder4 "%folder3%_'t4.tl:0'_'s4.tl:0'" $set folder5 "%folder4%_'t5.tl:0'_'s5.tl:0'" $set restart1 "--c1='s1.tl:0'" $set restart2 "%restart1% --c2='s2.tl:0'" $set restart3 "%restart2% --c3='s3.tl:0'" $set restart4 "%restart3% --c4='s4.tl:0'" $set restart5 "%restart4% --c5='s5.tl:0'" *create slvcreate file $onEchoV > %slvcreate% put *Remove test folder if exists and create new / / '$call rm -rf %1' / '$call mkdir %1' * Copy model and related files into test folder / '$call cd %1 && gamslib -q 'm.tl:0 * Write JobStart into small txt file and create parameter file / '$echo JobStart 'm.tl:0' > %1%SLASH%slvtest.txt'isWeak:0:0 / '$echo lo=%gams.lo% al=0 ao=0 threads=%gams.threads% reslim=600 optcr=0.1 workspace=%MYWORKSPACE% jt='m.tl:0' trace=slvtest.txt'isWeak:0:0' %2 u1="%2" > %1%SLASH%pf.txt' / '$if not 'optfilenr:0:0'==0 $echo optfile='optfilenr:0:0' >> %1%SLASH%pf.txt' / '$if not 'optfilenr:0:0'==0 $call cp -f %optdir%/* %1' * Start run in test folder and save stdout and stderr $escape = / '$set before %=system.tcomp%=' / '$call cd %1 && gams 'm.tl:0' pf=pf.txt 1>stdout.txt 2>stderr.txt' / '$set after %=system.tcomp%=' $escape % / '$eval time %after% - %before%' / '$echo %time% , $call =gams slvtest lo=%gams.lo% --prefix=%PREFIX% --test='m.tl:0' u1="ord(s)='s.tl:0'" --runall=%runall% %3 >> resused_run.txt' / '$eval %4time %%4time% + %time%' / '$eval %4calls %%4calls% + 1' * Apend content of small txt file to general one / '$call cat %1%SLASH%slvtest.txt'isWeak:0:0' >> slvtest.txt'isWeak:0:0'' * Remove stderr.txt and stdout.txt if empty / '$call cd %1 && test -s stderr.txt || rm -f stderr.txt' / '$call cd %1 && test -s stdout.txt || rm -f stdout.txt' * Remove stdout.txt/stderr.txt if test is skipped / '$if 'k:0:0'==1 $call rm -f %1%SLASH%stdout.txt' / '$if 'k2:0:0'==1 $call rm -f %1%SLASH%stderr.txt' * Create single test file / '$echo "$call =gams slvtest.txt'isWeak:0:0' a=gt ps=0 pw=255 lo=%gams.lo% o=slvtest.rep'isWeak:0:0' tl='trl:0:0'" > %1%SLASH%tracetest.gms' / '$echo "$if errorlevel 1 $echo error in trace level test >> trcerr.txt" >> %1%SLASH%tracetest.gms' * Run single test / '$call cd %1 && gams tracetest.gms lo=%gams.lo%' * Check three possible error files and jump to keepxxx if one exists / '$if exist %1%SLASH%trcerr.txt $goTo keep'cnt:0:0 / '$if exist %1%SLASH%stderr.txt $goTo keep'cnt:0:0 / '$if exist %1%SLASH%stdout.txt $goTo keep'cnt:0:0 * else remove folder and goto dontkeepxxx / '$echo "$call rm -rf %1" >> removedirs.gms' / '$goTo dontkeep'cnt:0:0 * if keep, create failures_slv.gms / '$label keep'cnt:0:0 / '$echo $call =gams slvtest lo=%gams.lo% --prefix=%PREFIX% --fail=%fail2% --test='m.tl:0' u1="ord(s)='s.tl:0'" --runall=%runall% %3 >> %1%SLASH%onetest.gms' / '$echoN $call =gams slvtest lo=%gams.lo% --prefix=%PREFIX% --fail=%fail2% --test='m.tl:0' u1="ord(s)='s.tl:0'" --runall=%runall% %3 >> %fail%' / '$if exist %1%SLASH%trcerr.txt $echoN " --ftrace=1" >> %fail%' / '$if exist %1%SLASH%stderr.txt $echoN " --fstderr=1" >> %fail%' / '$if exist %1%SLASH%stdout.txt $echoN " --fstdout=1" >> %fail%' / '$ifE %time%>%TESTLIM% $echo * %time% secs used by >> overtime.gms' / '$ifE %time%>%TESTLIM% $echo $call =gams slvtest lo=%gams.lo% --prefix=%PREFIX% --test='m.tl:0' u1="ord(s)='s.tl:0'" --runall=%runall% %3 >> overtime.gms' / '$eval err %err% + 1' / '$echo " --dir=%1 --keepfail=1" >> %fail%' / '$label dontkeep'cnt:0:0 ; $offEcho Set SolverCapabilitiesX(solver,t) restricted capability set; SolverCapabilitiesX(solver,t) = SolverCapabilities(solver,t); * for almost or all of the general nonlinear models, reformulation into a conic problem will fail SolverCapabilitiesX('mosek','nlp') = no; SolverCapabilitiesX('mosek','dnlp') = no; SolverCapabilitiesX('mosek','rminlp') = no; SolverCapabilitiesX('mosek','minlp') = no; display solvers, SolverCapabilitiesX; scalar isWeak, skip, cnt /0/, trl, k, k2, optfilenr; loop(sm(s,m)$(not notest(s) and %cond% and not exm(s)), ttt(t) = test(s,t); sss(solver)$Solvers(solver) = sum(ttt, SolverCapabilitiesX(solver,ttt)) and (lic(solver) //license or tiny(s) // or less than 10x10 or (not big(s) and not gsolver(solver)) ) // or smaller than 300x300 and not a global solver and not (gsolverlim(solver) and gbig(s)); //not solver with 2000x3000 license and model bigger than that * Take care of big MPSGE models sss(solver)$(big(s) and ts('mpsge',s) and not LicenseCodes("GE") and SolverCapabilitiesX(solver,'MCP')) = no; $if set solvertest continue$(not sss('%solvertest%')); // skip model no use of solver %solvertest% put tester / / / '$log ===> executing ' m.tl:0 '.gms'; put / '$echo "*This file keeps track of which dirs to delete" > removedirs.gms' if(card(ttt)=0, isWeak = 0; trl$isWeak = %weaktl%; trl$(not isWeak) = %gams.tl%; cnt = cnt+1; k = noso(s); k2 = nose(s); optfilenr = 0; $batInclude %slvcreate% "%folder0%_gams" "" "" "GAMS" elseif(ts('decis',s) and not big(s) and Solvers('decisc')), isWeak = 0; trl$isWeak = %weaktl%; trl$(not isWeak) = %gams.tl%; cnt = cnt+1; k = noso(s); k2 = nose(s); optfilenr = 0; $batInclude %slvcreate% "%folder0%_decis" "" "" "DECIS" elseif card(ttt)=1, loop(SolverCapabilitiesX(s1,t1)$(not exsm(s,s1) and %cond1%), $if set solvertest continue$(not sameas('%solvertest%',s1)); // skip run %solvertest% not involved isWeak = weakMS(s,s1); trl$isWeak = %weaktl%; trl$(not isWeak) = %gams.tl%; cnt = cnt+1; k = noso(s) or noso2(s1); k2 = nose(s) or nose2(s1); optfilenr = useopt(s,s1); $batInclude %slvcreate% "%folder1%" "%solve1%" "%restart1%" "%mainsolver%" ) elseif card(ttt)=2, loop((s1,t1)$(SolverCapabilitiesX(s1,t1) and not exsm(s,s1) and %cond1%), loop((s2,t2)$(SolverCapabilitiesX(s2,t2) and not exsm(s,s2) and %cond2% and (oval(t1) 600s $if not set licensed skip = skip or (sameas(s1,'sbb') and sameas(s2,'minos') and sameas(s,'206')); $if not set licensed skip = skip or (sameas(s1,'sbb') and sameas(s2,'snopt') and sameas(s,'204')); $if not set licensed skip = skip or (sameas(s1,'sbb') and sameas(s2,'gurobi') and sameas(s,'205')); $if not set licensed skip = skip or (sameas(s1,'sbb') and sameas(s2,'gurobiold') and sameas(s,'205')); $if not set licensed skip = skip or (sameas(s1,'dicopt') and sameas(s2,'knitro') and sameas(s,'204')); $if not set licensed skip = skip or (sameas(s1,'dicopt') and sameas(s2,'gurobi') and sameas(s,'204')); $if not set licensed skip = skip or (sameas(s1,'dicopt') and sameas(s2,'gurobiold') and sameas(s,'204')); $if not set licensed skip = skip or (sameas(s1,'dicopt') and (sameas(s2,'ipopt') or sameas(s2,'ipopth')) and sameas(s3,'mosek') and sameas(s,'204')); skip = skip or (sameas(s1,'sbb') and sameas(s2,'xpress') and sameas(s3,'cplex') and sameas(s,'204')); skip = skip or (sameas(s1,'sbb') and sameas(s2,'xpressold') and sameas(s3,'cplex') and sameas(s,'204')); * runs > 3000s skip = skip or (sameas(s1,'alphaecp') and sameas(s2,'conopt3') and sameas(s3,'cplex') and sameas(s,'223')); if (not skip, trl$isWeak = %weaktl%; trl$(not isWeak) = %gams.tl%; cnt = cnt+1; k = noso(s) or noso2(s1) or noso2(s2) or noso2(s3); k2 = nose(s) or nose2(s1) or nose2(s2) or nose2(s3); optfilenr = useopt3(s,s1,s2,s3); $batInclude %slvcreate% "%folder3%" "%solve3%" "%restart3%" "%mainsolver%" ) ))) elseif card(ttt)=4, loop((s1,t1)$(SolverCapabilitiesX(s1,t1) and not exsm(s,s1) and %cond1%), loop((s2,t2)$(SolverCapabilitiesX(s2,t2) and not exsm(s,s2) and %cond2% and (oval(t1)> %fail%' put / '$call echo %err% failures in 'cnt:0:0' runs: check %fail%' put / '$echo Resource Usage per Solver > resused_slv.txt' put / '$echo -------------------------- >> resused_slv.txt' put / '$echo GAMS used %GAMStime% sec in %GAMScalls% runs >> resused_slv.txt'; put / '$echo DECIS used %DECIStime% sec in %DECIScalls% runs >> resused_slv.txt'; loop(solver$Solvers(solver), put / '$echo 'solver.tl:12' used %'solver.tl:0'time% sec in %'solver.tl:0'calls% runs >> resused_slv.txt'; ); put / / '$call grep "call" resused_run.txt | sort -nr > resused_run_sorted.txt'; putclose tester;