[R-sig-dyn-mod] Model development with compiled code

John Harrold john.m.harrold at gmail.com
Fri Jan 22 01:38:42 CET 2016


Howdy,

I accidentally posted this to the R-help list first.

I'm constructing my models in C, and I've run into a problem. If I change
the length of my parameters (say I increase it from 3 to 4), I get the
following error:

Error in lsoda(y, times, func, parms, ...) :
  Confusion over the length of parms
In addition: Warning message:
In lsoda(y, times, func, parms, ...) :
  Number of parameters passed to solver, 4; number in DLL, 3

I suspect any that I'd have the same problem if I changed the number of
states and that any modifications I make to the structure of the model
won't take either. It seems that once I've loaded the .so file I'm stuck
with it. I've tried to unload/load the .so file, but it doesn't seem to
work.

To illustrate this I'm using one of the compiled code examples. The
attached script (testmod.r) will reproduce this on my Mac.

I think my question is what is the appropriate way to unload a dynamic
library such that the so or dll is forced to be reloaded and subsequently
used?

Thanks
John


More information about the R-sig-dynamic-models mailing list