Hi, I was just able to install the patched Rmpi on the second system with openmpi-1.5.3. What can we that Rmpi_0.5-9a.tar.gz becomes a standard CRAN package?
Regards Juergen 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.