[R] Rmpi and x86
Prof Brian Ripley
ripley at stats.ox.ac.uk
Tue Aug 28 20:37:20 CEST 2007
On Tue, 28 Aug 2007, Martin Morgan wrote:
> Edna --
>
> I'll keep this on the list, so that others will learn, and others will
> correct me when I give bad advice!
>
>> relocation R_X86_64_32 against `lam_mpi_comm_world' can not be used
>> when making a shared object; recompile with -fPIC
>
> This likely means that your lam was not built with the --enable-shared
> configure option, as documented in the installation guide. (It might
> also mean that R was not configure with --enable-R-shlib; the message
> is opaque to me).
The line above is
/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../lib64/libmpi.a(infoset.o):
so it means lam needs to be rebuilt either with --enable-shared or just
with -fPIC added to CFLAGS. (Users migrating from i386 Linux to x86_64
Linux got quite used to this quirk.)
> I believe others on the list have only had success with specific
> versions of LAMMPI, so that would be the next place to look (after
> sorting out the shared library issue)
>
> Martin
>
> "Edna Bell" <edna.bell01 at gmail.com> writes:
>
>> Here is what happens:
>> Note: lam-7.1.4
>>
>> linux-tw9c:/home/bell/Desktop/R-2.5.1/bin # ./R CMD INSTALL --clean
>> Rmpi_0.5-3.tar.gz
>> * Installing to library '/home/bell/Desktop/R-2.5.1/library'
>> * Installing *source* package 'Rmpi' ...
>> checking for gcc... gcc
>> checking for C compiler default output... 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 ANSI C... none needed
>> checking how to run the C preprocessor... gcc -E
>> checking for egrep... grep -E
>> checking for ANSI C header files... yes
>> checking for sys/types.h... yes
>> checking for sys/stat.h... yes
>> checking for stdlib.h... yes
>> checking for string.h... yes
>> checking for memory.h... yes
>> checking for strings.h... yes
>> checking for inttypes.h... yes
>> checking for stdint.h... yes
>> checking for unistd.h... yes
>> checking mpi.h usability... yes
>> checking mpi.h presence... yes
>> checking for mpi.h... yes
>> Try to find libmpi or libmpich ...
>> checking for main in -lmpi... yes
>> Try to find liblam ...
>> 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/home/bell/Desktop/R-2.5.1/include
>> -I/home/hodgesse/Desktop/R-2.5.1/include -DPACKAGE_NAME=\"\"
>> -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
>> -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
>> -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
>> -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
>> -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DMPI2 -I/usr/local/include
>> -fpic -g -O2 -c conversion.c -o conversion.o
>> gcc -std=gnu99 -I/home/bell/Desktop/R-2.5.1/include
>> -I/home/bell/Desktop/R-2.5.1/include -DPACKAGE_NAME=\"\"
>> -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
>> -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
>> -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
>> -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
>> -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DMPI2 -I/usr/local/include
>> -fpic -g -O2 -c internal.c -o internal.o
>> gcc -std=gnu99 -I/home/bell/Desktop/R-2.5.1/include
>> -I/home/bell/Desktop/R-2.5.1/include -DPACKAGE_NAME=\"\"
>> -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
>> -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
>> -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
>> -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
>> -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DMPI2 -I/usr/local/include
>> -fpic -g -O2 -c RegQuery.c -o RegQuery.o
>> gcc -std=gnu99 -I/home/bell/Desktop/R-2.5.1/include
>> -I/home/bell/Desktop/R-2.5.1/include -DPACKAGE_NAME=\"\"
>> -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
>> -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
>> -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
>> -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
>> -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DMPI2 -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 -lmpi -llam -lutil -lpthread
>> /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld:
>> /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../lib64/libmpi.a(infoset.o):
>> relocation R_X86_64_32 against `lam_mpi_comm_world' can not be used
>> when making a shared object; recompile with -fPIC
>> /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../lib64/libmpi.a:
>> could not read symbols: Bad value
>> collect2: ld returned 1 exit status
>> make: *** [Rmpi.so] Error 1
>> chmod: cannot access `/home/bell/Desktop/R-2.5.1/library/Rmpi/libs/*':
>> No such file or directory
>> ERROR: compilation failed for package 'Rmpi'
>> ** Removing '/home/bell/Desktop/R-2.5.1/library/Rmpi'
>> linux-tw9c:/home/bell/Desktop/R-2.5.1/bin #
>>
>>
>>
>> On 8/28/07, Martin Morgan <mtmorgan at fhcrc.org> wrote:
>>> Hi Edna --
>>>
>>> I have Rmpi 0.5-3 under R 2.5.1 with LAM 7.1.2 installed on an x86_64
>>> SuSE 10.0.
>>>
>>> I installed (as a regular user, to my own disc space) LAM and ran
>>> through some basic checks (lamboot / lamhalt, checking that I could
>>> compile the demo programs)
>>>
>>> After downloading Rmpi_0.5.3.tar.gz, I did
>>>
>>> CC=mpicc R CMD INSTALL --clean Rmpi_0.5.3.tar.gz
>>>
>>> the configure script of Rmpi found libmpi and liblam in my LAMHOME,
>>> and also -lutil and -lpthread. Source files compiled without any
>>> issues, and the package installed. If I have not issued a lamboot
>>> command, inside R,
>>>
>>>> library(Rmpi)
>>>
>>> loads the library and indicates that it is starting lam. If I have
>>> already issued lamboot, then library(Rmpi) loads as expected.
>>>
>>> Where do things go wrong for you?
>>>
>>> Martin
>>>
>>> "Edna Bell" <edna.bell01 at gmail.com> writes:
>>>
>>>> Dear R Gurus:
>>>>
>>>> Is there a problem with Rmpi on x86 with SUSE 10.1, please?
>>>>
>>>> I've tried everything and it still won't load.
>>>>
>>>> Has anyone else dealt with this please?
>>>>
>>>> Thanks,
>>>> Edna Bell
>>>>
>>>> ______________________________________________
>>>> R-help at stat.math.ethz.ch 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
>>> Bioconductor / Computational Biology
>>> http://bioconductor.org
>>>
>
>
--
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
More information about the R-help
mailing list