[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cuda compilation

From: Tomas Oberhuber
Subject: cuda compilation
Date: Tue, 29 Dec 2009 19:25:36 +0100
User-agent: KMail/1.9.10


I am experiencing some troubles with cuda. I studied mailing lists about 
autoconf, automake and libtool and from what I have read

Is it possible to check nvcc compilation with autoconf?

Automake and CUDA

Libtool generating flags incompatible with nvcc


I have understood that from the linking point of view nvcc and gcc are 
compatible. So one should only compile .cu files with nvcc and then link all 
together with gcc. To compile .cu files with nvcc I did this in my

include  ${top_srcdir}/

where is


libcore_tests_sources = \

libcore_tests_la_SOURCES = $(libcore_tests_sources)

as I have learned from 'Automake and CUDA'. However, I get this

/bin/bash ../libtool --tag=CXX   --mode=link ccache 
g++  -g -O2 -I/usr/local/cuda/include -DHAVE_CUDA -DHAVE_CPPUNIT -I../../src 
-I../../src/debug -I../src/debug  -I/usr/local/cuda/include -DHAVE_CUDA 
-I../src/debug -I../src/core -I../src/diff -I../../src -I../../../src  
-L/usr/local/cuda/lib64 -lcudart -lcppunit -o 
tnl-unit-tests-dbg tnl-unit-tests.o 
libtool: link: ccache 
g++ -g -O2 -I/usr/local/cuda/include -DHAVE_CUDA -DHAVE_CPPUNIT -I../../src 
-I../../src/debug -I../src/debug -I/usr/local/cuda/include -DHAVE_CUDA 
-I../src/debug -I../src/core -I../src/diff -I../../src -I../../../src -o 
tnl-unit-tests.o  -L/usr/local/cuda/lib64 ./.libs/ 
core/.libs/libcore-tests-dbg.a -lcudart /usr/lib/ -ldl -Wl,-rpath 
tnl-unit-tests.o: In function `TestCaller':
/usr/include/cppunit/TestCaller.h:119: undefined reference to 

simply is completely omitted. If I change it to 
tnlLongVectorCUDATester.cpp (only in I get

make[2]: *** No rule to make target 
`../../../src/core/tnlLongVectorCUDATester.cpp', needed by 
`tnlLongVectorCUDATester.lo'.  Stop.

so automake now tries to compile it. 
Can anybody, please, help me and tell me what I am doing wrong?

Thanks a lot, Tomas Oberhuber.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]