User Tools

Site Tools


gams:terminated_due_to_a_file_open_error_in_sysopentext

**** TERMINATED DUE TO A FILE OPEN ERROR IN SysOpenText

The log reads:

****
**** Open write error RC=22 FN="C:\Documents and Settings\x\My Documents\                                                      gamsdir\225a\gamsstat.scr"
****Invalid argument
****
**** TERMINATED DUE TO A FILE OPEN ERROR IN SysOpenText
**** PLEASE REPORT TO THE GAMS ADMINISTRATOR
**** **** GAMS Rev 145  Apr 21, 2006 WIN.00.NA 22.2 145.000.041.VIS P3PC "

Most likely the error has been triggered by a virus scanner. By default GAMS does quite a few file operations during its runs and we have seen problems aggressive virus scanners, which do not allow to access .scr files. There are a few things you can do:

  1. Instruct your virus scanner to exclude your GAMS working directory. (this will work with any the GAMS version).
  2. Instruct GAMS to use another file extension than scr for scratch files: Starting with distribution 22.9 the default file extension of intermediate files located in the 225? directories is .dat. The scratch extension is a parameter that can be changed with the GAMS option ScrExt, e.g. gams trnsport scrext=tmp. Within GAMS code you get the scratch extension using %gams.scrext%Code Text.
  3. Keep all files in memory instead of writing them to disk: No large model scratch files need to be written to disk which can save time if you solve many models in your GAMS program. This in-core execution is activated by setting <modelname>.solvelink=5; before the solve statement and by using cplexd (or any other in-core solver version) instead of cplex as your lp solver (just add the line option lp=cplexd to your model). Please note that this increases the amount of RAM required by your model and that not all solvers are supporting in core operation.
gams/terminated_due_to_a_file_open_error_in_sysopentext.txt · Last modified: 2011/03/28 12:35 by support