[R-sig-hpc] libRblas.so => not found problem

Jonathan Greenberg jgrn at illinois.edu
Thu Apr 5 19:34:43 CEST 2012

Follow-up below:

On Thu, Apr 5, 2012 at 11:58 AM, Dirk Eddelbuettel <edd at debian.org> wrote:
> On 5 April 2012 at 11:32, Jonathan Greenberg wrote:
> | r-sig-hpc'ers:
> |
> | I'm banging my head against a wall with this.  I recently updated R to 2.15 via:
> |
> | ./configure --prefix=/pathtoinstall/ --enable-R-shlib --enable-BLAS-shlib
> | make
> | make install
> |
> | I noticed that I wasn't getting a multithreaded response on, e.g.:
> | a = matrix(rnorm(5000*5000), 5000, 5000)
> | b = matrix(rnorm(5000*5000), 5000, 5000)
> | c = a%*%b
> |
> | [This used to light up all 12 cores on our system, now it only lights
> | up one and takes MUCH longer].
> |
> | I have an update-alternatives set up for /pathto/R/lib/libRblas.so (I
> | backed up the installed one to libRblas.so_bak) where I have a few
> | flavors of BLAS I've been playing with (including one that USED to
> | work, an alpha of OpenBLAS).  I also have the most recent OpenBLAS and
> | Intel MKL.  The update-alternatives IS working.
> |
> | When I ldd R I see I no longer have a link to libRblas.so:
> |  ldd /pathto/R/bin/exec/R
> |         linux-vdso.so.1 =>  (0x00007fffd4a9e000)
> |         libR.so => not found
> |         libRblas.so => not found
> I think that means that R chose to build its own BLAS as your configure call
> did not lead to all required headers.
> Do 'locate libRblas.so' -- it exists, and /usr/bin/R sets variables to find
> it.
> I suspect your problem really is with your local compilation.

Ah hah -- ok, where in the configure script can I point it towards my
local BLAS libraries?  I presume the --prefix isn't cutting it...
> | Nothing I do seems to re-link this, and even downgrading back to R
> | 2.14.2 hasn't fixed this.  I even removed the /pathto/R directory to
> | attempt a "clean" install.   FYI: I am on a system that MUST have R
> | compiled from scratch, so I can't use any pre-existing binaries.
> Why?
> It all works.  If you can't use them, maybe you want to at least study their
> build recipes. The debian/ directory is in the sources after all.  But it
> seems silly that you want to reinvent the use of update-alternatives etc.

I'm on a supercomputer which loads its entire base system and a small
subset of modules into main memory.  An optimized R is not one of
these modules that the admins have deigned to install.  All remaining
programs MUST be compiled by the end users, hence I can't use apt-get
(I've heard tales of non-root users getting this to work, but I was
not able to ever figure this out -- compiling from scratch was a lot
easier).  I will look at your build recipes to see if I can parse it.
It seems like I might just need to point the configure script towards
my "local" libraries, although I'm not quite sure how to do that...


Jonathan A. Greenberg, PhD
Assistant Professor
Department of Geography and Geographic Information Science
University of Illinois at Urbana-Champaign
607 South Mathews Avenue, MC 150
Urbana, IL 61801
Phone: 415-763-5476
AIM: jgrn307, MSN: jgrn307 at hotmail.com, Gchat: jgrn307, Skype: jgrn3007

More information about the R-sig-hpc mailing list