<div dir="ltr"><div>When I did the following:</div><div> </div><div>CUDA_HAVE_GPU  ON</div><div>CUDA_BUILD_CUBIN OFF ( this removed the errors I reported in last posting)</div><div>CUDA_HOST_COMPILATION_CPP ON (following Yang K Park's screenshot)</div><div> </div><div>building was successful. I could run</div><div> </div><div>rtkfdk --hardware cuda -r ... ((Is this the correct way of running fdk using cuda?)</div><div> </div><div>with successful reconstruction. It's done in < 15s, wow!</div><div> </div><div>A separate question: how to specify cuda for rtksart, </div><font><div>rtkadmmwavelets, rtkadmmtotalvariations etc?</div><div> </div><div>Thanks,</div><div>-howard</div><font><div></div><p> </p><p> </p></font><p> </p></font><p> </p><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 12, 2015 at 12:42 PM, Simon Rit <span dir="ltr"><<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">That's more complicated. First, CUDA_HAVE_GPU is normally turned on<br>
automatically but maybe it's been turned off due to the problem you're<br>
encountering now.<br>
The problem you have is probably not specific to RTK, we don't develop<br>
FindCUDA.cmake. I quickly checked FindCUDA.cmake and there if an<br>
option CUDA_BUILD_CUBIN, maybe turn it off?<br>
If I were you, I'd try to create a small separate project with<br>
has_cuda_gpu.c and check whether it compiles. If it doesn't, try the<br>
cmake mailing list.<br>
<span class="HOEnZb"><font color="#888888">Simon<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Thu, Feb 12, 2015 at 6:24 PM, Howard <<a href="mailto:lomahu@gmail.com">lomahu@gmail.com</a>> wrote:<br>
> Thanks all for your responses to my question. I did not initially set<br>
> CUDA_HAVE_GPU to ON. Now I turned it on, I got errors when doing make:<br>
><br>
><br>
> [ 24%] Building NVCC (Device) object<br>
> code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaFDKBackProjectionImageFilter.cu.o<br>
> nvcc fatal   : Option '--cubin (-cubin)' is not allowed when compiling for<br>
> multiple GPU code instances<br>
> CMake Error at<br>
> /hpc/packages/minerva-common/cmake/<a href="http://2.8.12.2/share/cmake-2.8/Modules/FindCUDA/parse_cubin.cmake:38" target="_blank">2.8.12.2/share/cmake-2.8/Modules/FindCUDA/parse_cubin.cmake:38</a><br>
> (file):<br>
>   file Internal CMake error when trying to open file:<br>
><br>
> /sc/orga/work/howard02/usr/local/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaFDKBackProjectionImageFilter.cu.o.cubin.txt<br>
>   for reading.<br>
><br>
><br>
> [ 25%] Building NVCC (Device) object<br>
> code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaFFTRampImageFilter.cu.o<br>
> nvcc fatal   : Option '--cubin (-cubin)' is not allowed when compiling for<br>
> multiple GPU code instances<br>
> CMake Error at<br>
> /hpc/packages/minerva-common/cmake/<a href="http://2.8.12.2/share/cmake-2.8/Modules/FindCUDA/parse_cubin.cmake:38" target="_blank">2.8.12.2/share/cmake-2.8/Modules/FindCUDA/parse_cubin.cmake:38</a><br>
> (file):<br>
>   file Internal CMake error when trying to open file:<br>
><br>
> /sc/orga/work/howard02/usr/local/RTK/RTK-bin/code/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_rtkCudaFFTRampImageFilter.cu.o.cubin.txt<br>
>   for reading.<br>
><br>
> As I said in my original post, we have CUDA installed on the system (cluster<br>
> system). We have three version: 4.2.9, 5.5.22, and 6.0.37. The cards are<br>
> NVIDIA M2090 256GB memory and NVIDIA K20Xm of 256GB as well. I assume the<br>
> cards would work well although I haven't confirmed that.<br>
><br>
> -howard<br>
><br>
> On Thu, Feb 12, 2015 at 11:27 AM, Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr">simon.rit@creatis.insa-lyon.fr</a>><br>
> wrote:<br>
>><br>
>> Actually no, librtkcuda is compiled if the cuda library is available<br>
>> but the applications are compiled if the cuda library AND a cuda<br>
>> compatible device are available... That's probably why you observe<br>
>> this.<br>
>> Simon<br>
>><br>
>> On Thu, Feb 12, 2015 at 5:23 PM, Julien Jomier<br>
>> <<a href="mailto:julien.jomier@kitware.com">julien.jomier@kitware.com</a>> wrote:<br>
>> > To follow up, what do you mean by "no cuda applications were generated"?<br>
>> > If<br>
>> > you have the libraries compiled that means CMake found a working CUDA<br>
>> > compatible device.<br>
>> ><br>
>> > -Julien<br>
>> ><br>
>> ><br>
>> > On 12/02/2015 17:16, Simon Rit wrote:<br>
>> >><br>
>> >> Hi,<br>
>> >> Cmake automatically checks if you have a cuda compatible GPU. If it<br>
>> >> cannot run a simple test, CUDA_HAVE_GPU is OFF and it won't compile<br>
>> >> applications. So there must be an issue with your graphic card. Check<br>
>> >> if you can compile and run has_cuda_gpu.c.<br>
>> >> Simon<br>
>> >><br>
>> >> On Thu, Feb 12, 2015 at 4:04 PM, Howard <<a href="mailto:lomahu@gmail.com">lomahu@gmail.com</a>> wrote:<br>
>> >>><br>
>> >>> HI,<br>
>> >>><br>
>> >>> I encountered a problem when building CUDA applications. CUDA 5.5 was<br>
>> >>> installed on our system. I set the following in ccmake<br>
>> >>><br>
>> >>>   CUDA_64_BIT_DEVICE_CODE          ON<br>
>> >>>   CUDA_ATTACH_VS_BUILD_RULE_TO_C   ON<br>
>> >>> RTK_USE_CUDA                     ON<br>
>> >>><br>
>> >>> I could build but no cuda applications were generated. In the bin<br>
>> >>> folder<br>
>> >>> I<br>
>> >>> saw libITKCudaCommon.a and librtkcuda.a.<br>
>> >>><br>
>> >>> What did I miss? Anybody could shed light on this? Thanks,<br>
>> >>><br>
>> >>> -howard<br>
>> >>><br>
>> >>> _______________________________________________<br>
>> >>> Rtk-users mailing list<br>
>> >>> <a href="mailto:Rtk-users@public.kitware.com">Rtk-users@public.kitware.com</a><br>
>> >>> <a href="http://public.kitware.com/mailman/listinfo/rtk-users" target="_blank">http://public.kitware.com/mailman/listinfo/rtk-users</a><br>
>> >>><br>
>> >> _______________________________________________<br>
>> >> Rtk-users mailing list<br>
>> >> <a href="mailto:Rtk-users@public.kitware.com">Rtk-users@public.kitware.com</a><br>
>> >> <a href="http://public.kitware.com/mailman/listinfo/rtk-users" target="_blank">http://public.kitware.com/mailman/listinfo/rtk-users</a><br>
>> >><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br></div>