Delay Differential Equations (DDE) Solver: what DDE solver do you use?

Dear all,

It was originally from @ivanpribec reply, about Fortran delay differential equations, which is great!

I am checking S. Thompson’s DDE_solver and DKLAG6 solver,
https://www.radford.edu/~thompson/ffddes/index.html
Unfortunately, it seems Thompson’s website is no longer available.

After searching github, I do notice below there are two repos contain Tompson’s DDE solver,

but Thompson’s DKLAG6 solver is still missing.

As both @Arjen and @ivanpribec pointed out, DDE_solver f90 come after DKLAG6, so perhaps no need for DKLAG6 anymore. So I do not know what should be the title of my thread, LOL.

Anyway, what Delay Differential Equations Solver(DDE) solver do you use?
Besides Thompson’s DDE_SOLVER, is Hairer’s solver good enough?

Another irrelevant question,
guys, if you learned the methods of Thompson and/or Hairer’s, and you write your own modern Fortran version of DDE and/or ODE solver. Is there a chance that your modern version can be significantly faster than code of Thompson and Hairer’s?

Thank you very much indeed in advance!

PS.
There is another DDE solver called DDVERK90 by Hossein Zivari Piran,
https://www.cs.toronto.edu/~hzp/index_files/software.html

DKLAG6 apparently is a predecessor of DDE_SOLVER, so I would assume that the functionality is incorporated in the newer package. As I do not know these packages I may be completely wrong ;).
(Note though: the subject does interest me - from a recreational point of view, nothing I encounter in my work)

1 Like

Thank you @Arjen !
Sorry my bad, I did not read @ivanpribec reply careful enough, and very loosely and stupidly mistakenly think DKLAG6 came after DDE_SOLVER. That is why I am actively looking for his DKLAG6 code, LOL.
Indeed, Thompson’s DDE solver should be better than his previous DKLAG6. I guess once have DDE_SOLVER, no need for DKLAG6.

I do not use any - like I said - but I am interested in the concept. I am also interested in the concept of DAEs - differential-algebraic equations, but I must admit that I have trouble understanding the classification of such equations :wink:

1 Like

I was curious about the dde_solver package so I have a few examples and run them. They stop with:
Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

This was with gofrtran 10.02.0 (on Windows). I have not investigated it in any detail ;), but Intel oneAPI Fortran is perfectly happy with running examples b2 and c2g. (There was a warning in the README for the dde_solver project.)

1 Like

Found the problem - the statement starting at line 6274 is the culprit. MY_TRIM_FREQUENCY is zero, so the division is invalid. When I changed it to:

    IF (NSTEPS>0 .AND. MY_TRIM_FREQUENCY > 0) THEN
       IF ( MY_MAX_DELAY> 0.0D0 .AND. &
           (NSTEPS/MY_TRIM_FREQUENCY)*MY_TRIM_FREQUENCY==NSTEPS) THEN

the numerical results were the same as for Intel oneAPI Fortran (at least for the one example I tried), with the exception of some print statements resulting in extra output in the result file instead of on the screen.

1 Like

Thank you very much for the checking @Arjen !

I just checked the dde_solver from WarrenWreckesser’s Github.

I use Intel OneAPI 2021.4 + VS2017, windows 10. I did not include odeavg.f90 in the code.
For the two examples b2 and c2g you mentioned, I have the below warning at two places see below:

warning #6843: A dummy argument with an explicit INTENT(OUT) declaration is not given an explicit value.

For b2 example, both debug and release mode works,

However, for c2g, in debug mode, I do found the program crash at line 7487,

But in release mode, it runs and give the results below,

You could check my files and sln file in the gitlab repo below,

I will need to do some more testing too :slight_smile:

With two data points (the error I found with gfortran and the error you spotted with the debug mode of Intel oneAPI Fortran) I conclude that there is a pattern: the code will work if “short-circuiting” is used - in the screen dump you can see the condition “I <= MYNGUSER” but also the use of I as an index in various arrays. I think the first condition needs to be checked separately:

IF (I <= MYNGUSER) THEN
    IF (...) THEN

instead of the combined condition.

1 Like

Thank you very much @Arjen !
By the way, I found my copy of S. Thompson’s DDE website, I put it in the folder of my above gitlab repo, called A Friendly Fortran DDE Solver
You could download the foler, and click index.html and bingo!