From: Rainer M. <ra...@tb...> - 2006-08-29 15:39:42
|
I have sent below email to the sundials list and forgot to cc it to our list. I will forward the responses. r ---------- Forwarded message ---------- Date: Tue, 29 Aug 2006 17:20:25 +0200 (CEST) From: Rainer Machne <ra...@me...> To: sun...@ll... Subject: sensitivity in iterative runs Dear Sundials users/developers, In our software we use the ReInit functions of both CVode and CVodeSens (version 2.1.1) to run arbitrary numbers of integration runs. We get however different sensitivities s(x(t)) with each run, even if we don't change any parameters or initial conditions, i.e. with exactly the same model, for which CVode also returns the same results x(t). I have tried different combinations of using either ReInit or a completely new creation of cvode solver structures. Both, a) freeing and recreating the sensitivity structures with N_VNewVectorArray_Serial and CVodeSensMalloc or b) reinitializing these structures with CVodeSensReInit produce wrong results. The results are different from each other, though. In the CVodeSensReInit case, the results look somehow `more correct': e.g. two variables with exactly opposite sensitivities (x/-) to one parameter stay this way for iterative runs, although with different values. Here some results for the same output time (3.0) and different iterations, sensitivities of two variables to the same parameter: both cases: 1st run: 0.0323545 -0.0323545 a) destroying and recreating CVodeSens structures: 2nd run: 0.0386666 -2.81625 10th run: 0.0228166 -14.0761 b) using CVodeSensReInit: 2nd run: 0.0640767 -0.0640767 10th run: 0.294778 -0.294778 The results x(t) are the same for all cases, i.e. 87.2221 and 12.7779. The parameter towards which sensitivity is tested has the value 10. Note, that the symmetry is kept when using ReInit, while one sensitivity is growing much bigger for the destroy/create case. The only way to get consistent results is to destroy and recreate the whole CVode solver structures with CVodeCreate. Could this be a bug in SUNDIALS or do you see any hints what we might do wrong in our software from above results?? If it's a bug in Sundials, I guess it must be some structure in the CVode forward solver that is important for CVodeSens but created independently of the latter. ?? Sorry, if this has been brought up and discussed before, I didn't find the email archives online. Thanks, Rainer Machne Theoretical Biochemistry Group Department for Theoretical Chemistry University of Vienna Austria/Europe |