View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013084CMakeCMakepublic2012-03-31 07:252013-11-12 08:53
ReporterVladislav 
Assigned ToJames Bigler 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSOS Version
Product VersionCMake 2.8.7 
Target VersionFixed in VersionCMake 2.8.11 
Summary0013084: FindCUDA is adding libcuda.so, but this is part of driver and not CUDA Runtime.
DescriptionFindCUDA shan't add libcuda.so library by default as it adds dependence on the NVIDIA driver. It leads to impossibility of creation of one executable file which can be launched regardless of NVIDIA GPU existence.

For example, it is watched in heterogeneous computing clusters when only a part of nodes GPU are equipped.

See thread on NVIDIA forum: http://forums.nvidia.com/index.php?showtopic=190729 [^]

To fix this issue need remove next code from FindCUDA.cmake:

> # Add cuda library to the link line only if it is found.
> if (CUDA_CUDA_LIBRARY)
> set(CUDA_LIBRARIES ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
> endif(CUDA_CUDA_LIBRARY)
TagsNo tags attached.
Attached Files

 Relationships
related to 0014559closedJames Bigler 0013084 fix has no backwards compatibility 

  Notes
(0029061)
James Bigler (developer)
2012-04-02 17:55

Yeah, when I wrote FindCUDA I don't think I realized that cudart didn't actually depend on the driver library (and perhaps it didn't at first - this module code has existed since before the first CUDA capable hard ware existed).

Now, I have to try and figure out how to fix this that won't break existing applications. The documentation says that CUDA_LIBRARIES are for the run time libraries, but what if users were using both the CUDA driver library and the CUDA run time libraries and relied on the exiting behavior. Would the existing behavior be considered a bug or a "feature" I would need to make sure kept working?

I'm not suggesting this should never be fixed, because it's bugged me for a while once I realized that the cuda run time stopped linking against the driver library.

You can work around this by setting CUDA_LIBRARIES to ${CUDA_CUDART_LIBRARY}.

set(CUDA_LIBRARIES "${CUDA_CUDART_LIBRARIES}")
cuda_add_library()
(0029071)
Vladislav (reporter)
2012-04-04 01:04

It is possible to add a variable which will define to use old and new behavior. By default to use old behavior.
(0032625)
James Bigler (developer)
2013-03-14 01:54

This should be fixed in 2.8.11. See checkin 3497bc2.
(0034004)
Robert Maynard (manager)
2013-10-07 10:04

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-03-31 07:25 Vladislav New Issue
2012-04-02 17:55 James Bigler Note Added: 0029061
2012-04-03 13:41 James Bigler Assigned To => James Bigler
2012-04-03 13:41 James Bigler Status new => assigned
2012-04-04 01:04 Vladislav Note Added: 0029071
2013-03-14 01:54 James Bigler Note Added: 0032625
2013-03-14 01:54 James Bigler Status assigned => resolved
2013-03-14 01:54 James Bigler Fixed in Version => CMake 2.8.11
2013-03-14 01:54 James Bigler Resolution open => fixed
2013-10-07 10:04 Robert Maynard Note Added: 0034004
2013-10-07 10:04 Robert Maynard Status resolved => closed
2013-11-12 08:53 Brad King Relationship added related to 0014559


Copyright © 2000 - 2018 MantisBT Team