Hi!
I am attempting to integrate cuda into my project, in order to speed up some parallelizable computation.
My first step was to make a trivial cuda addition and get it to compile. I renamed LHstuff.cpp (the file which contains the function I want to implement in cuda) into LHstuff.cu and added following lines of code:
__global__ void kernel()
{
//do nothing
}
I changed nothing else in the code. I changed CMakeFiles.txt as documented in FindCUDA.cmake file.
When I tried compiling the project, there were a lot of DLL related warning (which did not appear before making cuda-related changes), and one fatal error.
[font=“Courier New”]1>------ Build started: Project: Spine, Configuration: Debug x64 ------
1>Building NVCC (Device) object Debug/Spine_generated_LHstuff.cu.obj
1>LHstuff.cu
1>LHstuff.cu
1>LHstuff.cu
//warnings, a lot of the following type (this type of warnings was not present before CUDA integration):
1>d:\repo\spine2008\qe\vertex.hh(79): here
1>D:\SDK\OpenSceneGraph-2.8.3\include\osg/Array(169): warning: field of class type without a DLL interface used in a class with a DLL interface
1>D:\SDK\OpenSceneGraph-2.8.3\include\osg/PrimitiveSet(474): warning: base class dllexport/dllimport specification differs from that of the derived class
//finally the error here (cudafe.exe crashes)
1>D:/Repo/Spine2008/LHstuff.cu(167): here
1>D:\SDK\InsightToolkit-3.20.0\Utilities\vxl\core\vnl/vnl_matrix_fixed.h(766): internal error: assertion failed at: “D:/Bld/rel/gpgpu/toolkit/r3.2/compiler/edg/EDG_4.1/src/lower_il.c”, line 7434
1>1 catastrophic error detected in the compilation of “C:/Users/Dzenan/AppData/Local/Temp/tmpxft_00001204_00000000-6_LHstuff.cpp1.ii”.
1>Compilation aborted.
1>This application has requested the Runtime to terminate it in an unusual way.
1>Please contact the application’s support team for more information.
1>CMake Error at CMakeFiles/Spine_generated_LHstuff.cu.obj.cmake:256 (message):
1> Error generating file
1> D:/Repo/Spine2008/Debug/Spine_generated_LHstuff.cu.obj
1>Project : error PRJ0019: A tool returned an error code from “Building NVCC (Device) object Debug/Spine_generated_LHstuff.cu.obj”
1>Build log was saved at “file://d:\Repo\Spine2008\Spine.dir\Debug\BuildLog.htm”
1>Spine - 2 error(s), 214 warning(s)
2>------ Skipped Build: Project: ALL_BUILD, Configuration: Debug x64 ------
2>Project not selected to build for this solution configuration
========== Build: 0 succeeded, 1 failed, 3 up-to-date, 1 skipped ==========[/font]
Full build log is attached.
I am using VS2008 SP1, Win7 x64, compile target x64. CUDA version 3.2, GTX280 with driver 260.93.
Am I doing something wrong, or is there some bug in cuda compiler?
Regards,
Dženan
BuildLog.htm (74.3 KB)