Skip to content

crossprod(): g77 versus gfortran

4 messages · Brian Ripley, Benjamin Tyner, Simon Urbanek

#
Hi

I've got two builds of R, one using g77 (version 3.4.6) and the other
using gfortran (version 4.1.2). The two builds are otherwise identical
as far as I can tell. The one which used g77 performs crossprod()s
roughly twice as fast as the gfortran one. I'm wondering if this rings a
bell with anyone, and if so, are you aware of any configure settings
which will improve the performance when using gfortran. This is on RHEL 5.

Regards
Ben
#
On 05/03/2013 01:45, Benjamin Tyner wrote:
Note that recent versions of R do not build with g77, and have 
performance improvements in linear algebra.  So please follow the 
posting guide and give up the 'at a minimum' information requested and a 
reproducible example.

Also, check what BLAS is in use: an optimized BLAS can make a lot of 
difference on such simple operations.
#
Thank you Brian. So it sounds like appendix B.6 of

   http://cran.r-project.org/doc/manuals/R-admin.html

should be updated to reflect that g77 is no longer supported; I will
notify CRAN at R-project.org of this unless you suggest a different recipient.

In any case, I tried again but using gfortran version 4.4.0, and now the
timings are back to what they were under g77.

As for BLAS, was using the one that ships with R, as wanted to keep
things simple for benchmarking purposes.

Thanks again.
#
On Mar 5, 2013, at 10:38 PM, Benjamin Tyner wrote:

            
I think you misunderstood - you can use g77 but you will also need F90-capable Fortran - typically gfortran - unless you have other source for LAPACK and that's what B.6 says explicitly.

Cheers,
Simon