I'm having trouble with R CMD INSTALL Rmpi_0.5-5.tar.gz --configure-args=~/lam lam is is installed locally. lamboot -d (or lamboot-d and also recon) works. make -k check from the lamtest suite passes all tests. Is this is problem with the -fPIC compiler as in the message? Should it be modified in the Makefile? Any help or comments are appreciated, thanks. * Installing to library '/u1/uaf/ogorman/R/x86_64-unknown-linux-gnu-library/2.6' * 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 Try to find mpi.h ... Found in /import/home/u1/uaf/ogorman/lam/include Try to find libmpi.so or libmpich.a checking for main in -lmpi... yes Try to find liblam.so ... checking for main in -llam... yes checking for openpty in -lutil... yes checking for main in -lpthread... yes configure: creating ./config.status config.status: creating src/Makevars ** libs gcc -std=gnu99 -I/usr/local/pkg/r/r-2.6.1/lib64/R/include -I/usr/local/pkg/r/r-2.6.1/lib64/R/include -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -I/import/home/u1/uaf/ogorman/lam/include -DMPI2 -DLAM -fPIC -I/usr/local/include -fpic -g -O2 -c conversion.c -o conversion.o gcc -std=gnu99 -I/usr/local/pkg/r/r-2.6.1/lib64/R/include -I/usr/local/pkg/r/r-2.6.1/lib64/R/include -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -I/import/home/u1/uaf/ogorman/lam/include -DMPI2 -DLAM -fPIC -I/usr/local/include -fpic -g -O2 -c internal.c -o internal.o gcc -std=gnu99 -I/usr/local/pkg/r/r-2.6.1/lib64/R/include -I/usr/local/pkg/r/r-2.6.1/lib64/R/include -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -I/import/home/u1/uaf/ogorman/lam/include -DMPI2 -DLAM -fPIC -I/usr/local/include -fpic -g -O2 -c RegQuery.c -o RegQuery.o gcc -std=gnu99 -I/usr/local/pkg/r/r-2.6.1/lib64/R/include -I/usr/local/pkg/r/r-2.6.1/lib64/R/include -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -I/import/home/u1/uaf/ogorman/lam/include -DMPI2 -DLAM -fPIC -I/usr/local/include -fpic -g -O2 -c Rmpi.c -o Rmpi.o gcc -std=gnu99 -shared -L/usr/local/lib64 -o Rmpi.so conversion.o internal.o RegQuery.o Rmpi.o -L/import/home/u1/uaf/ogorman/lam/lib -lmpi -llam -lutil -lpthread -fPIC /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: /import/home/u1/uaf/ogorman/lam/lib/libmpi.a(abort.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC /import/home/u1/uaf/ogorman/lam/lib/libmpi.a: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [Rmpi.so] Error 1 chmod: cannot access `/import/home/u1/uaf/ogorman/R/x86_64-unknown-linux-gnu-library/2.6/Rmpi/libs/*': No such file or directory ERROR: compilation failed for package 'Rmpi' ** Removing '/import/home/u1/uaf/ogorman/R/x86_64-unknown-linux-gnu-library/2.6/Rmpi' -- "The struggle for today, is not altogether for today - it is for a vast future also." -- Abraham Linclon, December 3, 1861
Hi Brian -- Prof. Ripley's reply to an earlier question http://tolstoy.newcastle.edu.au/R/e2/help/07/08/24306.html points to the need for mpi to be compiled as a shared library. Hope that helps, Martin "Brian O'Gorman" <Brian.O'Gorman at noaa.gov> writes:> I'm having trouble with R CMD INSTALL Rmpi_0.5-5.tar.gz > --configure-args=~/lam > > lam is is installed locally. > lamboot -d (or lamboot-d and also recon) works. make -k check from > the lamtest suite passes all tests. > Is this is problem with the -fPIC compiler as in the message? Should > it be modified in the Makefile? > Any help or comments are appreciated, thanks. > > > * Installing to library > /u1/uaf/ogorman/R/x86_64-unknown-linux-gnu-library/2.6' > * 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 > Try to find mpi.h ... > Found in /import/home/u1/uaf/ogorman/lam/include > Try to find libmpi.so or libmpich.a > checking for main in -lmpi... yes > Try to find liblam.so ... > checking for main in -llam... yes > checking for openpty in -lutil... yes > checking for main in -lpthread... yes > configure: creating ./config.status > config.status: creating src/Makevars > ** libs > gcc -std=gnu99 -I/usr/local/pkg/r/r-2.6.1/lib64/R/include > -I/usr/local/pkg/r/r-2.6.1/lib64/R/include -DPACKAGE_NAME=\"\" > -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" > -DPACKAGE_BUGREPORT=\"\" -I/import/home/u1/uaf/ogorman/lam/include > -DMPI2 -DLAM -fPIC -I/usr/local/include -fpic -g -O2 -c > conversion.c -o conversion.o > gcc -std=gnu99 -I/usr/local/pkg/r/r-2.6.1/lib64/R/include > -I/usr/local/pkg/r/r-2.6.1/lib64/R/include -DPACKAGE_NAME=\"\" > -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" > -DPACKAGE_BUGREPORT=\"\" -I/import/home/u1/uaf/ogorman/lam/include > -DMPI2 -DLAM -fPIC -I/usr/local/include -fpic -g -O2 -c internal.c > -o internal.o > gcc -std=gnu99 -I/usr/local/pkg/r/r-2.6.1/lib64/R/include > -I/usr/local/pkg/r/r-2.6.1/lib64/R/include -DPACKAGE_NAME=\"\" > -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" > -DPACKAGE_BUGREPORT=\"\" -I/import/home/u1/uaf/ogorman/lam/include > -DMPI2 -DLAM -fPIC -I/usr/local/include -fpic -g -O2 -c RegQuery.c > -o RegQuery.o > gcc -std=gnu99 -I/usr/local/pkg/r/r-2.6.1/lib64/R/include > -I/usr/local/pkg/r/r-2.6.1/lib64/R/include -DPACKAGE_NAME=\"\" > -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" > -DPACKAGE_BUGREPORT=\"\" -I/import/home/u1/uaf/ogorman/lam/include > -DMPI2 -DLAM -fPIC -I/usr/local/include -fpic -g -O2 -c Rmpi.c -o > Rmpi.o > gcc -std=gnu99 -shared -L/usr/local/lib64 -o Rmpi.so conversion.o > internal.o RegQuery.o Rmpi.o -L/import/home/u1/uaf/ogorman/lam/lib > -lmpi -llam -lutil -lpthread -fPIC > /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: > /import/home/u1/uaf/ogorman/lam/lib/libmpi.a(abort.o): relocation > R_X86_64_32 can not be used when making a shared object; recompile > with -fPIC > /import/home/u1/uaf/ogorman/lam/lib/libmpi.a: could not read symbols: > Bad value > collect2: ld returned 1 exit status > make: *** [Rmpi.so] Error 1 > chmod: cannot access > /import/home/u1/uaf/ogorman/R/x86_64-unknown-linux-gnu-library/2.6/Rmpi/libs/*': > No such file or directory > ERROR: compilation failed for package 'Rmpi' > ** Removing > /import/home/u1/uaf/ogorman/R/x86_64-unknown-linux-gnu-library/2.6/Rmpi' > > -- > "The struggle for today, is not altogether for today - it is for a vast future also." > -- Abraham Linclon, December 3, 1861 > > ______________________________________________ > R-help at 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.-- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M2 B169 Phone: (206) 667-2793
On Wed, 16 Jan 2008, Brian O'Gorman wrote:> I'm having trouble with R CMD INSTALL Rmpi_0.5-5.tar.gz > --configure-args=~/lam > > lam is is installed locally.That's the problem. You need to build a shared library version, not a static version, to allow it to be compiled into shared objects. (--enable-shared --disable-static, as I recall.) Or at least ensure that your static library is PIC (add -fPIC to the compiler flags and rebuild from scratch). When you do, you may find that linking against some library (perhaps -lutil?) is missing, and you need to modify the Makefiles to include that. (Maybe the latest lam has that corrected: check it appears as a dependency of liblam.so.0.0.0.) You will also need to ensure the location you install is known to ldconfig or in LD_LIBRARY_PATH. I built Rmpi successfully on F8 last week, *provided* you only have the .x86_64 lam[-devel] RPMs installed and not also the .i386 ones (Rmpi looks in /usr/lib on x86_64 before /usr/lib64, which is incorrect). Just in case anyone else meets that quirk. (yum install will by default add both cputypes.)> lamboot -d (or lamboot-d and also recon) works. make -k check from the > lamtest suite passes all tests. > Is this is problem with the -fPIC compiler as in the message? Should it be > modified in the Makefile? > Any help or comments are appreciated, thanks.[And please use R-devel for technical (non-R) programming questions.]> > * Installing to library > '/u1/uaf/ogorman/R/x86_64-unknown-linux-gnu-library/2.6' > * 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 > Try to find mpi.h ... > Found in /import/home/u1/uaf/ogorman/lam/include > Try to find libmpi.so or libmpich.a > checking for main in -lmpi... yes > Try to find liblam.so ... > checking for main in -llam... yes > checking for openpty in -lutil... yes > checking for main in -lpthread... yes > configure: creating ./config.status > config.status: creating src/Makevars > ** libs > gcc -std=gnu99 -I/usr/local/pkg/r/r-2.6.1/lib64/R/include > -I/usr/local/pkg/r/r-2.6.1/lib64/R/include -DPACKAGE_NAME=\"\" > -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" > -DPACKAGE_BUGREPORT=\"\" -I/import/home/u1/uaf/ogorman/lam/include -DMPI2 > -DLAM -fPIC -I/usr/local/include -fpic -g -O2 -c conversion.c -o > conversion.o > gcc -std=gnu99 -I/usr/local/pkg/r/r-2.6.1/lib64/R/include > -I/usr/local/pkg/r/r-2.6.1/lib64/R/include -DPACKAGE_NAME=\"\" > -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" > -DPACKAGE_BUGREPORT=\"\" -I/import/home/u1/uaf/ogorman/lam/include -DMPI2 > -DLAM -fPIC -I/usr/local/include -fpic -g -O2 -c internal.c -o internal.o > gcc -std=gnu99 -I/usr/local/pkg/r/r-2.6.1/lib64/R/include > -I/usr/local/pkg/r/r-2.6.1/lib64/R/include -DPACKAGE_NAME=\"\" > -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" > -DPACKAGE_BUGREPORT=\"\" -I/import/home/u1/uaf/ogorman/lam/include -DMPI2 > -DLAM -fPIC -I/usr/local/include -fpic -g -O2 -c RegQuery.c -o RegQuery.o > gcc -std=gnu99 -I/usr/local/pkg/r/r-2.6.1/lib64/R/include > -I/usr/local/pkg/r/r-2.6.1/lib64/R/include -DPACKAGE_NAME=\"\" > -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" > -DPACKAGE_BUGREPORT=\"\" -I/import/home/u1/uaf/ogorman/lam/include -DMPI2 > -DLAM -fPIC -I/usr/local/include -fpic -g -O2 -c Rmpi.c -o Rmpi.o > gcc -std=gnu99 -shared -L/usr/local/lib64 -o Rmpi.so conversion.o internal.o > RegQuery.o Rmpi.o -L/import/home/u1/uaf/ogorman/lam/lib -lmpi -llam -lutil > -lpthread -fPIC > /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: > /import/home/u1/uaf/ogorman/lam/lib/libmpi.a(abort.o): relocation R_X86_64_32 > can not be used when making a shared object; recompile with -fPIC > /import/home/u1/uaf/ogorman/lam/lib/libmpi.a: could not read symbols: Bad > value > collect2: ld returned 1 exit status > make: *** [Rmpi.so] Error 1 > chmod: cannot access > `/import/home/u1/uaf/ogorman/R/x86_64-unknown-linux-gnu-library/2.6/Rmpi/libs/*': > No such file or directory > ERROR: compilation failed for package 'Rmpi' > ** Removing > '/import/home/u1/uaf/ogorman/R/x86_64-unknown-linux-gnu-library/2.6/Rmpi' > >-- 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
Brian, On 16 January 2008 at 11:26, Brian O'Gorman wrote: | I'm having trouble with R CMD INSTALL Rmpi_0.5-5.tar.gz | --configure-args=~/lam | | lam is is installed locally. | lamboot -d (or lamboot-d and also recon) works. make -k check from the | lamtest suite passes all tests. | Is this is problem with the -fPIC compiler as in the message? Should it | be modified in the Makefile? | Any help or comments are appreciated, thanks. Rmpi has been in Debian, and hence on more than ten architectures, incl several 64 bits ones, for a few years now. While that doesn't benefit you directly if you're not on a Debian system (or on a derivative like Ubuntu), you could look at the configuration we use. The .diff.gz files contain the file debian/rules -- a Makefile that governs how we call configure et. For Rmpi, we just call 'R CMD INSTALL' as usual. So your problem may well be with your local LAM library. See http://packages.debian.org/lam4 for the LAM configuration. We still use LAM 7.1.2. I do recall, however, that I had difficulties building Rmpi (locally at work) with LAM 7.1.3 and 7.1.4 before we switched to Open MPI. With current Open MPI and Rmpi packages, everything just works for me. Hope this helps, ping me offline if you have questions. Regards, Dirk -- Three out of two people have difficulties with fractions.