[R] R with MPI
mtmorgan at fhcrc.org
Tue Aug 25 08:17:16 CEST 2009
Hi Polemon --
> On Mon, Aug 24, 2009 at 2:20 PM, polemon <polemon at 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.
This is a configuration error, try install.pacakges("Rmpi",
>> 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
rsprng is listed as 'Suggests' for both Rmpi and snow, so don't need to
be installed for successful Rmpi or snow installation.
Your message in the next post is that
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",
dynamic/shared library '/opt/R/lib64/R/library/Rmpi/libs/Rmpi.so' was not
This is a run-time error, and is because your mpi installation has not
registered the location of the shared object libraries (or has not been
compiled as a shared object?) correctly. See the system command
'ldconfig', or as a workaround launch R with something like
I'm guessing that path is /usr/lib64/openmpi/1.2.7-gcc/lib, but I didn't
look carefully enough at your solution to installing Rmpi to know for sure.
For more help, try the R-sig-HPC mailing list, for instance Hao Yu's
response to this
>> Any ideas on how to workaround that mpi.h problem?
>> Please help,
> I did as described here:
> 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):
> 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
> As you can see, R is installed in /opt/R, libmpi.so.0 is available:
> What should I do, to make Rmpi available in R?
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help