The --output
option fails on the .glm
extension, and when .txt
or .gld
are used it creates files that cannot be loaded. The file format used is the Version 1 GLM format and many newer features result in GLM syntax that is not valid. The saveall()
function needs to put #ifdef
s around anything that isn't fully supported by the loader.
Diff:
Note also that the output routines do not output all model elements. In particular, filter, schedules, user-defined globals, and runtime code is not stored in the output file.
One highly desirable feature in the GLM output to provide #ifdef INCLUDE_XYZ / #endif around each non-essential output block, e.g., class definitions, non-default globals.
There should be validation tests for GLM output, i.e., load a model with asserts, output the model and then run a separate test that inputs the model with the simple GLM code