Closed Crolan closed 5 years ago
Is it possible that only added header locations to CFLAGS, but no library locations to LDFLAGS? Seems like the linker cannot find libcuda.so.
Can you post the changes you made?
Is it possible that only added header locations to CFLAGS, but no library locations to LDFLAGS? Seems like the linker cannot find libcuda.so.
Can you post the changes you made?
Hi barnex,
I've changed the following bold parts:
package curand
// This file provides CGO flags to find CUDA libraries and headers.
//#cgo LDFLAGS:-lcurand
//
////default location:
//#cgo LDFLAGS:-L/opt/apps/cuda/9.2/lib64 -L/opt/apps/cuda/9.2/lib
//#cgo CFLAGS: -I/opt/apps/cuda/9.2/include
//
////default location if not properly symlinked:
...
and
package cu
// This file provides CGO flags to find CUDA libraries and headers.
//#cgo LDFLAGS:-lcuda
//
////default location:
//#cgo LDFLAGS:-L/opt/apps/cuda/9.2/lib64 -L/opt/apps/cuda/9.2/lib
//#cgo CFLAGS: -I/opt/apps/cuda/9.2/include/
//
////default location if not properly symlinked:
...
Thank you and let me know if you need any further information.
That looks reasonable. Do any of the directories under LDPATH contain libcuda.so?
On Mon 3 Dec 2018, 23:55 Crolan, notifications@github.com wrote:
Is it possible that only added header locations to CFLAGS, but no library locations to LDFLAGS? Seems like the linker cannot find libcuda.so.
Can you post the changes you made?
Hi barnex,
I've changed the following bold parts:
package curand
// This file provides CGO flags to find CUDA libraries and headers.
//#cgo LDFLAGS:-lcurand // ////default location:
//#cgo LDFLAGS:-L/opt/apps/cuda/9.2/lib64 -L/opt/apps/cuda/9.2/lib //#cgo CFLAGS: -I/opt/apps/cuda/9.2/include
// ////default location if not properly symlinked: ...
and
package cu
// This file provides CGO flags to find CUDA libraries and headers.
//#cgo LDFLAGS:-lcuda // ////default location:
//#cgo LDFLAGS:-L/opt/apps/cuda/9.2/lib64 -L/opt/apps/cuda/9.2/lib //#cgo CFLAGS: -I/opt/apps/cuda/9.2/include/
// ////default location if not properly symlinked: ...
Thank you and let me know if you need any further information.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/mumax/3/issues/212#issuecomment-443916000, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ3AnzG7w-CAuP4A4ejRVLh7COQdHhDks5u1bndgaJpZM4Y9Qk- .
That looks reasonable. Do any of the directories under LDPATH contain libcuda.so? … On Mon 3 Dec 2018, 23:55 Crolan, @.**> wrote: Is it possible that only added header locations to CFLAGS, but no library locations to LDFLAGS? Seems like the linker cannot find libcuda.so. Can you post the changes you made? Hi barnex, I've changed the following bold parts: package curand // This file provides CGO flags to find CUDA libraries and headers. //#cgo LDFLAGS:-lcurand // ////default location: //#cgo LDFLAGS:-L/opt/apps/cuda/9.2/lib64 -L/opt/apps/cuda/9.2/lib //#cgo CFLAGS: -I/opt/apps/cuda/9.2/include // ////default location if not properly symlinked: ... and package cu // This file provides CGO flags to find CUDA libraries and headers. //#cgo LDFLAGS:-lcuda // ////default location: //#cgo LDFLAGS:-L/opt/apps/cuda/9.2/lib64 -L/opt/apps/cuda/9.2/lib //#cgo CFLAGS: -I/opt/apps/cuda/9.2/include/* // ////default location if not properly symlinked: ... Thank you and let me know if you need any further information. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#212 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ3AnzG7w-CAuP4A4ejRVLh7COQdHhDks5u1bndgaJpZM4Y9Qk- .
I cannot find the libcuda.so file right at the LDPATH directory which is /opt/apps/cuda/9.2/lib64
, but there is a sub-folder /opt/apps/cuda/9.2/lib64/stubs
that do have the libcuda.so file. Should that work? or I need to make changes?
Thanks,
It seems like that this issue is due to a problem of the nvidia driver, and solved through reinstall and redirect. Thanks for all the helpful suggestions.
Hi, I'm installing mumax on a server which CUDA is not installed at the default location. If you have any direct solutions, please skip all the following redundancy.
I tried add the CUDA path to both /cuda/curand/cgoflags.go and /cuda/cu/cgoflags.go, and I got the following message after "go install":
To deal with the curand.h issue, I copied the curand.h file from the cuda folder to /cuda/curand, the curand.h error disappeared, but the other messages left as:
I got no clue since here. What other steps should I have before I can finish the installation?
This problem seems related to another open issue: https://github.com/mumax/3/issues/180#issue-329837331
Thanks in advance.