Open kirichoi opened 2 years ago
I found that this only happens to a subset of configuration parameters.
ROADRUNNER_DISABLE_WARNINGS
is one, STEADYSTATE_APPROX_MAX_STEPS
is another, but STEADYSTATE_APPROX
works fine when I tried to run steadyState()
with approximation routine.
I've investigated and discovered that ROADRUNNER_DIABLE_WARNINGS is supposed to be a Boolean value, and will throw an error if you set it to something else and then try to get it as a Boolean. So you can fix your most immediate problem by changing:
roadrunner.Config.setValue(roadrunner.Config.ROADRUNNER_DISABLE_WARNINGS, 3)
to:
roadrunner.Config.setValue(roadrunner.Config.ROADRUNNER_DISABLE_WARNINGS, True)
However, we clearly need to do some type checking if this sort of error is the result, so I'm leaving this issue open until we can do that.
Further investigation shows that the option used to be a bitfield/int, but later was changed to a bool, perhaps out of ignorance. I have to say that the option is very confusing, and that bitfield options seem hard to follow from a user's perspective.
Do you know what the option was originally supposed to do, and how it worked?
Thanks for looking into this issue.
ROADRUNNER_DISABLE_WARNINGS
used to accept intergers from 1 to 3, each corresponding to different levels of disabling warnings and notices. You can find more from the old libroadrunner documentation.
I'm guessing something similar happened to STEADYSTATE_APPROX_MAX_STEPS
, which should take an integer.
I think the documentation on the config parameters should be updated and perhaps we can implement some tests along with it.
Hi all,
Today I have been fiddling with the latest libroadrunner release and found that whenever I try to configure parameters using something like:
it raises
RuntimeError: bad variant access
. Any call that usesroadrunner.Config.setValue()
cause this problem. This error is specifically evoked bysteadyState()
for some reason. Any thoughts?Here's a minimal example:
and here's my version info: