On Mon, Aug 24, 2009 at 2:20 PM, polemon <polemon@gmail.com> wrote:

> Hello, I plan to use R with my cluster with OpenMPI.
> I need the packaged 'snow' and 'Rmpi' for that, however, I get an error
> while downloading and installing them:
> When I do a:
>     install.packages("Rmpi", dependencies=T)
>
> I get this error:
>     checking for mpi.h... no
>     Try to find libmpi.so or libmpich.a
>     checking for main in -lmpi... no
>     libmpi not found. exiting...
>
> However, mpi.h is present via the openmpi-devel package on my RHEL 5.3.
>
> Some of those packages need sprng 2.0 (rsprng, for instance, which is a
> dependency for another MPI-related package). Sprng 2.0, however, isn't in
> developement for years, I wonder how I am supposed to keep my software up to
> date...
>
> Any ideas on how to workaround that mpi.h problem?
>
> Please help,
>
> --polemon
>

I did as described here:
http://www.cybaea.net/Blogs/Data/R-tips-Installing-Rmpi-on-Fedora-Linux.html

Since Fedora and RHEL are pretty equal, I gave that installation a shot, and
from what I can tell, I got pretty far.
The package installed well, but when I try to load it with library(Rmpi):

> library(Rmpi)
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared library '/opt/R/lib64/R/library/Rmpi/libs/Rmpi.so':
  libmpi.so.0: cannot open shared object file: No such file or directory
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 '/opt/R/lib64/R/library/Rmpi/libs/Rmpi.so' was not
loaded

As you can see, R is installed in /opt/R, libmpi.so.0 is available:

/usr/lib/lam/lib/libmpi.so.0
/usr/lib/lam/lib/libmpi.so.0.0.0
/usr/lib/openmpi/1.2.7-gcc/lib/libmpi.so
/usr/lib/openmpi/1.2.7-gcc/lib/libmpi.so.0
/usr/lib/openmpi/1.2.7-gcc/lib/libmpi.so.0.0.0
/usr/lib64/lam/lib/libmpi.so.0
/usr/lib64/lam/lib/libmpi.so.0.0.0
/usr/lib64/openmpi/1.2.7-gcc/lib/libmpi.so
/usr/lib64/openmpi/1.2.7-gcc/lib/libmpi.so.0
/usr/lib64/openmpi/1.2.7-gcc/lib/libmpi.so.0.0.0

What should I do, to make Rmpi available in R?

Cheers,

--polemon

	[[alternative HTML version deleted]]


