[sundials-users] Internal t and h are such that t + h = t on the next step

20 views
Skip to first unread message

Eliott Tixier

unread,
Aug 19, 2022, 12:13:34 PM8/19/22
to SUNDIAL...@listserv.llnl.gov
Dear Sundials developers,

In some of our simulations using CVODE we encounter warnings of the form:

```
Internal t = 3.77223e+07 and h = 2.91949e-10 are such that t + h = t on the next step. The solver will continue anyway.
```

We understand it is only a warning but still have some questions which reading the documentation did not answer:

1. Does it mean the precision of the solution is compromised in any way?  
2. If 1. is true, what are the recommended ways of preventing that?  
3. If 1. is false, the doc says we can silence the warning by setting `CVodeSetMaxHnilWarns` to a negative values, is that good practice?
4. How can the solver "continue" if `t+h=t`? Shouldn't it stay stuck at that specific time point? We observe that it does not get stuck and indeed continues in practice.

We're currently on CVODE v5.7.0, more precisely a fork of that

Thank you for your help!

Best,
Eliott


This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.

To unsubscribe from the SUNDIALS-USERS list: write to: mailto:SUNDIALS-USERS-...@LISTSERV.LLNL.GOV

Hindmarsh, Alan Carleton

unread,
Aug 19, 2022, 5:45:01 PM8/19/22
to SUNDIAL...@listserv.llnl.gov
This does not mean that the accuracy of the solution is compromised.  It just means that something in the solution is happening on a very short time scale,
requiring such small stepsizes (h).  The fact that
the t variable does not advance during such steps
does not effect the solution y.

The important thing for you to do as a user is to
examine the solution to see what is causing the
decrease in step sizes.  If it is legitimate, e.g. from
a sudden cusp or jump in the solution, then there
is no need to change anything.  But if the solution
shows no such sudden change, some other issue is
causing the step decrease, and that needs to be
identified, in order to get an efficient solution.

Alan H


From: sundials-users <sundial...@llnl.gov> on behalf of Eliott Tixier <00000e5cede23bc...@LISTSERV.LLNL.GOV>
Sent: Friday, August 19, 2022 1:36 AM
To: sundials-users <sundial...@llnl.gov>
Subject: [sundials-users] Internal t and h are such that t + h = t on the next step
 

Brorson, Stuart

unread,
Aug 22, 2022, 12:59:55 PM8/22/22
to SUNDIAL...@listserv.llnl.gov
Pardon me for inserting myself into this discussion.  I notice that the ratio h/t is of order eps(t) \approx 1e-17.  That is, your steps are smaller than the floating point ULP for t = 3e7.  This suggests something in your problem setup is badly conditioned.

Internal t = 3.77223e+07 and h = 2.91949e-10 are such that t + h = t on the next step. The solver will continue anyway.

Does your problem really simulate time from t = 0 all the way out to t=3e7 before it needs to use small step sizes?  Would it help to rescale the time axis?  

Stuart Brorson
Northeastern University





From: sundial...@llnl.gov <sundial...@llnl.gov> on behalf of Eliott Tixier <00000e5cede23bc...@LISTSERV.LLNL.GOV>
Sent: Friday, August 19, 2022 4:36 AM
To: SUNDIAL...@LISTSERV.LLNL.GOV <SUNDIAL...@LISTSERV.LLNL.GOV>
Subject: [sundials-users] Internal t and h are such that t + h = t on the next step
 

Mehmet Erol Sanliturk

unread,
Aug 22, 2022, 2:32:25 PM8/22/22
to SUNDIAL...@listserv.llnl.gov
In my own iterative algorithms , I am using the following technique :

epsilon = < a value resembling zero , but greater than constant zero >
s = h

Iteration steps :

a :
u = t + s
if ( abs ( t - u ) < epsilon ) then
s = 2 * s    ... or   10.0 * s  whichever is suitable ...
go to a
else
t = u
end if

... Continue for computations ...


Since CVODE is continuing without lock , there should be such a step size correction part .


With my best wishes .


Mehmet Erol Sanliturk







 

Hindmarsh, Alan Carleton

