[R-sig-hpc] Unable to install Rmpi under Leopard with MPICH2 installed
Hao Yu
hyu at stats.uwo.ca
Sun Feb 1 18:08:19 CET 2009
Hi Marco,
Can you check if MPICH2 is compiled with dynamic link libs? Rmpi needs
dynamic libs to work. You can use ldd to Rmpi.so to see which libs are
linked to it.
> ld warning: in /usr/local/lib/libmpich.a, file is not of required
> architecture
Seems indicating static link.
Leopard has openmpi installed. I have universal binary version Rmpi on
Rmpi website (32bit though).
Hao
Blanchette, Marco wrote:
> Dear list,
>
> I found one of my problem. There was a orphan header file (mpi.h) from
> lam-mpi left in /usr/include that was breaking ./configure script. Now,
> after removing the file, I can succesfully build Rmpi from source (see
> below). It builds in 64bit as seen by the -arch x86_64 flag passed to gcc
> (see below). However, when I try to load Rmpi in R I still get a library
> error. Again, your kind help would be appreciated. I would really like to
> hear whether the problem comes from the MPICH2 library not build in 64
> bit.
>
> Thanks
>
> Marco
>
> ### Error from R following attempt to load Rmpi
>> library(Rmpi)
> Error in dyn.load(file, DLLpath = DLLpath, ...) :
> unable to load shared library
> '/Users/mab/Library/R/2.8/library/Rmpi/libs/x86_64/Rmpi.so':
> dlopen(/Users/mab/Library/R/2.8/library/Rmpi/libs/x86_64/Rmpi.so, 6):
> Symbol not found: _MPI_Abort
> Referenced from:
> /Users/mab/Library/R/2.8/library/Rmpi/libs/x86_64/Rmpi.so
> Expected in: dynamic lookup
>
> 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
> '/Users/mab/Library/R/2.8/library/Rmpi/libs/Rmpi.so' was not loaded
>
>
> ### Output from installing Rmpi
> m007344upz:src mab$ R CMD INSTALL Rmpi
> * Installing to library '/Users/mab/Library/R/2.8/library'
> * Installing *source* package 'Rmpi' ...
> checking for gcc... gcc
> 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 gcc accepts -g... yes
> checking for gcc option to accept ISO C89... none needed
> I am here /usr/local
> Try to find mpi.h ...
> Found in /usr/local/include
> Try to find libmpi.so or libmpich.a
> Found libmpich in /usr/local/lib
> checking whether MPICH2 is declared... yes
> checking whether MPICH2 is declared... (cached) yes
> checking for openpty in -lutil... yes
> checking for main in -lpthread... yes
> configure: creating ./config.status
> config.status: creating src/Makevars
> ** libs
> ** arch - x86_64
> gcc-4.2 -arch x86_64 -std=gnu99
> -I/Library/Frameworks/R.framework/Resources/include
> -I/Library/Frameworks/R.framework/Resources/include/x86_64
> -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
> -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_DECL_MPICH2=1
> -DHAVE_DECL_MPICH2=1 -I/usr/local/include -DMPI2 -DMPICH -fPIC
> -I/usr/local/include -fPIC -g -O2 -c RegQuery.c -o RegQuery.o
> gcc-4.2 -arch x86_64 -std=gnu99
> -I/Library/Frameworks/R.framework/Resources/include
> -I/Library/Frameworks/R.framework/Resources/include/x86_64
> -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
> -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_DECL_MPICH2=1
> -DHAVE_DECL_MPICH2=1 -I/usr/local/include -DMPI2 -DMPICH -fPIC
> -I/usr/local/include -fPIC -g -O2 -c Rmpi.c -o Rmpi.o
> gcc-4.2 -arch x86_64 -std=gnu99
> -I/Library/Frameworks/R.framework/Resources/include
> -I/Library/Frameworks/R.framework/Resources/include/x86_64
> -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
> -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_DECL_MPICH2=1
> -DHAVE_DECL_MPICH2=1 -I/usr/local/include -DMPI2 -DMPICH -fPIC
> -I/usr/local/include -fPIC -g -O2 -c conversion.c -o conversion.o
> gcc-4.2 -arch x86_64 -std=gnu99
> -I/Library/Frameworks/R.framework/Resources/include
> -I/Library/Frameworks/R.framework/Resources/include/x86_64
> -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
> -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_DECL_MPICH2=1
> -DHAVE_DECL_MPICH2=1 -I/usr/local/include -DMPI2 -DMPICH -fPIC
> -I/usr/local/include -fPIC -g -O2 -c internal.c -o internal.o
> gcc-4.2 -arch x86_64 -std=gnu99 -dynamiclib
> -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module
> -multiply_defined suppress -L/usr/local/lib -o Rmpi.so RegQuery.o Rmpi.o
> conversion.o internal.o -L/usr/local/lib -lmpich -lutil -lpthread -fPIC
> -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
> -Wl,CoreFoundation
> ld warning: in /usr/local/lib/libmpich.a, file is not of required
> architecture
> ** R
> ** demo
> ** inst
> ** preparing package for lazy loading
> ** help
> >>> Building/Updating help pages for package 'Rmpi'
> Formats: text html latex example
> ** building package indices ...
> * DONE (Rmpi)
>
>
> On 1/31/09 3:01 PM, "Blanchette, Marco" <MAB at stowers.org> wrote:
>
> Dear list,
>
> Because one of the application we use do not run under lam-mpi, I just
> migrated from lam-mpi 7.1.2 to MPICH2 1.0.8. I have been struggling to
> reinstall Rmpi with the new 64 bit R deployment [R 2.8.1 Patched
> (2009-01-29)] on a Mac Pro running Mac OSX 10.5.5 (leopard). Snow builds
> and runs correctly, however Rmpi give the following error after
> installation (either from the repository or from a local install):
>> library(Rmpi)
> Error in dyn.load(file, DLLpath = DLLpath, ...) :
> unable to load shared library
> '/Users/mab/Library/R/2.8/library/Rmpi/libs/x86_64/Rmpi.so':
> dlopen(/Users/mab/Library/R/2.8/library/Rmpi/libs/x86_64/Rmpi.so, 6):
> Library not loaded: /usr//lib/libmpi.0.dylib
> Referenced from:
> /Users/mab/Library/R/2.8/library/Rmpi/libs/x86_64/Rmpi.so
> Reason: image not found
> 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
> '/Users/mab/Library/R/2.8/library/Rmpi/libs/Rmpi.so' was not loaded
>
> MPICH2 (the mpirun, mpiexec and mpicc) is install under /usr/local/bin and
> the libaries are under /usr/local/lib. Is the standard R CMD INSTALL Rmpi
> is suppose to guess the correct configuration? Do I need to have MPICH2
> compile in 64bit? I use to be able to run Rmpi with lam-mpi no problem
> under the 64 bit R 2.8.0.
>
> Your help will be greatly appreciated.
>
> Thanks
>
> Marco
> --
> Marco Blanchette, Ph.D.
> Assistant Investigator
> Stowers Institute for Medical Research
> 1000 East 50th St.
>
> Kansas City, MO 64110
>
> Tel: 816-926-4071
> Cell: 816-726-8419
> Fax: 816-926-2018
>
> _______________________________________________
> R-sig-hpc mailing list
> R-sig-hpc at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
>
>
> --
> Marco Blanchette, Ph.D.
> Assistant Investigator
> Stowers Institute for Medical Research
> 1000 East 50th St.
>
> Kansas City, MO 64110
>
> Tel: 816-926-4071
> Cell: 816-726-8419
> Fax: 816-926-2018
>
> _______________________________________________
> 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
More information about the R-sig-hpc
mailing list