Virus scanner incompatibility

Frequently asked questions about GAMS

Moderator: aileen

Forum rules
Please ask questions in the other sub-forums
Locked
abhosekar
Moderator
Moderator
Posts: 295
Joined: 3 years ago

Virus scanner incompatibility

Post by abhosekar »

One can observe errors from GAMS in opening, closing, and writing files. It is likely these errors have been triggered by a virus scanner. By default GAMS does quite a few file operations during its runs and we have seen problems with aggressive virus scanners, which do not allow access to .scr files. There are a few things you can do:
  • Try reproducing the error with the virus scanner disabled. If the issue is fixed, you can turn on the virus scanner and instruct your virus scanner to exclude your GAMS working directory. (this will work with any GAMS version).
  • 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.
  • 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. Please note that this increases the amount of RAM required by your model and that not all solvers support in-core operation.
Locked