Monday, June 30, 2008

ViewHar and GDX2HAR problems

Users may encounter the following problem when using ViewHar or GDX2HAR:

Cannot open input file C:\delgams\tmp2.gdx
Perhaps it is not really a GDX file !
**** Fatal GDX I/O Error = -100033

This happens when a new GAMS system (22.6 or newer) is used with an old GDX2HAR (or ViewHar) tool. The tools included in GEMPACK work with GAMS 22.5 or older. To increase the confusion, GAMS also distributes GDX2HAR and then it depends on the PATH order which version of GDX2HAR will be executed. Make sure you actually use the GAMS version of GDX2HAR and things should be ok. ViewHar is not distributed by GAMS so you need to convert the GDX to an older format first. You can use GDXCOPY for this.

The underlying problem lies in unfortunate changes in the GDX API by GAMS. It should have been possible to make these changes transparent by adding new API calls instead of changing them. In general it is poor design to change existing API calls as can be seen from this example.