Dear Martin,

Currently, MPICH2 by default does not install a shared library, so pbdMPI
attempts to link
with a static library using wrong flags. An easier way to solve this is to
recompile MPICH2
with a flag --enable-shared. There may be a way to like with a static
library, but the configure
needs to be changed and retested.

Sincerely,
Wei-Chen Chen


On Fri, May 10, 2013 at 4:24 AM, Martin Ivanov <
martin.ivanov@ifg.uni-tuebingen.de> wrote:

> Dear all,
> I am trying to compile pbdMPI_0.1-7.tar.gz on Cray XE6 HERMIT. My
> environment is this:
> ipmiva@eslogin003:/univ_2/ws3/**ws/ipmiva-WRF_331_CORDEX-0> module list
> Currently Loaded Modulefiles:
>


> And this is my compilation error:
>

>
> gcc -std=gnu99 -shared -L/usr/local/lib64 -o pbdMPI.so comm_errors.o
> comm_sort_double.o comm_sort_integer.o pkg_dl.o pkg_tools.o spmd.o
> spmd_allgather.o spmd_allgatherv.o spmd_allreduce.o spmd_bcast.o
> spmd_communicator.o spmd_gather.o spmd_gatherv.o spmd_info.o spmd_recv.o
> spmd_reduce.o spmd_scatter.o spmd_scatterv.o spmd_send.o spmd_sendrecv.o
> spmd_sendrecv_replace.o spmd_tool.o spmd_utility.o spmd_wait.o
> -L/opt/cray/mpt/5.6.4/gni/mpich2-cray/74/lib -lmpich -lmpl -lopa -lutil
> -lpthread -L/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/system/usr/lib64/R/lib
> -lR
> /usr/lib64/gcc/x86_64-suse-**linux/4.3/../../../../x86_64-**suse-linux/bin/ld:
> /opt/cray/mpt/5.6.4/gni/**mpich2-cray/74/lib/libmpich.a(**comm_get_attr.o):
> relocation R_X86_64_32 against `MPIR_ThreadInfo' can not be used when
> making a shared object; recompile with -fPIC
> /opt/cray/mpt/5.6.4/gni/**mpich2-cray/74/lib/libmpich.a: could not read
> symbols: Bad value
> collect2: ld returned 1 exit status
> make: *** [pbdMPI.so] Error 1
> ERROR: compilation failed for package āpbdMPIā
> * removing
> ā/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/system/usr/lib64/R/library/pbdMPIā
>

	[[alternative HTML version deleted]]

