$title 'Test solvable CNS model with nondefault solvelink values' (SL4CNS14,SEQ=976) $onText Run cns14 with all possible solvelink settings: %solveLink.chainScript%, %solveLink.callScript%, %solveLink.callModule% in all cases %solveLink.asyncSimulate% unless skipped %solveLink.loadLibrary%, %solveLink.threadsSimulate% unless skipped or the solver is not capable Contributor: Steven Dirkse, December 2024 $offText $set XX NT $if %system.filesys% == UNIX $set XX un $set q '"' $if %system.filesys% == UNIX $set q "'" * Create custom pf $call grep -ivE %q%(scrdir|scriptnext|sysdir|jobtrace)%q% "%gams.scrdir%gmsprm%XX%.%gams.scrext%" > "%gams.scrdir%mypf.%gams.scrext%" $call gams cns14.gms pf="%gams.scrdir%mypf.%gams.scrext%" i=cns14.gms solvelink=%solveLink.chainScript% reslim=10 --SLOWOK=1 $if errorlevel 1 $abort problems with sl=%solveLink.chainScript% $call gams cns14.gms pf="%gams.scrdir%mypf.%gams.scrext%" i=cns14.gms solvelink=%solveLink.callScript% reslim=10 --SLOWOK=1 $if errorlevel 1 $abort problems with sl=%solveLink.callScript% $call gams cns14.gms pf="%gams.scrdir%mypf.%gams.scrext%" i=cns14.gms solvelink=%solveLink.callModule% reslim=10 --SLOWOK=1 $if errorlevel 1 $abort problems with sl=%solveLink.callModule% $ifthen NOT set SKIPSL4 $ $call gams cns14.gms pf="%gams.scrdir%mypf.%gams.scrext%" i=cns14.gms solvelink=%solveLink.asyncSimulate% reslim=10 --SLOWOK=1 $ $if errorlevel 1 $abort problems with sl=%solveLink.asyncSimulate% $endif $ifi %system.CNS% == GUSS $goTo BYPASS_SL57 $call awk %q%BEGIN{ IGNORECASE = 1 } /^%system.CNS%/ {if ($7>1) hasLib = 1 } END {if (!hasLib) exit 1}%q% "%GAMS.sysdir%gmscmp%XX%.txt" $if errorlevel 1 $goTo BYPASS_SL57 $call gams cns14.gms pf="%gams.scrdir%mypf.%gams.scrext%" i=cns14.gms solvelink=%solveLink.loadLibrary% reslim=10 --SLOWOK=1 $if errorlevel 1 $abort problems with sl=%solveLink.loadLibrary% $ifthen NOT set SKIPSL7 $ $call gams cns14.gms pf="%gams.scrdir%mypf.%gams.scrext%" i=cns14.gms solvelink=%solveLink.threadsSimulate% reslim=10 --SLOWOK=1 $ $if errorlevel 1 $abort problems with sl=%solveLink.threadsSimulate% $endif $label BYPASS_SL57