[Rtk-users] Compiling with CUDA

Simon Rit simon.rit at creatis.insa-lyon.fr
Thu Nov 29 05:08:15 EST 2012


Hi,
It's seems to be an allocation problem. How big are your projection images?
You can always change the parameter m_ProjectionSubsetSize to 1 with
http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2
to lower the amount of projection images in the GPU memory.
Simon

On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh <hsieandy at gmail.com> wrote:
> Hi Simon,
>
> I do encounter another problem though.
> So everything compiled file and rtkfdk works fine with cpu.
> However, when I change the hardware argument to cuda, I get the following
> runtime error when rtkfdk is "Reconstructing and Writing":
>
> ========================
> ExceptionObject caught with writer->Update()
>
> itk::ExceptionObject (0000000000B3EC88)
> Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)"
> File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu
> Line: 85
> Description: itk::ERROR: CUFFT ERROR #2
> ==========================
>
>
> I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help.
> Do you know what might be happening? Thanks!
>
> Cheers,
> Andy
>
>
> 2012/11/29 Simon Rit <simon.rit at creatis.insa-lyon.fr>
>>
>> Great! I had no clue what the problem was.... Let us know if when we can
>> help you with anything else,
>> Simon
>>
>> On Nov 29, 2012 8:11 AM, "Andy Shieh" <hsieandy at gmail.com> wrote:
>>>
>>> Hi Simon,
>>>
>>> The problem seems to disappear when I updated the whole directory to the
>>> newest version of RTK.
>>>
>>> Cheers,
>>> Andy
>>>
>>>
>>> 2012/11/29 Andy Shieh <hsieandy at gmail.com>
>>>>
>>>> Hi Simon,
>>>>
>>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA
>>>> production release 5.0 and 4.2. I doubled checked that CUDA is actually
>>>> working (the CUDA examples run properly). And I made sure that the CUDA and
>>>> CUDA SDK directories are correctly specified in the configuration when
>>>> generating the build files. However, I keep getting these linking errors
>>>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea
>>>> what might be going on? Thanks.
>>>>
>>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well.
>>>>
>>>> =============================================
>>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl
>>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float *
>>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z)
>>>> referenced in function "public: void __cdecl
>>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)"
>>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ)
>>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj)
>>>> rtkinlinefdk
>>>> Error 2 error LNK2019: Unresolved external symbols "class
>>>> std::vector<int,class std::allocator<int> > __cdecl
>>>> GetListOfCudaDevices(void)"
>>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ)
>>>> referenced in function "public: void __cdecl
>>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)"
>>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ)
>>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj)
>>>> rtkinlinefdk
>>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl
>>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float
>>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in
>>>> function "public: void __cdecl
>>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)"
>>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ)
>>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj)
>>>> rtkinlinefdk
>>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl
>>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float *
>>>> const,float *,float *,float *)"
>>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function
>>>> "protected: virtual void __cdecl
>>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)"
>>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ)
>>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj)
>>>> rtkinlinefdk
>>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl
>>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)"
>>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in
>>>> function "protected: virtual void __cdecl
>>>> rtk::CudaFFTRampImageFilter::GenerateData(void)"
>>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ)
>>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj)
>>>> rtkinlinefdk
>>>> Error 6 error LNK1120: Five unresolved external symbols
>>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk
>>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl
>>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float *
>>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z)
>>>> referenced in function "public: void __cdecl
>>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)"
>>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ)
>>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj)
>>>> rtkfdk
>>>> Error 8 error LNK2019: Unresolved external symbols "class
>>>> std::vector<int,class std::allocator<int> > __cdecl
>>>> GetListOfCudaDevices(void)"
>>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ)
>>>> referenced in function "public: void __cdecl
>>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)"
>>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ)
>>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj)
>>>> rtkfdk
>>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl
>>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float
>>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in
>>>> function "public: void __cdecl
>>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)"
>>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ)
>>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj)
>>>> rtkfdk
>>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl
>>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float *
>>>> const,float *,float *,float *)"
>>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function
>>>> "protected: virtual void __cdecl
>>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)"
>>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ)
>>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj)
>>>> rtkfdk
>>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl
>>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)"
>>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in
>>>> function "protected: virtual void __cdecl
>>>> rtk::CudaFFTRampImageFilter::GenerateData(void)"
>>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ)
>>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj)
>>>> rtkfdk
>>>> Error 12 error LNK1120: Five unresolved external symbols
>>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk
>>>> =============================================
>>>>
>>>> Cheers,
>>>> Andy
>>>
>>>
>>>
>>> _______________________________________________
>>> Rtk-users mailing list
>>> Rtk-users at openrtk.org
>>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users
>>>
>



More information about the Rtk-users mailing list