[mvapich-discuss] MVAPICH2 1.9b build is broken with Clang

Jonathan Perkins perkinjo at cse.ohio-state.edu
Wed Apr 10 13:24:40 EDT 2013


Hello Dmitri, thanks for the report.  I haven't been able to try with
version 3.2 of Clang yet but I've seen that there is an issue with an
older version when building with --enable-shared.  I believe that this
is the same issue you're facing.

Basically with clang it appears that a utility library (mpl) is not
being built with -fPIC.  The error actually shows up before reaching cpi
or osu_benchmarks.  I am still trying to determine the exact issue with
building mpl and will try to prepare a proper.  In the meantime you can
try removing the --enable-shared and --enable-sharedlibs=gcc options if
you are not particular about using a static or shared build of MVAPICH2.

On Sun, Apr 07, 2013 at 04:30:58AM +0300, Dmitri Gribenko wrote:
> Hello,
> 
> MVAPICH2 1.9b build is broken with Clang 3.2.  I don't know if this
> combination ever worked, but MPICH builds with Clang just fine.
> 
> I configure with:
> 
> ./configure --prefix=/o./configure
> --prefix=/opt/eb/software/MVAPICH2/1.9b-ClangGCC-1.1.2
> --with-rdma=gen2 --with-thread-package=pthreads --enable-fast
> --enable-shared --enable-sharedlibs=gcc --enable-f77 --enable-fc
> --enable-cxx
> 
> The first error is during linking cpi in examples.  That one can be
> worked around by using a separate hwloc, instead of relying on
> embedded one.
> 
> The second error is during linking osu_benchmarks:
> 
> user at host osu_benchmarks$ make V=1
> /bin/sh ../libtool  --tag=CC   --mode=link clang  -O2 -march=native
> -DNDEBUG -DNVALGRIND ../lib/libpmpich.la ../lib/libmpich.la -L/lib
> -L/lib -L/opt/eb/software/hwloc/1.6.2-ClangGCC-1.1.2/lib  -L/lib
> -Wl,-rpath,/lib -L/lib -Wl,-rpath,/lib -L/lib -L/lib -o osu_alltoallv
> osu_alltoallv.o  -libmad -libumad -libverbs -lrt -lhwloc -lhwloc -lm
> -lpthread
> libtool: link: clang -O2 -march=native -DNDEBUG -DNVALGRIND -Wl,-rpath
> -Wl,/lib -Wl,-rpath -Wl,/lib -o .libs/osu_alltoallv osu_alltoallv.o
> ../lib/.libs/libpmpich.so -L/lib
> -L/opt/eb/software/hwloc/1.6.2-ClangGCC-1.1.2/lib -L./src/mpl
> -L./src/openpa/src -lmpl -lopa
> /home/easybuild/.local/easybuild/build/MVAPICH2/1.9b/ClangGCC-1.1.2/mvapich2-1.9b/lib/.libs/libmpich.so
> ../lib/.libs/libmpich.so
> /home/easybuild/.local/easybuild/build/MVAPICH2/1.9b/ClangGCC-1.1.2/mvapich2-1.9b/src/mpl/.libs/libmpl.so
> /home/easybuild/.local/easybuild/build/MVAPICH2/1.9b/ClangGCC-1.1.2/mvapich2-1.9b/src/openpa/src/.libs/libopa.so
> -libmad -libumad -libverbs -lrt
> /opt/eb/software/hwloc/1.6.2-ClangGCC-1.1.2/lib/libhwloc.so -ldl -lm
> -lpthread -Wl,-rpath
> -Wl,/opt/eb/software/MVAPICH2/1.9b-ClangGCC-1.1.2/lib -Wl,-rpath
> -Wl,/opt/eb/software/hwloc/1.6.2-ClangGCC-1.1.2/lib
> /usr/bin/ld: cannot find -lmpl
> clang-3: error: linker command failed with exit code 1 (use -v to see
> invocation)
> make: *** [osu_alltoallv] Error 1
> 
> user at host osu_benchmarks$ find .. | grep libmpl
> ../src/mpl/libmpl.la
> ../src/mpl/.libs/libmpl.a
> ../src/mpl/.libs/libmpl.so
> ../src/mpl/.libs/libmpl.la
> ../src/mpl/.libs/libmpl.lai
> ../src/mpl/.libs/libmpl.so.1.0.0
> ../src/mpl/.libs/libmpl.so.1
> 
> I'm running CentOS 6.4, I have the OS-supplied OFED stack installed.
> The compiler is Clang 3.2.
> 
> Please tell me if any other information would be helpful to
> investigate and fix this issue.
> 
> Dmitri
> 
> --
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
> _______________________________________________
> mvapich-discuss mailing list
> mvapich-discuss at cse.ohio-state.edu
> http://mail.cse.ohio-state.edu/mailman/listinfo/mvapich-discuss
> 

-- 
Jonathan Perkins
http://www.cse.ohio-state.edu/~perkinjo



More information about the mvapich-discuss mailing list