[Rtk-users] Compiling with CUDA

Andy Shieh hsieandy at gmail.com
Thu Dec 6 08:09:12 EST 2012


Hi Simon,

Thanks for your patient help.
My GPU memory is 256MB, which I guess should be quite sufficient? It is a
FX1700M.
And it is the only cuda device found on my laptop.
Reducing the dimension or lowering the memory burden didn't seem to do the
trick. RTK still responded with "invalid configuration argument".
I'm guessing there may be some mistakes with my cuda setup or with
compiling RTK with cuda. I'll try harder and let you know.
Does RTK happen to be compatible with only a specific version of CUDA?

Cheers,
Andy


2012/11/30 Simon Rit <simon.rit at creatis.insa-lyon.fr>

> Hi Andy,
> It seems that you have very little GPU memory. Do you know what
> graphics card you have?
> If I were you, I would start with a smaller volume with the
> --dimension option if you use my command line tools (modify as well
> the spacing at first, e.g., --spacing 8 --dimension 32). You can also
> use the --divisions option to split the volume in pieces but you then
> redo the filtering of all projection images.
> BTW, would you have two graphics card, there is nohing to select one
> over the other. Maybe this is what happens to you? You can then modify
> "GetListOfCudaDevices" and add some parameters to select the graphics
> card based on the memory.
> Let me know if I can help more,
> Simon
>
>
> On Thu, Nov 29, 2012 at 1:53 PM, Andy Shieh <hsieandy at gmail.com> wrote:
> > Hi Simon,
> >
> > Thanks for the suggestion. I tried, but it gave another error message.
> >
> > When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following
> > runtime error:
> > ===============
> > Reconstructing and writing...
> > ExceptionObject caught with writer->Update()
> >
> > itk::ExceptionObject (0000000000A5E8D8)
> > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)"
> > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu
> > Line: 102
> > Description: itk::ERROR: CUDA ERROR: invalid configuration argument
> > ================
> >
> >
> > When I set it to the default value of 4, I get the CUFFT error in the
> > previous maile.
> >
> >
> > When I set it to 5, 6, and beyond, I get the following runtime error:
> > ==============
> > Reconstructing and writing...
> > ExceptionObject caught with writer->Update()
> >
> > itk::ExceptionObject (0000000000A2ECB8)
> > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)"
> > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu
> > Line: 69
> > Description: itk::ERROR: CUDA ERROR: out of memory
> > ==============
> >
> > Cheers,
> > Andy
> >
> >
> > 2012/11/29 Simon Rit <simon.rit at creatis.insa-lyon.fr>
> >>
> >> 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
> >> >>>
> >> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/rtk-users/attachments/20121206/134d4302/attachment-0008.html>


More information about the Rtk-users mailing list