unread,
Aug 22, 2022, 4:54:22 PM8/22/22
to SUNDIAL...@listserv.llnl.gov
In fact, there are fully legitimate problems which require step sizes h with
h/t < unit roundoff, in order to step through a cusp-like feature in the
solution.   The solution y is in fact changing (accurately) during these steps.
For anyone interested, I can supply such a problem, which is a model of
a cavitating bubble.

Alan H


From: sundials-users <sundial...@llnl.gov> on behalf of Mehmet Erol Sanliturk <m.e.sa...@GMAIL.COM>
Sent: Monday, August 22, 2022 11:11 AM
To: sundials-users <sundial...@llnl.gov>
Subject: Re: [sundials-users] Internal t and h are such that t + h = t on the next step
 

Mehmet Erol Sanliturk

unread,
Aug 23, 2022, 12:00:21 PM8/23/22
to SUNDIAL...@listserv.llnl.gov
On Mon, Aug 22, 2022 at 11:54 PM Hindmarsh, Alan Carleton <hindm...@llnl.gov> wrote:
In fact, there are fully legitimate problems which require step sizes h with
h/t < unit roundoff, in order to step through a cusp-like feature in the
solution.   The solution y is in fact changing (accurately) during these steps.
For anyone interested, I can supply such a problem, which is a model of
a cavitating bubble.

Alan H





In my Firefox browser . there is the following search phrase tab :




differential equations test problems for testing differential equation solvers pdf


If you have a link to your problem , that link , or problem itself may be a very useful
test problem .
Sample solution outputs will also be a very valuable contribution .



I am saving pages from the above search list . If I can find a good sample with permissive
copyright licenses , I wish to publish them in possible open source places .

I think a comprehensive test problem set will be a very useful contribution to the Sundials
test problems .

Alan C. Hindmarsh

unread,
Aug 26, 2022, 12:51:06 PM8/26/22
to SUNDIAL...@listserv.llnl.gov
Hello Mehmet,

I will have to do some digging to get that problem.
It appeared in an article I co-authored in J. Comp. Phys.
in 1978 (vol. 1, pp. 56-64).

-Alan H


On 8/22/22 10:02 PM, Mehmet Erol Sanliturk wrote:
> On Mon, Aug 22, 2022 at 11:54 PM Hindmarsh, Alan Carleton <
> hindm...@llnl.gov> wrote:
>
>> In fact, there are fully legitimate problems which require step sizes h
>> with
>> h/t < unit roundoff, in order to step through a cusp-like feature in the
>> solution. The solution y is in fact changing (accurately) during these
>> steps.
>> For anyone interested, I can supply such a problem, which is a model of
>> a cavitating bubble.
>>
>> Alan H
>>
>>
>
>
> In my Firefox browser . there is the following search phrase tab :
>
>
>
> https://urldefense.us/v3/__https://www.google.com/search?q=differential*equations*test*problems*for*testing*differential*equation*solvers*pdf&sxsrf=ALiCzsbpbPB8eIMeEgPkMmJuPB_ukSrlng:1660206623189&ei=H770YuiTC6m9xc8P9o-LoAY&start=120&sa=N&ved=2ahUKEwion53Qr775AhWpXvEDHfbHAmQ4bhDw0wN6BAgBEE0&biw=1508&bih=851&dpr=1__;KysrKysrKysr!!G2kpM7uM-TzIFchu!niV5LebwvV36FPZYh61nd13OP3UtayINISlFqbtb0h4kebmOtJvzHBDMhItiJBswiP7bsQ$
>
> differential equations test problems for testing differential equation
> solvers pdf
>
>
> If you have a link to your problem , that link , or problem itself may be a
> very useful
> test problem .
> Sample solution outputs will also be a very valuable contribution .
>
>
>
> I am saving pages from the above search list . If I can find a good sample
> with permissive
> copyright licenses , I wish to publish them in possible open source places .
>
> I think a comprehensive test problem set will be a very useful contribution
> to the Sundials
> test problems .
>
>
> With my best wishes .
>
> Mehmet Erol Sanliturk
>
>
>
>
>
>

############################

Eliott Tixier

unread,
Aug 29, 2022, 1:23:22 PM8/29/22
to SUNDIAL...@listserv.llnl.gov
Thank you all for your answers


