<div dir="ltr">Thank you.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 1, 2013 at 11:09 AM, Marcel Loose <span dir="ltr">&lt;<a href="mailto:loose@astron.nl" target="_blank">loose@astron.nl</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Robert,<br>
<br>
I created an issue for this in Mantis: <a href="http://public.kitware.com/Bug/view.php?id=14122" target="_blank">http://public.kitware.com/Bug/<u></u>view.php?id=14122</a><br>
<br>
Best regards,<br>
Marcel Loose.<div class="HOEnZb"><div class="h5"><br>
<br>
On 01/05/13 15:09, Robert Maynard wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It looks like you used the ubuntu cuda package which installs the cuda<br>
library to a directory that FindCUDA wasn&#39;t expecting. I think we can<br>
extend FindCUDA to also use x86_64-linux-gnu as a valid directory to<br>
search for libcuda.<br>
<br>
can you submit a bug on mantis for this, so it doesn&#39;t get forgotten?<br>
<br>
On Tue, Apr 30, 2013 at 4:37 PM, Marcel Loose &lt;<a href="mailto:marcel.loose@zonnet.nl" target="_blank">marcel.loose@zonnet.nl</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Here are the results on my Ubuntu 12.10 system:<br>
<br>
$ cmake --debug-output ..<br>
Running with debug output on.<br>
-- The C compiler identification is GNU 4.7.2<br>
    Called from: [2]<br>
/usr/share/cmake-2.8/Modules/<u></u>CMakeDetermineCCompiler.cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
-- The CXX compiler identification is GNU 4.7.2<br>
    Called from: [2]<br>
/usr/share/cmake-2.8/Modules/<u></u>CMakeDetermineCXXCompiler.<u></u>cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
<br>
-- Check for working C compiler: /usr/bin/gcc<br>
    Called from: [2] /usr/share/cmake-2.8/Modules/<u></u>CMakeTestCCompiler.cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
<br>
-- Check for working C compiler: /usr/bin/gcc -- works<br>
    Called from: [2] /usr/share/cmake-2.8/Modules/<u></u>CMakeTestCCompiler.cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
<br>
-- Detecting C compiler ABI info<br>
    Called from: [2] /usr/share/cmake-2.8/Modules/<u></u>CMakeTestCCompiler.cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
<br>
-- Detecting C compiler ABI info - done<br>
    Called from: [2] /usr/share/cmake-2.8/Modules/<u></u>CMakeTestCCompiler.cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
<br>
-- Check for working CXX compiler: /usr/bin/c++<br>
    Called from: [2] /usr/share/cmake-2.8/Modules/<u></u>CMakeTestCXXCompiler.cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
<br>
-- Check for working CXX compiler: /usr/bin/c++ -- works<br>
    Called from: [2] /usr/share/cmake-2.8/Modules/<u></u>CMakeTestCXXCompiler.cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
<br>
-- Detecting CXX compiler ABI info<br>
    Called from: [2] /usr/share/cmake-2.8/Modules/<u></u>CMakeTestCXXCompiler.cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
<br>
-- Detecting CXX compiler ABI info - done<br>
    Called from: [2] /usr/share/cmake-2.8/Modules/<u></u>CMakeTestCXXCompiler.cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
-- Found CUDA: /usr (found version &quot;4.2&quot;)<br>
    Called from: [2] /usr/share/cmake-2.8/Modules/<u></u>FindCUDA.cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
-- CUDA_LIBRARIES = /usr/lib/x86_64-linux-gnu/<u></u>libcudart.so<br>
    Called from: [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
-- Configuring done<br>
-- Generating /home/marcel/temp/cmake/cuda/<u></u>build<br>
-- Generating done<br>
-- Build files have been written to: /home/marcel/temp/cmake/cuda/<u></u>build<br>
<br>
And here&#39;s the output when setting CUDA_LIB_PATH:<br>
<br>
$ CUDA_LIB_PATH=/usr/lib/nvidia-<u></u>current cmake --debug-output ..<br>
Running with debug output on.<br>
-- The C compiler identification is GNU 4.7.2<br>
    Called from: [2]<br>
/usr/share/cmake-2.8/Modules/<u></u>CMakeDetermineCCompiler.cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
-- The CXX compiler identification is GNU 4.7.2<br>
    Called from: [2]<br>
/usr/share/cmake-2.8/Modules/<u></u>CMakeDetermineCXXCompiler.<u></u>cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
<br>
-- Check for working C compiler: /usr/bin/gcc<br>
    Called from: [2] /usr/share/cmake-2.8/Modules/<u></u>CMakeTestCCompiler.cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
<br>
-- Check for working C compiler: /usr/bin/gcc -- works<br>
    Called from: [2] /usr/share/cmake-2.8/Modules/<u></u>CMakeTestCCompiler.cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
<br>
-- Detecting C compiler ABI info<br>
    Called from: [2] /usr/share/cmake-2.8/Modules/<u></u>CMakeTestCCompiler.cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
<br>
-- Detecting C compiler ABI info - done<br>
    Called from: [2] /usr/share/cmake-2.8/Modules/<u></u>CMakeTestCCompiler.cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
<br>
-- Check for working CXX compiler: /usr/bin/c++<br>
    Called from: [2] /usr/share/cmake-2.8/Modules/<u></u>CMakeTestCXXCompiler.cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
<br>
-- Check for working CXX compiler: /usr/bin/c++ -- works<br>
    Called from: [2] /usr/share/cmake-2.8/Modules/<u></u>CMakeTestCXXCompiler.cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
<br>
-- Detecting CXX compiler ABI info<br>
    Called from: [2] /usr/share/cmake-2.8/Modules/<u></u>CMakeTestCXXCompiler.cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
<br>
-- Detecting CXX compiler ABI info - done<br>
    Called from: [2] /usr/share/cmake-2.8/Modules/<u></u>CMakeTestCXXCompiler.cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
-- Found CUDA: /usr (found version &quot;4.2&quot;)<br>
    Called from: [2] /usr/share/cmake-2.8/Modules/<u></u>FindCUDA.cmake<br>
                 [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
-- CUDA_LIBRARIES =<br>
/usr/lib/x86_64-linux-gnu/<u></u>libcudart.so;/usr/lib/nvidia-<u></u>current/libcuda.so<br>
    Called from: [1] /home/marcel/temp/cmake/cuda/<u></u>CMakeLists.txt<br>
-- Configuring done<br>
-- Generating /home/marcel/temp/cmake/cuda/<u></u>build<br>
-- Generating done<br>
-- Build files have been written to: /home/marcel/temp/cmake/cuda/<u></u>build<br>
<br>
Best regards,<br>
Marcel Loose.<br>
<br>
Op 29-04-13 18:04, Robert Maynard schreef:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have had no problem with Ubuntu 12.10 and Cuda 5; findCuda is able<br>
to find cuda in /usr/lib.  Can you run CMake --debug-output output<br>
enable and see where findCuda is searching?<br>
<br>
On Mon, Apr 29, 2013 at 11:52 AM, Marcel Loose &lt;<a href="mailto:loose@astron.nl" target="_blank">loose@astron.nl</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Robert,<br>
<br>
I agree that on the CentOS machine the install paths are non-standard.<br>
For<br>
the Ubuntu system, on the other hand, I have to disagree with that<br>
statement. It is a *standard* Ubuntu 12.10 system, so IMHO FindCUDA.cmake<br>
should be able to locate libcuda.so on that system.<br>
<br>
Regards,<br>
Marcel Loose.<br>
<br>
<br>
On 29/04/13 16:54, Robert Maynard wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You have a nonstandard install path that will require you to use<br>
CUDA_PATH / CUDA_BIN_PATH and CUDA_LIB_PATH.<br>
<br>
On Mon, Apr 29, 2013 at 10:10 AM, Marcel Loose &lt;<a href="mailto:loose@astron.nl" target="_blank">loose@astron.nl</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
It fails to find CUDA 5.0. See below.<br>
<br>
$ env | grep CUDA<br>
CUDA_PATH=/cm/shared/apps/<u></u>cuda50/toolkit/5.0.35<br>
CUDA_INC_PATH=/cm/shared/apps/<u></u>cuda50/toolkit/5.0.35<br>
CUDA_SDK=/cm/shared/apps/<u></u>cuda50/sdk/5.0.35<br>
CUDA_CACHE_DISABLE=1<br>
CUDA_INSTALL_PATH=/cm/shared/<u></u>apps/cuda50/toolkit/5.0.35<br>
CUDA_ROOT=/cm/local/apps/<u></u>cuda50/libs/304.54<br>
<br>
$ cat ../CMakeLists.txt<br>
cmake_minimum_required(VERSION 2.8)<br>
project(CheckCUDALibs)<br>
find_package(CUDA)<br>
message(STATUS &quot;CUDA_LIBRARIES = ${CUDA_LIBRARIES}&quot;)<br>
<br>
$ cmake ..<br>
-- The C compiler identification is GNU<br>
-- The CXX compiler identification is GNU<br>
-- Check for working C compiler: /usr/bin/gcc<br>
-- Check for working C compiler: /usr/bin/gcc -- works<br>
-- Detecting C compiler ABI info<br>
-- Detecting C compiler ABI info - done<br>
-- Check for working CXX compiler: /usr/bin/c++<br>
-- Check for working CXX compiler: /usr/bin/c++ -- works<br>
-- Detecting CXX compiler ABI info<br>
-- Detecting CXX compiler ABI info - done<br>
-- Found CUDA: /cm/shared/apps/cuda50/<u></u>toolkit/5.0.35 (found version<br>
&quot;5.0&quot;)<br>
-- CUDA_LIBRARIES =<br>
/cm/shared/apps/cuda50/<u></u>toolkit/5.0.35/lib64/<u></u>libcudart.so<br>
-- Configuring done<br>
-- Generating done<br>
-- Build files have been written to: /home/loose/temp/cmake/cuda/<u></u>build<br>
<br>
$ CUDA_LIB_PATH=$CUDA_ROOT/lib cmake ..<br>
-- CUDA_LIBRARIES =<br>
<br>
<br>
/cm/shared/apps/cuda50/<u></u>toolkit/5.0.35/lib64/<u></u>libcudart.so;/cm/local/apps/<u></u>cuda50/libs/304.54/lib64/<u></u>libcuda.so<br>
-- Configuring done<br>
-- Generating done<br>
-- Build files have been written to: /home/loose/temp/cmake/cuda/<u></u>build<br>
<br>
Only when explicitly setting CUDA_LIB_PATH, libcuda.so is found.<br>
<br>
BTW: On Ubuntu I also need to set CUDA_LIB_PATH, but then to<br>
/usr/lib/nvidia-current.<br>
<br>
Regards,<br>
Marcel Loose.<br>
<br>
<br>
<br>
On 29/04/13 15:36, Robert Maynard wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Can you provide what Cuda version FindCuda is failing to find, and<br>
where Cluster Manager is installing the CUDA toolkit and library?<br>
<br>
On Mon, Apr 29, 2013 at 7:38 AM, Marcel Loose &lt;<a href="mailto:loose@astron.nl" target="_blank">loose@astron.nl</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
I noticed that FindCUDA.cmake fails to locate libcuda.so on at least<br>
two<br>
different platforms: Ubuntu 12.10 and CentOS 6.3 using Cluster<br>
Manager<br>
v5.2.<br>
I can persuade FindCUDA.cmake to search for this library by<br>
explicitly<br>
setting the environment variable CUDA_LIB_PATH, and then it finds it.<br>
However, IMHO, using this trick should only be necessary as a last<br>
resort.<br>
Is this a bug?<br>
<br>
Best regards,<br>
Marcel Loose.<br>
<br>
<br>
<br>
<br>
<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at:<br>
<a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/<u></u>CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/<u></u>listinfo/cmake</a><br>
</blockquote></blockquote>
<br>
</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>
<br>
</div></div></blockquote></div><br></div>