users > Compilation with CUDA support
Aug 30, 2016  03:08 PM | Vilim Stih
Compilation with CUDA support
Hello,

I am trying to compile CMTK with CUDA support on Linux (Ubuntu Linux 2016.4, 64 bit). The compilation works fine without CUDA support enabled, but when it is enabled I get the following errors:

[ 73%] Building CXX object libs/GPU/CMakeFiles/cmtkGPU.dir/cmtkImagePairAffineRegistrationFunctionalDevice.cxx.o
/home/vilim/Programs/cmtk/cmtk-scm-2016-08-28/core/libs/GPU/cmtkImagePairAffineRegistrationFunctionalDevice.cxx: In member function 'virtual cmtk::Functional::ReturnType cmtk::ImagePairAffineRegistrationFunctionalDevice::Evaluate()':
/home/vilim/Programs/cmtk/cmtk-scm-2016-08-28/core/libs/GPU/cmtkImagePairAffineRegistrationFunctionalDevice.cxx:87:127: error: cannot convert 'const long long int*' to 'const int*' for argument '1' to 'float cmtk::ImagePairAffineRegistrationFunctionalDeviceEvaluateMSD(const int*, void*, const int*, void*, const float (*)[4])'
his->m_MovingVolumeOnDevice->GetDeviceArrayPtr()->GetArrayOnDevice(), matrix );
^
libs/GPU/CMakeFiles/cmtkGPU.dir/build.make:381: recipe for target 'libs/GPU/CMakeFiles/cmtkGPU.dir/cmtkImagePairAffineRegistrationFunctionalDevice.cxx.o' failed
make[2]: *** [libs/GPU/CMakeFiles/cmtkGPU.dir/cmtkImagePairAffineRegistrationFunctionalDevice.cxx.o] Error 1
CMakeFiles/Makefile2:6275: recipe for target 'libs/GPU/CMakeFiles/cmtkGPU.dir/all' failed
make[1]: *** [libs/GPU/CMakeFiles/cmtkGPU.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

The same error happens for both the 3.3.1 source and the nightly version downloaded from the subversion repository, and persists for both gcc 4.9 and 5.4

Is there perhaps a precompiled package with CUDA support, or a way to fix this bug?

Best regards,
Vilim

Threaded View

TitleAuthorDate
Compilation with CUDA support
Vilim Stih Aug 30, 2016
Torsten Rohlfing Sep 1, 2016