nlmixr2 / rxode2

rxode2
https://nlmixr2.github.io/rxode2/
GNU General Public License v3.0
28 stars 7 forks source link

Differences between `rxode2()` and original solve of `RxODE` #229

Open mattfidler opened 2 years ago

mattfidler commented 2 years ago

Originally posted by @mattfidler in https://github.com/nlmixr2/rxode2/discussions/227#discussioncomment-3256736_

mattfidler commented 2 years ago

There are only 'skip'ped commits left to test. The first bad commit could be any of: 7cd313eeef91d9ea9269615d27834ec45e9d6cc6 a8acea8771475cb247e72095eb992b124784801a 425c4a25c072eb2137dfc6dafe7a1da8e5568107 b6c99cd93f72465120ca3a368b3e0f6d89586230 4d2a00bfd77ab5c6a4ad2ae99f3b59a695af3b76 8bdccd033d595fd1b7ad825580cffeb651d11357 a2336d7b44a704b9bfcc0078a7568990fb12b3d2 We cannot bisect more!

mattfidler commented 2 years ago

The 0.5 series seemed to run fine; The 0.6/0.7 series wont compile with modern FORTRAN compilers..

billdenney commented 2 years ago

Would it help to have an older docker container try it? If so, can you suggest the command to perform the bisection analysis?

I could spin up an old Ubuntu docker container with an older gfortran and do the bisection. I don't know the correct command to use for bisection analysis.

mattfidler commented 2 years ago

I tried a bisection already.

The problem is the older versions of rxode2 will not compile with the version of gfortran that are available now. This means it happened some time around 0.6 or 0.7, and does not solve for 0.9 and onward for this particular model.

mattfidler commented 2 years ago

Note the bisection is of released versions and comes from https://github.com/cran/RxODE

mattfidler commented 2 years ago

Some differences:

Some observations in the C code:

mattfidler commented 2 years ago
    mean_cd_water_flow =( water_in_CD - water_out_CD) / 2

Could cause the integer division issue in the old RxODE.

mattfidler commented 2 years ago