Hi all. I am new in CUDA, and this is my first post here.
I am using the findCuda script for merging some CUDA code with an existing c++ code using cmake. I use Ubuntu Linux 8.04 and my graphics card is an Nvidia Quadro 4600 FX.
My problem is that the executable is always running in emulation mode, even if CUDA_BUILD_TYPE is set to Device
I have several CMakeLists.txt files, The one in the base directory the relevant lines there are:
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
PROJECT(mytest)
ENABLE_TESTING()
INCLUDE(${CMAKE_SOURCE_DIR}/CMake/cuda/FindCuda.cmake)
ADD_SUBDIRECTORY(cpp)
ADD_SUBDIRECTORY(cuda)
In the cpp directory the CMakeLists.txt file looks like
ADD_DEFINITIONS(-DTHIS_SOURCE_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}\")
ADD_LIBRARY(mylib_cpp mylib_cpp.cc)
And in the cuda directory it is something like:
SET(CUDA_BUILD_TYPE Device)
ADD_DEFINITIONS(-DTHIS_SOURCE_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}\")
CUDA_ADD_LIBRARY(mylib_cuda
mylib_cuda.cu
mylib_cuda_kernels.cu
)
CUDA_ADD_EXECUTABLE(mylib_test mylib_test.cu
)
TARGET_LINK_LIBRARIES(mylib_test
mylib_cpp
mylib_cuda
)
The code is compiling and the executable does what it is intended to do. The problem is that I am not able to run it in Device mode. I don’t think that it is a matter of linux permissions (I have changed them to 666 and ran the code with sudo).
Thanks for your help
Regards