> Does your problem really simulate time from t = 0 all the way out to t=3e7 before it needs to use small step sizes?
> In fact, there are fully legitimate problems which require step sizes h with h/t < unit roundoff

Yes that is our case, we simulate a network of biochemical reactions over several years and there are still "cusp-like features" expected in the
solution, even after a long time.


> Would it help to rescale the time axis?

Yes, changing the time unit from second to days for instance suppresses the warning indeed.

It's still not clear what the answer to question 4. ("How can the solver "continue" if `t+h=t`? Shouldn't it stay stuck at that specific time point?") is. Does that mean the solver accumulates several `y` values for same time `t` when that happens? What if it's a solution time requested by the user, does it take the last `y` value?

Best,
Eliott
--
Eliott Tixier, PhD
Scientific Software Engineer
nova
DISCOVERY
1 Place Verrazzano, 69009 Lyon

Alan C. Hindmarsh

unread,
Aug 31, 2022, 6:31:15 PM8/31/22
to SUNDIAL...@listserv.llnl.gov
It is hard to see how rescaling t would help.  If h/t < unit roundoff when
both are in seconds, the same would be true if both are in days.
Maybe, for some reason, CVODE managed to use larger steps at the
cusp when you rescaled.

As to question 4, the all of the integrator's machinery to advance y
step by step still works fine even when t is not being advanced.

-Alan H
>> ------------------------------
>> *From:* sundials-users <sundial...@llnl.gov> on behalf of Eliott
>> Tixier <00000e5cede23bc...@LISTSERV.LLNL.GOV>
>> *Sent:* Friday, August 19, 2022 1:36 AM
>> *To:* sundials-users <sundial...@llnl.gov>
>> *Subject:* [sundials-users] Internal t and h are such that t + h = t on
>> the next step
>>
>> Dear Sundials developers,
>>
>> In some of our simulations using CVODE we encounter warnings of the form:
>>
>> ```
>> Internal t = 3.77223e+07 and h = 2.91949e-10 are such that t + h = t on
>> the next step. The solver will continue anyway.
>> ```
>>
>> We understand it is only a warning but still have some questions which
>> reading the documentation
>> <https://computing.llnl.gov/sites/default/files/cv_guide-5.7.0.pdf> did
>> not answer:
>>
>> 1. Does it mean the precision of the solution is compromised in any way?
>> 2. If 1. is true, what are the recommended ways of preventing that?
>> 3. If 1. is false, the doc says we can silence the warning by setting `CVodeSetMaxHnilWarns`
>> to a negative values, is that good practice?
>> 4. How can the solver "continue" if `t+h=t`? Shouldn't it stay stuck at
>> that specific time point? We observe that it does not get stuck and indeed
>> continues in practice.
>>
>> We're currently on *CVODE v5.7.0*, more precisely a fork of that
>> <https://urldefense.us/v3/__https://github.com/novadiscovery/sundials/commits/master__;!!G2kpM7uM-TzIFchu!jgdMouBYb0WTtGQnkNyFBYblDc_ykevRWi0LnPRdhgpvC7eRuUWxBI6d3oVDo_aagldWnA$>
>>
>> Thank you for your help!
>>
>> Best,
>> Eliott
>>
>>
>> *This message is intended only for the personal and confidential use of
>> the designated recipient(s) named above. If you are not the intended
>> recipient of this message you are hereby notified that any review,
>> dissemination, distribution or copying of this message is strictly
>> prohibited. Email transmission cannot be guaranteed to be secure or
>> error-free. Therefore, we do not represent that this information is
>> complete or accurate and it should not be relied upon as such. All
>> information is subject to change without notice.*
>> ------------------------------
>>
>> To unsubscribe from the SUNDIALS-USERS list: write to: mailto:
>> SUNDIALS-USERS-...@LISTSERV.LLNL.GOV
>>
>> ------------------------------
>>
>> To unsubscribe from the SUNDIALS-USERS list: write to: mailto:
>> SUNDIALS-USERS-...@LISTSERV.LLNL.GOV
>>
>

############################
Reply all
Reply to author
Forward
0 new messages