I encountered a problem when reading a scalar from a compressed GDX file:
GDXIN C:\projects\ulrike - ifpri\gdx\spam.gdx |
I did not really need the rowcount scalar so for me the workaround was: just skip reading this scalar.
It is amazing that this bug was not found earlier. I guess not many users are using compressed GDX files (the default is no compression) and of those few even fewer will ever store a scalar in such a file.
Some possible workarounds:
- skip reading scalars
- store scalars as a 1 dimensional parameter
- store scalars in a separate uncompress gdx file
- read scalars using gdxdump.
As said a possible workaround could be to use gdxdump for the scalars. This means instead of using:
we should implement something like:$set gdxfile spam.gdx
set cell5m;
scalar rowcount;
* read from compressed GDX file
$gdxin %gdxfile%
$load cell5m rowcount
$set gdxfile spam.gdx
set cell5m;
scalar rowcount;
* read from compressed GDX file
$gdxin %gdxfile%
$load cell5m
$call gdxdump %gdxfile% symb=rowcount output=rowcount.inc
$include rowcount.inc
display rowcount;
No doubt this will be fixed in the next release.
No comments:
Post a Comment