[mvapich-discuss] error compiling mvapich2-1.8 with CUDA support on ubuntu

Zbigniew Koza zzkoza at gmail.com
Fri Jul 27 10:03:30 EDT 2012


Hi,

I've just tried to compile mvapich2-1.8 (official release version from a 
tarball) with CUDA support on ubuntu.

 > ./configure -prefix=/usr/local/mvapich2-1.8 --enable-cuda 
--with-cuda=/usr/local/cuda --with-cuda-include=/usr/local/cuda/include 
--with-cuda-libpath=/usr/lib

 > make
[...]
make all-postamble
make[1]: Entering `/home/zkoza/mvapich2/mvapich2-1.8'
( cd examples && make )
make[2]: Entering `/home/zkoza/mvapich2/mvapich2-1.8/examples'
   CC              cpi.c
../bin/mpicc   -o cpi cpi.o  -lm
/usr/bin/ld: 
/home/zkoza/mvapich2/mvapich2-1.8/lib/libmpich.a(alltoall_cuda_osu.o): 
undefined reference to symbol 'ceil@@GLIBC_2.2.5'
/usr/bin/ld: note: 'ceil@@GLIBC_2.2.5' is defined in DSO 
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libm.so so 
try adding it to the linker command line
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libm.so: 
could not read symbols: Invalid operation
collect2: ld returned 1 exit status


This error does not appear when compiling the library without CUDA support.
Changing gcc or nvcc version does not help.
However, I've noticed the problem can be circumvented by manually 
editing Makefile to remove -lm flag.

Is this an acceptable solution?
(the resulting library does not seem to work with CUDA pointers anyway, 
but before I proceed to that point, I would like to
be sure that the compilation process proceeds correctly).

my configuration:

 > cat /etc/issue
Ubuntu 12.04 LTS \n \l

 > uname -a
Linux zbyszek 3.2.0-26-generic #41-Ubuntu SMP Thu Jun 14 17:49:24 UTC 
2012 x86_64 x86_64 x86_64 GNU/Linux

 > gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 
4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs 
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr 
--program-suffix=-4.6 --enable-shared --enable-linker-build-id 
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext 
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-libstdcxx-time=yes 
--enable-gnu-unique-object --enable-plugin --enable-objc-gc 
--disable-werror --with-arch-32=i686 --with-tune=generic 
--enable-checking=release --build=x86_64-linux-gnu 
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

 >nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2012 NVIDIA Corporation
Built on Thu_Apr__5_00:24:31_PDT_2012
Cuda compilation tools, release 4.2, V0.2.1221

 > nvidia-smi
Fri Jul 27 15:53:46 2012
+------------------------------------------------------+
| NVIDIA-SMI 3.302...   Driver Version: 302.06.03 |
|-------------------------------+----------------------+----------------------+
| GPU  Name                     | Bus-Id        Disp.  | Volatile ECC SB 
/ DB |
| Fan  Temp  Perf  Pwr:Usage/Cap| Memory-Usage         | GPU-Util 
Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 480          | 0000:01:00.0     N/A | N/A        N/A |
| 44%   54C  N/A     N/A /  N/A |  12%  184MB / 1535MB | N/A      Default |
+-------------------------------+----------------------+----------------------+


Regards,

Z Koza







More information about the mvapich-discuss mailing list