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

cuda Scons fix: remove unnecessary -lcuda which prevents compiling on… #272

Merged
merged 1 commit into from
May 17, 2021

Conversation

lijun99
Copy link
Contributor

@lijun99 lijun99 commented Apr 15, 2021

… cluster head node without cuda drivers

@rtburns-jpl
Copy link
Member

Could you explain this a little more? Is it that the code doesn't need to link to the driver directly, and only uses it via cudart, so libcuda is not needed at all? I'm surprised that the node has cudart/cufft/etc but not libcuda, but if this fixes your issue then I think it looks fine to merge.

@lijun99
Copy link
Contributor Author

lijun99 commented May 11, 2021

Yes, the code doesn't need to be linked with libcuda, which comes with the nvidia driver, not CUDA toolkit.

On a cluster, the head node typically doesn't have nvidia gpus and therefore they usually don't install the driver on head node, only the toolkit. When the program is compiled on head node, if it looks for libcuda, an error occurs.

This only happens to the current scons script. CMake compiles successfully as it has the correct configuration by not including libcuda, e.g., using the (static) cudart only -lcudadevrt -lcudart_static.

@rtburns-jpl
Copy link
Member

Okay, thanks! That makes perfect sense. Changes LGTM so I'll plan to merge this as-is.

@rtburns-jpl rtburns-jpl merged commit 673dc04 into isce-framework:main May 17, 2021
@lijun99 lijun99 deleted the cuda_fix branch June 24, 2021 07:03
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

Successfully merging this pull request may close these issues.

2 participants