[R-sig-hpc] Problems Installing Rmpi

Rowe, Brian Lee Yung (Portfolio Analytics) B_Rowe at ml.com
Thu May 14 21:54:35 CEST 2009


As much as I like Debian, I never found installing a new OS as the
'easier' solution for a software problem, though if you're on a VM (or
Windows) the argument is different. Of course it also depends on your
level of experience with Linux and its related compilation process.

Rather than speculating, you can see explicitly what mpicc is using with
the -showme variants:

mpicc -showme
mpicc -showme:compile
mpicc -showme:link

man mpicc gives you the details. Noting the values of the above commands
and analyzing your configure.ac script should give you enough clues to
narrow down the root cause and fix it appropriately.

HTH,
Brian


-----Original Message-----
From: r-sig-hpc-bounces at r-project.org
[mailto:r-sig-hpc-bounces at r-project.org] On Behalf Of Hao Yu
Sent: Thursday, May 14, 2009 2:45 PM
To: Rick B.
Cc: r-sig-hpc at r-project.org
Subject: Re: [R-sig-hpc] Problems Installing Rmpi


Rick,

I noticed you were using mpicc. If mpicc is from
/usr/lib64/openmpi/1.2.7-gcc, then it knows where to find mpi.h and
other
header files. Maybe mpicc is not setting properly and it appends mpi.h
to
include.  You might try CC to gcc instead of mpicc. If it fails, then as
Dirk suggested, Ubuntu is the way to go.

Hao

Rick B. wrote:
> Hao said:
>
> Rick, please use
>         ###################################
>         AC_INIT(DESCRIPTION)
>
>         AC_PROG_CC
>
>         AC_ARG_WITH(mpi,
>         [   --with-mpi=/opt/lib32/usr/lib          Location of MPI
>         library.],
>         [   if test "${withval}" != no; then
>                 MPI_ROOT=${withval}
>                 MPI_INCLUDE="-I${MPI_ROOT}/include"
>                 LDFLAGS="$LDFLAGS -L${withval}/lib"
>                 CFLAGS="$CFLAGS -I${withval}/include"
>             fi  ]
>         )
>         MPITYPE="OPENMPI"
>         MPI_DEPS="-DMPI2"
>         AC_CHECK_LIB(util, openpty, [ MPI_LIBS="$MPI_LIBS -lutil" ])
>         AC_CHECK_LIB(pthread, main, [ MPI_LIBS="$MPI_LIBS -lpthread"
])
>
>         PKG_LIBS="${MPI_LIBS} -fPIC"
>         PKG_CPPFLAGS="${MPI_INCLUDE} ${MPI_DEPS} -D${MPITYPE} -fPIC"
>
>         AC_SUBST(PKG_LIBS)
>         AC_SUBST(PKG_CPPFLAGS)
>         AC_SUBST(DEFS)
>
>         AC_OUTPUT(src/Makevars)
>         ###################################
>         to replace the original configure.ac completely. It is
>         completely bypass
>         checking mpi.h and mpi.so. In this way, OS will not append
mpi.h
>         to
>         ${MPI_INCLUDE} (hopefully).
>
>         Hao
> *******************************
>
> Thanks Hao. I replaced the original configure.ac with your code,
created
> a new configure using autoconf, but I get the same result:
>
>
> [root at rab45-1 rick]# CC="mpicc" R CMD INSTALL Rmpi
> --configure-args=--with-mpi=/usr/lib64/openmpi
> * Installing to library '/usr/lib64/R/library'
> * Installing *source* package 'Rmpi' ...
> checking for gcc... mpicc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether mpicc accepts -g... yes
> checking for mpicc option to accept ANSI C... none needed
> checking for openpty in -lutil... yes
> checking for main in -lpthread... yes
> configure: creating ./config.status
> config.status: creating src/Makevars
> ** libs
> gcc -I/usr/lib64/R/include
-I/usr/lib64/openmpi/1.2.7-gcc/include/mpi.h
> -I/usr/local/include    -fpic  -O3 -g -std=gnu99 -c conversion.c -o
> conversion.o
> cc1: error: /usr/lib64/openmpi/1.2.7-gcc/include/mpi.h: not a
directory
> make: *** [conversion.o] Error 1
> chmod: cannot access `/usr/lib64/R/library/Rmpi/libs/*': No such file
or
> directory
> ERROR: compilation failed for package 'Rmpi'
> ** Removing '/usr/lib64/R/library/Rmpi'
>
>
>
> Just to clarify, I'm using CentOS 5.3 and openmpi. To be safe, I've
used
> softlinks to place bin, etc, include and so forth
> under /usr/lib64/openmpi:
>
> [root at rab45-1 Rmpi]# cd /usr/lib64/openmpi
> [root at rab45-1 openmpi]# ll
> total 32
> drwxr-xr-x 8 root root 4096 Apr 28 09:47 1.2.7-gcc
> lrwxrwxrwx 1 root root   32 May 13 10:55 bin
> -> /usr/lib64/openmpi/1.2.7-gcc/bin
> lrwxrwxrwx 1 root root   32 May 13 10:55 etc
> -> /usr/lib64/openmpi/1.2.7-gcc/etc
> lrwxrwxrwx 1 root root   36 May 13 10:55 include
> -> /usr/lib64/openmpi/1.2.7-gcc/include
> lrwxrwxrwx 1 root root   32 May 13 10:51 lib
> -> /usr/lib64/openmpi/1.2.7-gcc/lib
> lrwxrwxrwx 1 root root   32 May 13 10:56 man
> -> /usr/lib64/openmpi/1.2.7-gcc/man
> lrwxrwxrwx 1 root root   34 May 13 10:56 share
> -> /usr/lib64/openmpi/1.2.7-gcc/share
>
>
> It might be easier if I just installed Ubuntu 9.04 (as Dirk indicated
> openmpi and Rmpi are likely to run "out of the box").
>
> Rick B.
>
> _______________________________________________
> R-sig-hpc mailing list
> R-sig-hpc at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
>


-- 
Department of Statistics & Actuarial Sciences
Fax Phone#:(519)-661-3813
The University of Western Ontario
Office Phone#:(519)-661-3622
London, Ontario N6A 5B7
http://www.stats.uwo.ca/faculty/yu

_______________________________________________
R-sig-hpc mailing list
R-sig-hpc at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-hpc

--------------------------------------------------------------------------
This message w/attachments (message) may be privileged, confidential or proprietary, and if you are not an intended recipient, please notify the sender, do not use or share it and delete it. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Merrill Lynch. Subject to applicable law, Merrill Lynch may monitor, review and retain e-communications (EC) traveling through its networks/systems. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or error-free. References to "Merrill Lynch" are references to any company in the Merrill Lynch & Co., Inc. group of companies, which are wholly-owned by Bank of America Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that are part of this E-communication may have additional important disclosures and disclaimers, which you should read. This message is subject to terms available at the following link: http://www.ml.com/e-communications_terms/. By messaging with Merrill Lynch you consent to the foregoing.
--------------------------------------------------------------------------



More information about the R-sig-hpc mailing list