ICB-DCM / LNAplusplus

LNA++: a Fast C++ Implementation of the Linear Noise Approximation with first- and second-order sensitivities
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Occasional CVODES failure on OSX in BirthDeath example #17

Open dweindl opened 6 years ago

dweindl commented 6 years ago

Works on Ubuntu, fails on OSX:

[CVODES ERROR]  CVode
  At t = 1.51964e-13, mxstep steps taken before reaching tout.
SUNDIALS_ERROR: CVodefailed with flag = -1
Traceback (most recent call last):
  File "models/BirthDeath.py", line 221, in <module>
    MRE, Var, Sens_MRE, Sens_Var,Sens2_MRE,Sens2_Var = BirthDeathLNA.LNA(Theta, tspan, Y0=MRE0, V0=Var0, merr=VarNoise, obsVar=ObsIndex, computeSens2=True)
BirthDeath.error: Error encountered during computation.

See https://travis-ci.org/ICB-DCM/LNAplusplus/jobs/369133949

JanHasenauer commented 6 years ago

hm, works for the matlab branch

dweindl commented 6 years ago

Okay, apparently this is not reproducible. The subsequent build worked: https://travis-ci.org/ICB-DCM/LNAplusplus/jobs/369134440

dweindl commented 6 years ago

May also occur with 1st-order sensitiivities:

[CVODES ERROR]  CVode
  At t = 0 and h = 2.0825e-16, the corrector convergence test failed repeatedly or with |h| = hmin.
SUNDIALS_ERROR: CVodefailed with flag = -4
Traceback (most recent call last):
  File "models/BirthDeath.py", line 197, in <module>
    MRE, Var, Sens_MRE, Sens_Var = BirthDeathLNA.LNA(Theta, tspan, Y0=MRE0, V0=Var0, merr=VarNoise, obsVar=ObsIndex, computeSens=True)
BirthDeath.error: Error encountered during computation.

https://travis-ci.org/ICB-DCM/LNAplusplus/jobs/369151965

JanHasenauer commented 6 years ago

strange. the whole thing should be deterministic.

dweindl commented 6 years ago

Can't find anything suspicious when checking with valgrind (on Ubuntu). Not sure what is wrong there. So far only happened on OSX.

JanHasenauer commented 6 years ago

I tested it now on my mac under python. everything was running without an issue.

dweindl commented 6 years ago

This is pretty random. Happens with both clang and gcc, but only on osx. Should try different xcode or osx versions to narrow it down. @JanHasenauer Which versions are you using?