[R] Compiling R Packages

Cahill, Joshua Joshua.Cahill at sdstate.edu
Thu Oct 30 21:59:24 CET 2008


I am working on a SLES 10 cluster with R available on it.  To better use my resources, I want to use Rmpi, but I am having a difficult time installing it.  I have set the $R_LIBS variable correctly.

The MPI libraries are available through the PGI compiler, but this R instance was compiled with GCC.

The Rmpi package can be compiled and installed with

%R CMD INSTALL Rmpi_0.5-5.tar.gz --configure-args="CC=pgcc --with-mpi=/shared/pgi725/linux86-64/7.2/mpi/mpich"

But when entering R and loading the library, I get
%R
> library(Rmpi)
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared library '/home/<username>/.Rlib/Rmpi/libs/Rmpi.so':
  /home/<username>/.Rlib/Rmpi/libs/Rmpi.so: undefined symbol: __pgdbg_stub
Error in library(Rmpi) : .First.lib failed for 'Rmpi'
Error in dyn.unload(file.path(libpath, "libs", paste("Rmpi", .Platform$dynlib.ext,  :
  dynamic/shared library '/home/<username>/.Rlib/Rmpi/libs/Rmpi.so' was not loaded
>

The undefined symbol is for the PGI debugger.

It doesn't matter if the $CC variable is gcc, pgcc, or mpicc, and all three do show up in the make output during the configure process.

Thanks for your help,
Joshua



More information about the R-help mailing list