You are correct -- there is no libmpi.so in that directory, only libmpi.a.
So I need to recompile openMPI to produce shared, rather than a static
libraries?
Jeff
Hi. Can you check if libmpi.so is installed at
/opt/openmpi/tcp-intel//lib/?
This line seems indicating libmpi.a is checked instead of libmpi.so. Hao
/usr/bin/ld: /opt/openmpi/tcp-intel//lib/libmpi.a(comm_init.o):
relocation
R_X86_64_32S against `ompi_mpi_comm_null' can not be used when making a
shared object; recompile with -fPIC
lists at jdadesign.net wrote:
All,
I've been searching around on mailing lists for days but still haven't
been able to get Rmpi working on my cluster.
Most recently, I've set the mpi paths using configure.args, but still
can't get the package installed correctly. I'm on RedHat 5 64 bit,
trying
to use OpenMPI. Here's the most recent error I've received:
install.packages("Rmpi",configure.args=c("--with-mpi=/opt/openmpi/tcp-intel/",
"--with-mpi-libpath=/opt/openmpi/tcp-intel/lib/",
"--with-mpi-type=OPENMPI"))
Installing package(s) into
?/home/jalle6/R/x86_64-redhat-linux-gnu-library/2.12?
(as ?lib? is unspecified)
trying URL
'http://cran.sixsigmaonline.org/src/contrib/Rmpi_0.5-9.tar.gz'
Content type 'application/x-gzip' length 87953 bytes (85 Kb)
opened URL
==================================================
downloaded 85 Kb
* installing *source* package ?Rmpi? ...
checking for gcc... gcc -m64 -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 gcc -m64 -std=gnu99 accepts -g... yes
checking for gcc -m64 -std=gnu99 option to accept ISO C89... none
needed
Trying to find mpi.h ...
Found in /opt/openmpi/tcp-intel//include
Trying to find libmpi.so or libmpich.a ...
checking for main in -lmpi... yes
checking for openpty in -lutil... yes
checking for main in -lpthread... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gcc -m64 -std=gnu99 -I/usr/include/R -DPACKAGE_NAME=\"\"
-DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
-DPACKAGE_BUGREPORT=\"\" -I/opt/openmpi/tcp-intel//include -DMPI2
-DOPENMPI -I/usr/local/include -fpic -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -c RegQuery.c -o
RegQuery.o
gcc -m64 -std=gnu99 -I/usr/include/R -DPACKAGE_NAME=\"\"
-DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
-DPACKAGE_BUGREPORT=\"\" -I/opt/openmpi/tcp-intel//include -DMPI2
-DOPENMPI -I/usr/local/include -fpic -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -c Rmpi.c -o Rmpi.o
gcc -m64 -std=gnu99 -I/usr/include/R -DPACKAGE_NAME=\"\"
-DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
-DPACKAGE_BUGREPORT=\"\" -I/opt/openmpi/tcp-intel//include -DMPI2
-DOPENMPI -I/usr/local/include -fpic -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -c conversion.c -o
conversion.o
gcc -m64 -std=gnu99 -I/usr/include/R -DPACKAGE_NAME=\"\"
-DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
-DPACKAGE_BUGREPORT=\"\" -I/opt/openmpi/tcp-intel//include -DMPI2
-DOPENMPI -I/usr/local/include -fpic -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -c internal.c -o
internal.o
gcc -m64 -std=gnu99 -shared -L/usr/local/lib64 -o Rmpi.so RegQuery.o
Rmpi.o conversion.o internal.o -L/opt/openmpi/tcp-intel//lib -lmpi
-lutil
-lpthread -L/usr/lib64/R/lib -lR
/usr/bin/ld: /opt/openmpi/tcp-intel//lib/libmpi.a(comm_init.o):
relocation
R_X86_64_32S against `ompi_mpi_comm_null' can not be used when making a
shared object; recompile with -fPIC
/opt/openmpi/tcp-intel//lib/libmpi.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [Rmpi.so] Error 1
ERROR: compilation failed for package ?Rmpi?
* removing ?/home/jalle6/R/x86_64-redhat-linux-gnu-library/2.12/Rmpi?
The downloaded packages are in
?/tmp/RtmpbJFYNv/downloaded_packages?
Warning message:
In install.packages("Rmpi", configure.args =
c("--with-mpi=/opt/openmpi/tcp-intel/", :
installation of package 'Rmpi' had non-zero exit status
I'll have to confess that I am brand new to MPI, and not much better in
dealing with compiling/linking C libraries.
Thanks in advance,
Jeff