[mvapich-discuss] Cannot run test mpirun after install mvapich.
phan nguyen
pnguyen9 at houston.oilfield.slb.com
Fri Jul 6 10:51:03 EDT 2007
Shaun,
I follow your suggestions and did the following
1. Add --enable-sharedlib
to the configure line in make.mvapich.vapi and then applying the
following patch to configure:
--- CUT HERE ---
# This isn't quite right, but it will work for some systems
# Export the shared option to the MPI-2-C++ configure
CXXFLAGS_FOR_SHARED=$CC_SHARED_OPT
+ CXXFLAGS="$CXXFLAGS $CC_SHARED_OPT"
fi
if test "$SHAREDKIND" != "ignore" ; then
# Fortran choices
--- CUT HERE ---
It's seems to work now. Thanks so much for your help
Regards,
Phan Nguyen
Work: 713 513 2550
Mobile: 281 650 8280
-----Original Message-----
From: mvapich-discuss-bounces at cse.ohio-state.edu
[mailto:mvapich-discuss-bounces at cse.ohio-state.edu] On Behalf Of Shaun
Rowland
Sent: Friday, July 06, 2007 1:08 AM
To: phan nguyen
Cc: mvapich-discuss at cse.ohio-state.edu
Subject: Re: [mvapich-discuss] Cannot run test mpirun after install mvapich.
phan nguyen wrote:
> HI Mat,
> I have another problem with MPICH+infinipath
>
> This is the error when compiling with my code
>
> /usr/bin/ld: /ixdata/IX_Software/mvapich/lib/libpmpich++.a(intercepts.o):
> relocation R_X86_64_32S against `a local symbol' can not be used when
making
> a shared object; recompile with -fPIC
> /ixdata/IX_Software/mvapich/lib/libpmpich++.a: could not read symbols: Bad
> value
> collect2: ld returned 1 exit status
>
> I know that this library has to be compiled with -fPIC flag some where in
> the make file, try to add this to the CFLAGS section but still doesn't
work.
> Please help
Is your code trying to create its own shared library, or is this the
result of building a standalone program using mpicxx/mpiCC? It seems you
built MVAPICH with static libraries. Does it work if you edit mpicxx and
mpiCC and change the following (it should be line 83, or close):
CXXFLAGS="-I${includedir}/mpi2c++ -fexceptions"
to:
CXXFLAGS="-I${includedir}/mpi2c++ -fexceptions -fPIC"
thus adding -fPIC there? Another option might be to try building MVAPICH
with shared libraries by adding:
--enable-sharedlib
to the configure line in make.mvapich.vapi and then applying the
following patch to configure:
--- CUT HERE ---
Index: configure
===================================================================
--- configure (revision 1361)
+++ configure (working copy)
@@ -6674,6 +6674,7 @@
# This isn't quite right, but it will work for some systems
# Export the shared option to the MPI-2-C++ configure
CXXFLAGS_FOR_SHARED=$CC_SHARED_OPT
+ CXXFLAGS="$CXXFLAGS $CC_SHARED_OPT"
fi
if test "$SHAREDKIND" != "ignore" ; then
# Fortran choices
--- CUT HERE ---
That should result in mpicxx/mpiCC having the same fix as in the static
case I mentioned above. If you could try either of these and let us know
if that works - and also if you are trying to build a shared library
against the static C++ library that's generated, that would be very helpful.
--
Shaun Rowland rowland at cse.ohio-state.edu
http://www.cse.ohio-state.edu/~rowland/
_______________________________________________
mvapich-discuss mailing list
mvapich-discuss at cse.ohio-state.edu
http://mail.cse.ohio-state.edu/mailman/listinfo/mvapich-discuss
More information about the mvapich-discuss
mailing list