[Rd] f2c to achieve reentrancy in odesolve?

From: <Setzer.Woodrow_at_epamail.epa.gov>
Date: Tue 21 Nov 2006 - 15:10:49 GMT


I am beginning a much-delayed update of odesolve to include several ordinary differential equation solvers from the Livermore package ODEPACK. These are much-used and reliable Fortran codes, and I plan (as I did for lsoda in the current odesolve package) to make as few changes as possible to the Fortran 77 code. However, recently someone wanted to make nested calls to lsoda, which will not work, because Fortran is not generally reentrant. I understand I can use f2c to convert the codes to C, which would then gain reentrancy, and that there are parts of R which were translated from Fortran to C for just this reason (at least, I read that in an earlier R-help message). My questions to this group are:

  1. Will this indeed automatically make the solvers reentrant?
  2. How much do I need to worry about changed numerical behavior of the C version of the solvers after translation?
  3. Are there special considerations not covered in R-exts for code translated with f2c?
  4. Is there a better way to make the Fortran solvers reentrant?
  5. Woodrow Setzer, Ph. D. National Center for Computational Toxicology US Environmental Protection Agency Mail Drop B205-01/US EPA/RTP, NC 27711 Ph: (919) 541-0128 Fax: (919) 541-1194

R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed Nov 22 10:19:12 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 24 Nov 2006 - 17:30:44 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.