Re: [R] linking R to goto blas

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Mon 13 Jun 2005 - 01:13:55 EST

On Sun, 12 Jun 2005, Stefan Sobernig wrote:

> I am currently trying to link R 2.1.0 to the GOTO BLAS 0.99.3 library on
> a box running Fedora Core 3 , basically following the steps indicated in
> the R-Admin document:
>
> 1: I downloaded the current libgoto.xxx.so from
> http://www.cs.utexas.edu/users/kgoto/libraries/libgoto_prescott-32-r0.99-3.so.gz,
> a version suitable for our XEON machine (Nocona core), unpacked it to
> /usr/lib and created a symlink libgoto.so pointing to the library.
>
> 2: Then, I got ready to re-configure and re-compile R (2.1.0) using the
> following configure flags: ./configure --prefix=/usr --enable-R-shlib
> --enable-shared --with-tcltk --with-blas="-lgoto -lpthread -lm"
>
> I did read the R-Admin doc and therefore I am aware of the fact that
> passing "-lgoto" is supposed to be sufficient, but as a matter of fact

Only for single-threaded versions. For others you need --with-blas="-lgoto -lpthread".

> configuring with --with-blas="-lgoto" only ends up in a libR.so being
> linked to the standard libblas.so. config.log reports in this settings
> that libgoto.xxx.so is missing links to libpthread etc. Therefore, I
> added the two flags "-lpthread -lm" as indicated at GOTO's website and I
> got a clean configure run. (Am I concluding correctly that I am using a
> threaded version of goto blas?)

Dunno: the organization of the Goto site has changed since that section was written. Looks like only multi-threaded (2 threads) versions are currently available.

> 3: Running make, however, freezed when trying to build "grDevices",
> without throwing any warning or error messages:
>
> [...]
> ../../../../library/grDevices/libs/grDevices.so is unchanged
> make[5]: Leaving directory
> `/home/ssoberni/R-2.1.0/src/library/grDevices/src'
> make[4]: Leaving directory
> `/home/ssoberni/R-2.1.0/src/library/grDevices/src'
> [freeze]
>
> 4: I then rummaged the R mailing list archives and stumbled over a
> thread dating from May this year pointing to a similar issue, concerning
> gcc-3.4 and broken lapack libraries provided by FC3 (see
> https://stat.ethz.ch/pipermail/r-devel/2005-May/033117.html).
>
> Following these opinions/ findings, I did the following (though I knew
> that -- in principle -- R is supposed to handle this issue by passing a
> --ffloat-store flag to the fortran compiler, doesn't it?):

It does. For me this works with the internal BLAS and with Goto's blas versions 0.96-2 and 0.99-3, on an Opteron. (It also works on i686 with several other BLASes.)

> * I wanted to remove the FC3 native lapack libraries, and to my
> surprise, they were not installed at all (no liblapack.so.xxx in /usr/lib).
> * I set up an older gcc environment, i.e. the last release from the
> 3.3.x family (3.3.6) and tried to recompile R ending up with the same
> hang-up.

They are not used unless you explicitly asked for them.

> As a last step, I tried to exclude R's internal package explicitly by
> setting --wihtout-lapack, which did not hava a visible effect on the
> building process and did not provide a workaround for the hang-up.

Assuming that is a typo for --without-lapack, it does nothing (it is the default and excludes an external LAPACK).

> Please, I highly appreciate any thoughts or hints as my colleagues and I
> are eager to get into GOTO's universe.

First get a version with the internal BLAS working. That will rule out any issues about LAPACK. Then change the BLAS: it looks as if this might be a problem with the particular Goto BLAS.

Please note: the R-devel list would be a much better choice for such issues -- see the posting guide.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
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, UK                Fax:  +44 1865 272595

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Mon Jun 13 01:19:46 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:33 EST