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

Default CUDA host compiler the same as CXX compiler #3957

Merged
merged 3 commits into from
Apr 24, 2022

Conversation

ye-luo
Copy link
Contributor

@ye-luo ye-luo commented Apr 20, 2022

Proposed changes

I noticed an issue with upstream clang which changes its default to PIE enabled.
Our nvcc setting default using gcc as the host compiler, this caused issue at linking on SLES 15 machines.
gcc doesn't have PIE enabled by default. This choice is made by the linux distro. Ubuntu has PIE enabled by default.
One fix is to pass -fPIE via CMAKE_CUDA_FLAGS but I dislike this solution.
Instead, I choose to set CMAKE_CXX_COMPILER as the default value of CMAKE_CUDA_HOST_COMPILER if user doesn't specify one.

This change needs additional changes.

  1. -allow-unsupported-compiler by default. It is likely that we use newer compiler than nvcc support claimed.
  2. option used by 1) requires CUDA 11. Right now all the production machine has CUDA 11. So I raised the bar.

What type(s) of changes does this code introduce?

  • Build related changes

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

epyc-server/bora/jlse/perlmutter

Checklist

  • Yes. This PR is up to date with current the current state of 'develop'

@ye-luo
Copy link
Contributor Author

ye-luo commented Apr 20, 2022

Test this please

@ye-luo
Copy link
Contributor Author

ye-luo commented Apr 21, 2022

Test this please

1) Require CUDA 11
2) -allow-unsupported-compiler by default.
@ye-luo
Copy link
Contributor Author

ye-luo commented Apr 22, 2022

Test this please

@prckent prckent self-requested a review April 24, 2022 16:13
@prckent
Copy link
Contributor

prckent commented Apr 24, 2022

Test this please

@prckent prckent enabled auto-merge April 24, 2022 16:14
@prckent prckent merged commit 40cb3ca into QMCPACK:develop Apr 24, 2022
@ye-luo ye-luo deleted the update-cudatoolkit branch April 24, 2022 22:57
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.

None yet

2 participants