User Tools

Site Tools


In a multi user environment it can be sometimes helpful/required to audit the GAMS activities. In case there is a single shared GAMS installation (e.g. though a shared file system) and the client machines have write access to a shared location (e.g. a shared and writable subdirectory auditlog in the GAMS system directory) the GAMS Trace Facility ( can be used to provide such audit information. In the following example, we assume that the directory auditlog is a user write-able subdirectory of the GAMS system directory.

The admin has to create a starter trace file log.txt in the auditlog directory. The content of the file is as follows

* Trace Record Definition
* GamsExit
* UserName,ComputerName,InputFileName,JobDate,JobTime,GAMSTotalTime,GamsVersionID

The field names in the last line (UserName, ComputerName, …) are a selection from the list of available names:

LP                 GamsExecTime               ObjectiveValue            
MIP                GamsLineNumber             ObjectiveValueEstimate    
RMIP               GamsReturnCode             OptionFile                
NLP                GamsStartupTime            Platform                  
MCP                GamsSymbols                SolveLine                 
MPEC               GAMSTotalTime              SolveNumber               
RMPEC              GamsVersionID              SolverCalcTime            
CNS                InputFileName              SolverID                  
DNLP               JobDate                    SolverName                
RMINLP             JobTime                    SolverElapsedTime         
MINLP              JulianDate                 SolverReadTime            
QP                 ModelGenerationTime        SolverRealTime            
QMIP               ModelName                  SolverSignature           
RQMIP              ModelStatus                SolverStatus              
EMP                ModelType                  SolverTime                
Direction          NumberOfDiscreteVariables  SolverVersion             
ETAlg              NumberOfDomainViolations   SolverWriteTime           
ETSolve            NumberOfEquations          User1                     
ETSolver           NumberOfInstructions       User2                     
GamsCloseDownTime  NumberOfIterations         User3                     
GamsCompTime       NumberOfNodes              User4                     
GamsElapsedTime    NumberOfNonlinearNonZeros  User5                     
GamsElements       NumberOfNonZeros           UserName                  
GamsErrorCount     NumberOfVariables          ComputerName              

Next, we need to instruct GAMS to create a trace record in the log.txt file for every run. The default parameter file gmsprmNT.txt (Windows OS) and gmsprmun.txt (Unix including Mac OS X) allows to provide GAMS with some parameters at startup. In this file we add the trace option:


(replace the back slash \ with a forward slash / for Unix).

Unless overwritten by the user, this trace option will audit every run of GAMS.

IMPRESSUM / LEGAL NOTICEPRIVACY POLICY gams/auditing_gams_runs_on_a_network_with_a_shared_gams_installation.txt · Last modified: 2012/11/27 09:36 by admin