You have a nonstandard install path that will require you to use
CUDA_PATH / CUDA_BIN_PATH and CUDA_LIB_PATH.

On Mon, Apr 29, 2013 at 10:10 AM, Marcel Loose <lo...@astron.nl> wrote:
> Hi,
>
> It fails to find CUDA 5.0. See below.
>
> $ env | grep CUDA
> CUDA_PATH=/cm/shared/apps/cuda50/toolkit/5.0.35
> CUDA_INC_PATH=/cm/shared/apps/cuda50/toolkit/5.0.35
> CUDA_SDK=/cm/shared/apps/cuda50/sdk/5.0.35
> CUDA_CACHE_DISABLE=1
> CUDA_INSTALL_PATH=/cm/shared/apps/cuda50/toolkit/5.0.35
> CUDA_ROOT=/cm/local/apps/cuda50/libs/304.54
>
> $ cat ../CMakeLists.txt
> cmake_minimum_required(VERSION 2.8)
> project(CheckCUDALibs)
> find_package(CUDA)
> message(STATUS "CUDA_LIBRARIES = ${CUDA_LIBRARIES}")
>
> $ cmake ..
> -- The C compiler identification is GNU
> -- The CXX compiler identification is GNU
> -- Check for working C compiler: /usr/bin/gcc
> -- Check for working C compiler: /usr/bin/gcc -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working CXX compiler: /usr/bin/c++
> -- Check for working CXX compiler: /usr/bin/c++ -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Found CUDA: /cm/shared/apps/cuda50/toolkit/5.0.35 (found version "5.0")
> -- CUDA_LIBRARIES = /cm/shared/apps/cuda50/toolkit/5.0.35/lib64/libcudart.so
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /home/loose/temp/cmake/cuda/build
>
> $ CUDA_LIB_PATH=$CUDA_ROOT/lib cmake ..
> -- CUDA_LIBRARIES =
> /cm/shared/apps/cuda50/toolkit/5.0.35/lib64/libcudart.so;/cm/local/apps/cuda50/libs/304.54/lib64/libcuda.so
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /home/loose/temp/cmake/cuda/build
>
> Only when explicitly setting CUDA_LIB_PATH, libcuda.so is found.
>
> BTW: On Ubuntu I also need to set CUDA_LIB_PATH, but then to
> /usr/lib/nvidia-current.
>
> Regards,
> Marcel Loose.
>
>
>
> On 29/04/13 15:36, Robert Maynard wrote:
>>
>> Can you provide what Cuda version FindCuda is failing to find, and
>> where Cluster Manager is installing the CUDA toolkit and library?
>>
>> On Mon, Apr 29, 2013 at 7:38 AM, Marcel Loose <lo...@astron.nl> wrote:
>>>
>>> Hi all,
>>>
>>> I noticed that FindCUDA.cmake fails to locate libcuda.so on at least two
>>> different platforms: Ubuntu 12.10 and CentOS 6.3 using Cluster Manager
>>> v5.2.
>>> I can persuade FindCUDA.cmake to search for this library by explicitly
>>> setting the environment variable CUDA_LIB_PATH, and then it finds it.
>>> However, IMHO, using this trick should only be necessary as a last
>>> resort.
>>> Is this a bug?
>>>
>>> Best regards,
>>> Marcel Loose.
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the CMake FAQ at:
>>> http://www.cmake.org/Wiki/CMake_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.cmake.org/mailman/listinfo/cmake
>
>
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to