[Rd] Using Fortran 95 in an R package?
Dear R-devel list members, What's the best current advice about writing Fortran code for use in R packages? The Writing R Extensions manual still says that the .Fortran interface is primarily intended for FORTRAN 77 code. In particular, are there portability issues if I use Fortran 95 in a package? For example, I see that Rtools for Windows now include the gfortran compiler. (I know that this question has come up before, but not, as far as I can see, in the last year.) Thanks, John John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Using Fortran 95 in an R package?
On Sun, 9 Dec 2007, John Fox wrote: Dear R-devel list members, What's the best current advice about writing Fortran code for use in R packages? The Writing R Extensions manual still says that the .Fortran interface is primarily intended for FORTRAN 77 code. In particular, are there portability issues if I use Fortran 95 in a package? For example, I see that Rtools for Windows now include the gfortran compiler. Yes, there are still portability issues. We do still see quite a few people using gcc3/g77 (especially on older Linux and commercial Unices) and there are further issues if you make use of subprogram names containing underlines. We don't distribute a cross-building solution for Windows using gfortran (although one can be built, it will not be mature until gcc 4.3.x is out). However, I would not let that deter you: just use .f95 extensions on the Fortran 95 files and avoid underlines. For Windows users you are effectively requiring R = 2.6.0. Brian -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Using Fortran 95 in an R package?
Dear Brian, Thank you for this. John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Prof Brian Ripley Sent: Sunday, December 09, 2007 1:05 PM To: John Fox Cc: r-devel@r-project.org Subject: Re: [Rd] Using Fortran 95 in an R package? On Sun, 9 Dec 2007, John Fox wrote: Dear R-devel list members, What's the best current advice about writing Fortran code for use in R packages? The Writing R Extensions manual still says that the .Fortran interface is primarily intended for FORTRAN 77 code. In particular, are there portability issues if I use Fortran 95 in a package? For example, I see that Rtools for Windows now include the gfortran compiler. Yes, there are still portability issues. We do still see quite a few people using gcc3/g77 (especially on older Linux and commercial Unices) and there are further issues if you make use of subprogram names containing underlines. We don't distribute a cross-building solution for Windows using gfortran (although one can be built, it will not be mature until gcc 4.3.x is out). However, I would not let that deter you: just use .f95 extensions on the Fortran 95 files and avoid underlines. For Windows users you are effectively requiring R = 2.6.0. Brian -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel