[Rtk-users] building CUDA

Howard lomahu at gmail.com
Thu Feb 12 13:37:39 EST 2015


When I did the following:

CUDA_HAVE_GPU  ON
CUDA_BUILD_CUBIN OFF ( this removed the errors I reported in last posting)
CUDA_HOST_COMPILATION_CPP ON (following Yang K Park's screenshot)

building was successful. I could run

rtkfdk --hardware cuda -r ... ((Is this the correct way of running fdk
using cuda?)

with successful reconstruction. It's done in < 15s, wow!

A separate question: how to specify cuda for rtksart,
rtkadmmwavelets, rtkadmmtotalvariations etc?

Thanks,
-howard










On Thu, Feb 12, 2015 at 12:42 PM, Simon Rit <simon.rit at creatis.insa-lyon.fr>
wrote:

> That's more complicated. First, CUDA_HAVE_GPU is normally turned on
> automatically but maybe it's been turned off due to the problem you're
> encountering now.
> The problem you have is probably not specific to RTK, we don't develop
> FindCUDA.cmake. I quickly checked FindCUDA.cmake and there if an
> option CUDA_BUILD_CUBIN, maybe turn it off?
> If I were you, I'd try to create a small separate project with
> has_cuda_gpu.c and check whether it compiles. If it doesn't, try the
> cmake mailing list.
> Simon
>
> On Thu, Feb 12, 2015 at 6:24 PM, Howard <lomahu at gmail.com> wrote:
> > Thanks all for your responses to my question. I did not initially set
> > CUDA_HAVE_GPU to ON. Now I turned it on, I got errors when doing make:
> >
> >
> > [ 24%] Building NVCC (Device) object
> >
> code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaFDKBackProjectionImageFilter.cu.o
> > nvcc fatal   : Option '--cubin (-cubin)' is not allowed when compiling
> for
> > multiple GPU code instances
> > CMake Error at
> > /hpc/packages/minerva-common/cmake/
> 2.8.12.2/share/cmake-2.8/Modules/FindCUDA/parse_cubin.cmake:38
> > (file):
> >   file Internal CMake error when trying to open file:
> >
> >
> /sc/orga/work/howard02/usr/local/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaFDKBackProjectionImageFilter.cu.o.cubin.txt
> >   for reading.
> >
> >
> > [ 25%] Building NVCC (Device) object
> >
> code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaFFTRampImageFilter.cu.o
> > nvcc fatal   : Option '--cubin (-cubin)' is not allowed when compiling
> for
> > multiple GPU code instances
> > CMake Error at
> > /hpc/packages/minerva-common/cmake/
> 2.8.12.2/share/cmake-2.8/Modules/FindCUDA/parse_cubin.cmake:38
> > (file):
> >   file Internal CMake error when trying to open file:
> >
> >
> /sc/orga/work/howard02/usr/local/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaFFTRampImageFilter.cu.o.cubin.txt
> >   for reading.
> >
> > As I said in my original post, we have CUDA installed on the system
> (cluster
> > system). We have three version: 4.2.9, 5.5.22, and 6.0.37. The cards are
> > NVIDIA M2090 256GB memory and NVIDIA K20Xm of 256GB as well. I assume the
> > cards would work well although I haven't confirmed that.
> >
> > -howard
> >
> > On Thu, Feb 12, 2015 at 11:27 AM, Simon Rit <
> simon.rit at creatis.insa-lyon.fr>
> > wrote:
> >>
> >> Actually no, librtkcuda is compiled if the cuda library is available
> >> but the applications are compiled if the cuda library AND a cuda
> >> compatible device are available... That's probably why you observe
> >> this.
> >> Simon
> >>
> >> On Thu, Feb 12, 2015 at 5:23 PM, Julien Jomier
> >> <julien.jomier at kitware.com> wrote:
> >> > To follow up, what do you mean by "no cuda applications were
> generated"?
> >> > If
> >> > you have the libraries compiled that means CMake found a working CUDA
> >> > compatible device.
> >> >
> >> > -Julien
> >> >
> >> >
> >> > On 12/02/2015 17:16, Simon Rit wrote:
> >> >>
> >> >> Hi,
> >> >> Cmake automatically checks if you have a cuda compatible GPU. If it
> >> >> cannot run a simple test, CUDA_HAVE_GPU is OFF and it won't compile
> >> >> applications. So there must be an issue with your graphic card. Check
> >> >> if you can compile and run has_cuda_gpu.c.
> >> >> Simon
> >> >>
> >> >> On Thu, Feb 12, 2015 at 4:04 PM, Howard <lomahu at gmail.com> wrote:
> >> >>>
> >> >>> HI,
> >> >>>
> >> >>> I encountered a problem when building CUDA applications. CUDA 5.5
> was
> >> >>> installed on our system. I set the following in ccmake
> >> >>>
> >> >>>   CUDA_64_BIT_DEVICE_CODE          ON
> >> >>>   CUDA_ATTACH_VS_BUILD_RULE_TO_C   ON
> >> >>> RTK_USE_CUDA                     ON
> >> >>>
> >> >>> I could build but no cuda applications were generated. In the bin
> >> >>> folder
> >> >>> I
> >> >>> saw libITKCudaCommon.a and librtkcuda.a.
> >> >>>
> >> >>> What did I miss? Anybody could shed light on this? Thanks,
> >> >>>
> >> >>> -howard
> >> >>>
> >> >>> _______________________________________________
> >> >>> Rtk-users mailing list
> >> >>> Rtk-users at public.kitware.com
> >> >>> http://public.kitware.com/mailman/listinfo/rtk-users
> >> >>>
> >> >> _______________________________________________
> >> >> Rtk-users mailing list
> >> >> Rtk-users at public.kitware.com
> >> >> http://public.kitware.com/mailman/listinfo/rtk-users
> >> >>
> >> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/rtk-users/attachments/20150212/87000df1/attachment-0009.html>


More information about the Rtk-users mailing list