[Rd] can't use ATLAS or ACML | 2.9.0

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Jun 26 14:48:19 CEST 2009


On Fri, 26 Jun 2009, Evan Cooch wrote:

> So, tried again from scratch. Again, CentOS 5.3, which is essentially RHEL 
> 5.3.
>
> ./configure --with-blas="-L/opt/acml4.3.0/gfortran64/lib -lacml"
>
> In config.log, get things like
>
> configure:37199: checking for dgemm_ in -L/opt/acml4.3.0/gfortran64/lib 
> -lacml
> configure:37230: gcc -std=gnu99 -o conftest -g -O2  -I/usr/local/include 
> -L/usr/local/lib64 conftest.c -L/opt/acml4.3.0/gfortran64/lib -lacml  -$
> conftest.c: In function 'main':
> conftest.c:189: warning: implicit declaration of function 'dgemm_'
> /usr/bin/ld: warning: libgfortran.so.3, needed by 
> /opt/acml4.3.0/gfortran64/lib/libacml.so, not found (try using -rpath or 
> -rpath-link)

So you don't have a compatible libgfortran installed (not surprising 
as your OS is rather old): try a version of ACML of comparable age to 
your OS that uses.  (I seem to remember needed ACML 4.1.0 on Fedora 
8.)

We also needed to add /opt/acml4.3.0/gfortran64/lib to the ldconfig 
files (something AMD should organize).

> Try
>
> ./configure --with-blas="-L/usr/lib64/atlas  -lf77blas -latlas"
>
> I get the following
>
>
> configure:37199: checking for dgemm_ in -L/usr/lib64/atlas -lf77blas -latlas
> configure:37230: gcc -std=gnu99 -o conftest -g -O2  -I/usr/local/include 
> -L/usr/local/lib64 conftest.c -L/usr/lib64/atlas -lf77blas -latlas  -lg$
> conftest.c: In function 'main':
> conftest.c:189: warning: implicit declaration of function 'dgemm_'
> /usr/bin/ld: cannot find -lf77blas
> collect2: ld returned 1 exit status
> configure:37236: $? = 1
> configure: failed program was:
>
>
> What puzzles me is that lf77blas is definitely in /usr/lib64/atlas  - but 
> configure couldn't find (?). Perhaps its because 100% of the libs in the 
> atlast subdir are xxx.so.3 (perhaps R config is looking for so.1 libs?).

It is looking for .so or .a (a Linux linker always does).  Where did 
you get ATLAS from?  This is what happens if you install the foo and 
not the foo-devel RPM for some package.  And indeed, on Fedora 10 you 
need the atlas-devel RPM ....

> I suspect that many/most of the problems I'm having with getting R to compile 
> (with BLAS and LAPACK) are related to these basic issues - if I can't do even 
> a simple compile with blas, then whats left?

Ask for local help on your OS!  You seem to be asking many questions 
about your OS here, and be assured that R works with ATLAS and ACML 
flawlessly in well-sorted OS installations.  Things like the need for 
the foo-devel RPM are in the R installation manual which the INSTALL 
file asked you to study (before posting).

Note that a much simpler way (as recommended the manual!) to add an 
optimized BLAS is to switch the libRblas.  E.g. I have a note in my 
build file

gannet% cat I.USED
## later
## mv lib/libRblas.so lib/libRblas.so.keep
## ln -s /opt/acml4.3.0/gfortran64_mp/lib/libacml_mp.so lib/libRblas.so

And most users of R do so little linear algebra that an optimized BLAS 
make a negligible difference in performance (but often an appreciable 
one to accuracy).

-- 
Brian D. Ripley,                  ripley at 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



More information about the R-devel mailing list