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

guard against gnu extension #137

Merged
merged 1 commit into from
Sep 15, 2024
Merged

Conversation

JorgeG94
Copy link
Contributor

#warning is a GNU extension and this fails to compile with NVHPC, I added a little guard :)

Copy link
Owner

@wavefunction91 wavefunction91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks - however, I've not ever had a problem with NVHPC, strange that this is a problem now. Actually, I've also never had a problem LLVM compilers in general (it's in the CI pipeline...).

Can you share versions / environment, etc?

Also - if you're seeing this warning, you're likely compiling without vectorization. This should be avoided, as the host part of the GPU code path is sensitive to this as well. In general, if you're compiling in Release, you should also append

-DCMAKE_CXX_FLAGS="-march=native"

we've gone back and forth about adding this by default (ala Psi4's build harness), but discovered a few edge cases where that might not be optimal

@wavefunction91 wavefunction91 merged commit dc5dbce into wavefunction91:master Sep 15, 2024
12 checks passed
@JorgeG94
Copy link
Contributor Author

lgtm thanks - however, I've not ever had a problem with NVHPC, strange that this is a problem now. Actually, I've also never had a problem LLVM compilers in general (it's in the CI pipeline...).

Can you share versions / environment, etc?

Also - if you're seeing this warning, you're likely compiling without vectorization. This should be avoided, as the host part of the GPU code path is sensitive to this as well. In general, if you're compiling in Release, you should also append

-DCMAKE_CXX_FLAGS="-march=native"

we've gone back and forth about adding this by default (ala Psi4's build harness), but discovered a few edge cases where that might not be optimal

Hi! this was with nvhpc 24.7 on a grace hopper system. I've had weird experiences with nvhpc complaining about code when other compilers do not. I tried adding march=native to my compilation and it still found the #warning (when I reverted my small change). I just build with : cmake -DCMAKE_CXX_FLAGS="-march=native" ../

@JorgeG94 JorgeG94 changed the title guard against gnu exetension guard against gnu extension Sep 15, 2024
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