Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in chroot/CMakeLists.txt with CUDA #524

Closed
KrisThielemans opened this issue Aug 4, 2017 · 4 comments
Closed

bug in chroot/CMakeLists.txt with CUDA #524

KrisThielemans opened this issue Aug 4, 2017 · 4 comments

Comments

@KrisThielemans
Copy link
Contributor

Line https://github.com/gadgetron/gadgetron/blob/master/chroot/CMakeLists.txt#L41 is problematic:

get_filename_component(CUDABLAS_LIB_DIR ${CUDA_CUBLAS_LIBRARIES} PATH)

This will fail if ${CUDA_CUBLAS_LIBRARIES} is set to more than 1 library, which apparently happens on Ubuntu 17.04. See https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind1707&L=CCP-PETMR-DEVEL&F=&S=&X=AE7343ED237D3E95F9&Y=k.thielemans%40ucl.ac.uk&P=12613

There seem to be similar lines with the same problem in this file.

@xpjiang
Copy link

xpjiang commented Aug 27, 2017

There is also an error in Line 41
get_filename_component(CUDABLAS_LIB_DIR ${CUDA_CUFFT_LIBRARIES} PATH)
when using windows 10 and vs2015.
And the CUDA_CUFFT_LIBRARIES = C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/x64/cublas.libC:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/x64/cublas_device.lib

@KrisThielemans
Copy link
Contributor Author

probably the same as #480.

@KrisThielemans
Copy link
Contributor Author

KrisThielemans commented Oct 2, 2017

what about replacing all of these lines with

foreach(_lib IN LISTS CUDA_LIBRARIES CUDA_CUFFT_LIBRARIES CUDA_CUBLAS_LIBRARIES)
  get_filename_component(_libdir ${_lib} PATH)
  set (LIBRARY_PATHS ${LIBRARY_PATHS}:${_libdir})
endforeach()
list(REMOVE_DUPLICATES LIBRARY_PATHS )

sorry, I cannot test as I don't have access to a relevant machine

@KrisThielemans
Copy link
Contributor Author

By the way, this directory should only be included on Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants