[mpich-discuss] MPI static library link problem.
Anatoly G
anatolyrishon at gmail.com
Tue Jan 3 08:20:47 CST 2017
Dear MPICH,
I use MPICH 3.2 configured (without shared libraries):
./configure --prefix=/mpis/Mpich-3.2/mpich-3.2/Ubuntu14.04
--enable-error-checking=runtime --enable-g=dbg CFLAGS=-fPIC CXXFLAGS=-fPIC
FFLAGS=-fpic --enable-threads=runtime --enable-totalview
*--enable-shared=no* --disable-fortran
When I try to compile my program I get linkage errors:
/mpis/Mpich-3.2/mpich-3.2/Ubuntu14.04/lib/libmpicxx.a(initcxx.o): In
function `MPI::File::Create_errhandler(void (*)(MPI::File&, int*, ...))':
/mpis/Mpich-3.2/mpich_3.2_config/mpich-3.2/src/binding/cxx/initcxx.cxx:693:
undefined reference to `MPIR_Errhandler_set_cxx'
/mpis/Mpich-3.2/mpich-3.2/Ubuntu14.04/lib/libmpicxx.a(initcxx.o): In
function `MPI::Comm::Create_errhandler(void (*)(MPI::Comm&, int*, ...))':
/mpis/Mpich-3.2/mpich_3.2_config/mpich-3.2/src/binding/cxx/initcxx.cxx:704:
undefined reference to `MPIR_Errhandler_set_cxx'
/mpis/Mpich-3.2/mpich-3.2/Ubuntu14.04/lib/libmpicxx.a(initcxx.o): In
function `MPI::Win::Create_errhandler(void (*)(MPI::Win&, int*, ...))':
/mpis/Mpich-3.2/mpich_3.2_config/mpich-3.2/src/binding/cxx/initcxx.cxx:714:
undefined reference to `MPIR_Errhandler_set_cxx'
/mpis/Mpich-3.2/mpich-3.2/Ubuntu14.04/lib/libmpicxx.a(initcxx.o): In
function `MPI::Comm::Create_keyval(int (*)(MPI::Comm const&, int, void*,
void*, void*, bool&), int (*)(MPI::Comm&, int, void*, void*), void*)':
/mpis/Mpich-3.2/mpich_3.2_config/mpich-3.2/src/binding/cxx/initcxx.cxx:510:
undefined reference to `MPIR_Keyval_set_proxy'
/mpis/Mpich-3.2/mpich-3.2/Ubuntu14.04/lib/libmpicxx.a(initcxx.o): In
function `MPI::Datatype::Create_keyval(int (*)(MPI::Datatype const&, int,
void*, void*, void*, bool&), int (*)(MPI::Datatype&, int, void*, void*),
void*)':
/mpis/Mpich-3.2/mpich_3.2_config/mpich-3.2/src/binding/cxx/initcxx.cxx:574:
undefined reference to `MPIR_Keyval_set_proxy'
/mpis/Mpich-3.2/mpich-3.2/Ubuntu14.04/lib/libmpicxx.a(initcxx.o): In
function `MPI::Win::Create_keyval(int (*)(MPI::Win const&, int, void*,
void*, void*, bool&), int (*)(MPI::Win&, int, void*, void*), void*)':
/mpis/Mpich-3.2/mpich_3.2_config/mpich-3.2/src/binding/cxx/initcxx.cxx:638:
undefined reference to `MPIR_Keyval_set_proxy'
/mpis/Mpich-3.2/mpich-3.2/Ubuntu14.04/lib/libmpicxx.a(initcxx.o): In
function `MPI::Op::Init(void (*)(void const*, void*, int, MPI::Datatype
const&), bool)':
/mpis/Mpich-3.2/mpich_3.2_config/mpich-3.2/src/binding/cxx/initcxx.cxx:393:
undefined reference to `MPIR_Op_set_cxx'
/mpis/Mpich-3.2/mpich-3.2/Ubuntu14.04/lib/libmpicxx.a(initcxx.o): In
function `MPI::Comm::Reduce_scatter_block(void const*, void*, int,
MPI::Datatype const&, MPI::Op const&) const':
/mpis/Mpich-3.2/mpich_3.2_config/mpich-3.2/./src/binding/cxx/mpicxx.h:1490:
undefined reference to `MPI_Reduce_scatter_block'
collect2: error: ld returned 1 exit status
When I configure MPI with shared libraries:
./configure --prefix=/mpis/Mpich-3.2/mpich-3.2/Ubuntu14.04
--enable-error-checking=runtime --enable-g=dbg CFLAGS=-fPIC CXXFLAGS=-fPIC
FFLAGS=-fpic --enable-threads=runtime --enable-totalview --disable-fortran
my program's build completed correctly.
When I used MPICH 3.1 I didn't see these problems.
Can you please advice?
Regards,
Anatoly.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20170103/bd8082b5/attachment.html>
-------------- next part --------------
_______________________________________________
discuss mailing list discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss
More information about the discuss
mailing list