[R] problem installing Rpmi : mpi.h...Found in /usr/include/lam, yet "libmpi not found"

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Apr 27 07:57:43 CEST 2007


You have not told us your OS, but this looks like a x86_64 Redhat-based 
Linux and I will assume their file layout.

If so, this is a known problem with Rmpi, which I reported to the 
maintainer quite a while back.

You do not want --with-mpi=/usr/lib64/lam, as that is not where lam is 
(I presume it is where liblam is).  But there is no means provided to have
includes in /usr/include/lam and library in /usr/lib64/lam, and paths are 
hardcoded into the package.  Note that whoever you are quoting said

>> where /path/to/mpi is such that /path/to/mpi/include /path/to/mpi/lib,
>> etc exists

not lib64, and there is no such prefix on x86_64 Linux.  (Also, that is 
not what configure --help says, and the latter is wrong.)  Beyond that, 
the configure code tests for a static library, and you will need a dynamic 
one on x86_64 Linux to link into libRmpi.so.

If you have not bugged the Rmpi maintainer about this, please do so.

It is possible to hack your own Rmpi/src/Makevars to get this to work, but 
if you knew enough to do that I doubt it you would be asking this (and 
the hack depends on your unstated OS).


On Fri, 27 Apr 2007, nicolas bertin wrote:

>
> I cannot manage to install Rmpi_0.5-3
> ... using the regular "Rshell" install.packages("Rpmi")
>
> I followed the advice of Martin to run the shell install command and
> specify the location of mpi (located in "/usr/lib64/lam/" on my machine)
> That is :
> R CMD  INSTALL --configure-args="--with-mpi=/usr/lib64/lam"
> R/Rmpi_0.5-3.tar.gz
>
> But still get the following error
> 	* Installing *source* package 'Rmpi' ...
> 	Try to find mpi.h ...
> 	Found in /usr/include/lam
> 	Try to find libmpi or libmpich ...
> 	checking for main in -lmpi... no
> 	libmpi not found. exiting...
> 	ERROR: configuration failed for package 'Rmpi'
> 	** Removing '/usr/lib64/R/library/Rmpi'
>
> Is there anything I do wrong, or any advice on what to check to figure
> out the source of my problem?
>
> Thank you for your help
>
> Nicolas Bertin
> GSC / RIKEN Yokohama
>
>
>> Hi Nicolas --
>>
>> Please consider posting your problem and eventual solution to the R
>> list serv, so others can benefit.
>>
>> Is this Rmpi_0.5-3 ? The messages do not quite look consistent. How
>> are you installing Rmpi? It might be necessary to do so from the
>> command line, e.g. with
>>
>> R CMD  INSTALL --configure-args="--with-mpi=/path/to/mpi" Rmpi
>>
>> where /path/to/mpi is such that /path/to/mpi/include /path/to/mpi/lib,
>> etc exists
>
>>>   I would like to try to use Rmpi as you advised me but I have some
>>> problem to install this package.
>>> The MPI installed on my machine was openmpi and upon installing Rmpi I
>>> got the following error
>>> 	checking mpi.h usability... no
>>> 	checking mpi.h presence... no
>>> 	checking for mpi.h... no
>>> 	Try to find libmpi or libmpich ...
>>> 	checking for main in -lmpi... no
>>> 	libmpi not found. exiting...
>>>
>>>    I could read that there are some issue with openmpi and proceed to
>>> get remove openmpi and install lam/mpi instead.
>>> LAM/mpi seems to work fine but I now get the following error message
>>> upon installing Rmpi
>>> 	checking mpi.h usability... yes
>>> 	checking mpi.h presence... yes
>>> 	checking for mpi.h... yes
>>> 	Try to find libmpi or libmpich ...
>>> 	checking for main in -lmpi... no
>>> 	libmpi not found. exiting...
>>>
>>>   Do you have any advice on what went possibly be wrong ?


-- 
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-help mailing list