Hi Hugo, I tried your patch. The first 'R CMD INSTALL --preclean Rmpi_0.5-9a.tar.gz' failed with:
*** installing help indices ** building package indices ... ** testing if installed package can be loaded [inspironM12:22936] *** Process received signal *** [inspironM12:22936] Signal: Segmentation fault (11) [inspironM12:22936] Signal code: Address not mapped (1) [inspironM12:22936] Failing at address: 0xb5f5480c * DONE (Rmpi) [inspironM12:22936] *** End of error message *** The second 'R CMD INSTALL --preclean Rmpi_0.5-9a.tar.gz' works like a charm: root@inspironM12:/usr/src(26)# R CMD INSTALL --preclean Rmpi_0.5-9a.tar.gz * installing to library ‘/usr/lib/R/library’ * installing *source* package ‘Rmpi’ ... checking for gcc... i686-pc-linux-gnu-gcc -std=gnu99 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 i686-pc-linux-gnu-gcc -std=gnu99 accepts -g... yes checking for i686-pc-linux-gnu-gcc -std=gnu99 option to accept ISO C89... none needed I am here /usr and it is OpenMPI Trying to find mpi.h ... Found in /usr/include Trying to find libmpi.so or libmpich.a ... Found libmpi in /usr/lib checking for openpty in -lutil... yes checking for main in -lpthread... yes configure: creating ./config.status config.status: creating src/Makevars ** libs i686-pc-linux-gnu-gcc -std=gnu99 -I/usr/lib/R/include -DPACKAGE_NAME= \"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -I/usr/include -DMPI2 -DOPENMPI -I/usr/local/include -fpic -O2 -march=core2 -mtune=generic -fomit-frame-pointer -pipe -c RegQuery.c -o RegQuery.o i686-pc-linux-gnu-gcc -std=gnu99 -I/usr/lib/R/include -DPACKAGE_NAME= \"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -I/usr/include -DMPI2 -DOPENMPI -I/usr/local/include -fpic -O2 -march=core2 -mtune=generic -fomit-frame-pointer -pipe -c Rmpi.c -o Rmpi.o i686-pc-linux-gnu-gcc -std=gnu99 -I/usr/lib/R/include -DPACKAGE_NAME= \"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -I/usr/include -DMPI2 -DOPENMPI -I/usr/local/include -fpic -O2 -march=core2 -mtune=generic -fomit-frame-pointer -pipe -c conversion.c -o conversion.o i686-pc-linux-gnu-gcc -std=gnu99 -I/usr/lib/R/include -DPACKAGE_NAME= \"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -I/usr/include -DMPI2 -DOPENMPI -I/usr/local/include -fpic -O2 -march=core2 -mtune=generic -fomit-frame-pointer -pipe -c internal.c -o internal.o i686-pc-linux-gnu-gcc -std=gnu99 -shared -Wl,-O1 -Wl,--as-needed -o Rmpi.so RegQuery.o Rmpi.o conversion.o internal.o -L/usr/lib -lmpi -lutil -lpthread -L/usr/lib/R/lib -lR installing to /usr/lib/R/library/Rmpi/libs ** R ** demo ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ... ** testing if installed package can be loaded * DONE (Rmpi) Am Freitag, den 17.06.2011, 13:28 +0200 schrieb Hugo Mildenberger: > Juergen, > > > I try to install Rmpi as root with install.packages("Rmpi"). > > It fails with: > > ... > > I encountered a similar problem with openmpi-1.5.3 and > Rmpi_0.5-9.tar.gz. The reason was an unchecked call to > dlopen("libmpi.so.0"). At least openmpi-1.5.3 does not provide > "libmpi.so.0" anymore. The patch below corrects for this. > > According to man dlopen, this should work with all POSIX.1-2001 > compliant systems. But possibly R already has an abstraction layer > for loading shared objects? > > Here is how to apply this patch locally: > > tar -xvzf Rmpi_0.5-9.tar.gz > patch -p1 < rmpi-check-dlopen-status.patch > tar -cvzf Rmpi_0.5-9a.tar.gz > R CMD INSTALL --preclean Rmpi_0.5-9a.tar.gz > > > Best > > Hugo > > ---- cut ---- > > diff -ru a/Rmpi/src/Rmpi.c b/Rmpi/src/Rmpi.c > --- a/Rmpi/src/Rmpi.c 2010-11-30 20:38:01.000000000 +0100 > +++ b/Rmpi/src/Rmpi.c 2011-06-17 12:48:37.000000000 +0200 > @@ -68,7 +68,11 @@ > else { > > #ifdef OPENMPI > - dlopen("libmpi.so.0", RTLD_GLOBAL | RTLD_LAZY); > + if (!dlopen("libmpi.so", RTLD_GLOBAL | RTLD_LAZY)) { > + Rprintf("%s\n",dlerror()); > + return AsInt(0); > + } > + > #endif > > #ifndef MPI2 > > --- cut ---- > > > > > > > On Monday 07 March 2011 21:53:05 r...@uni-potsdam.de wrote: > > I try to install Rmpi as root with install.packages("Rmpi"). > > It fails with: > > ... > > checking for x86_64-pc-linux-gnu-gcc -std=gnu99 option to accept ISO > > C89... none needed > > I am here /usr and it is OpenMPI > > Trying to find mpi.h ... > > Found in /usr/include > > Trying to find libmpi.so or libmpich.a ... > > Found libmpi in /usr/lib > > checking for openpty in -lutil... yes > > checking for main in -lpthread... yes > > configure: creating ./config.status > > config.status: creating src/Makevars > > ** libs > > x86_64-pc-linux-gnu-gcc -std=gnu99 -I/usr/lib64/R/include > > -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" > > -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -I/usr/include -DMPI2 > > -DOPENMPI -I/usr/local/include -fpic -march=nocona -O2 -pipe > > -fomit-frame-pointer -c RegQuery.c -o RegQuery.o > > x86_64-pc-linux-gnu-gcc -std=gnu99 -I/usr/lib64/R/include > > -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" > > -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -I/usr/include -DMPI2 > > -DOPENMPI -I/usr/local/include -fpic -march=nocona -O2 -pipe > > -fomit-frame-pointer -c Rmpi.c -o Rmpi.o > > x86_64-pc-linux-gnu-gcc -std=gnu99 -I/usr/lib64/R/include > > -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" > > -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -I/usr/include -DMPI2 > > -DOPENMPI -I/usr/local/include -fpic -march=nocona -O2 -pipe > > -fomit-frame-pointer -c conversion.c -o conversion.o > > x86_64-pc-linux-gnu-gcc -std=gnu99 -I/usr/lib64/R/include > > -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" > > -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -I/usr/include -DMPI2 > > -DOPENMPI -I/usr/local/include -fpic -march=nocona -O2 -pipe > > -fomit-frame-pointer -c internal.c -o internal.o > > x86_64-pc-linux-gnu-gcc -std=gnu99 -shared -Wl,-O1 -Wl,--as-needed -o > > Rmpi.so RegQuery.o Rmpi.o conversion.o internal.o -L/usr/lib -lmpi > > -lutil -lpthread -L/usr/lib64/R/lib -lR > > installing to /usr/lib64/R/library/Rmpi/libs > > ** R > > ** demo > > ** inst > > ** preparing package for lazy loading > > ** help > > *** installing help indices > > ** building package indices ... > > ** testing if installed package can be loaded > > /usr/lib64/R/bin/exec/R: symbol lookup > > error: /usr/lib64/openmpi/mca_paffinity_linux.so: undefined symbol: > > mca_base_param_reg_int > > > > The downloaded packages are in > > ?/tmp/RtmpLvvl9R/downloaded_packages? > > Updating HTML index of packages in '.Library' > > Warning message: > > In install.packages("Rmpi") : > > installation of package 'Rmpi' had non-zero exit status > > > > The system is a gentoo system with openmpi-1.5.1. I am thankful for any > > hint. > > > > Juergen > > > > ______________________________________________ > > R-help@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.