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

CarpetX: avoid features not supported by nvhpc's compiler #331

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rhaas80
Copy link
Member

@rhaas80 rhaas80 commented Jan 16, 2025

This avoids two features not supported by nvhpc version nvc++ 24.3 ("nvc++ 24.3-0 linuxarm64 target on aarch64 Linux -tp neoverse-v2"):

  • does not support custom OpenMP reductions
  • RANK() is not a F90 function but a GNU extension

The former is the more annoying fix since I added an #ifdef. If one consider the possible loss in speed due to using a #pragma omp critical instead of (possibly) are more optimal implementation via #pragma reduction(...) negligible then one can remove the #ifdef.

@rhaas80 rhaas80 requested review from lwJi and eschnett January 16, 2025 22:39
@lwJi
Copy link
Contributor

lwJi commented Jan 16, 2025

I confirm the this change make CarpetX compile on vista with nvc compilers

CarpetX/src/reduction.cxx Outdated Show resolved Hide resolved
Copy link
Collaborator

@eschnett eschnett left a comment

Choose a reason for hiding this comment

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

I added comments requesting changes.

@rhaas80
Copy link
Member Author

rhaas80 commented Jan 17, 2025

Alright, I updated the C++ stuff with auto &foo = bar and ran through clang-format-19 which (predictably) indented lots of code :-(

@rhaas80 rhaas80 requested a review from eschnett January 17, 2025 01:15
@rhaas80
Copy link
Member Author

rhaas80 commented Jan 17, 2025

@lwJi please click on "approve" if you are happy with the proposed change.

@rhaas80 rhaas80 self-assigned this Jan 17, 2025
@lwJi
Copy link
Contributor

lwJi commented Jan 17, 2025

@lwJi please click on "approve" if you are happy with the proposed change.

I can't find a "approve" button on my side

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.

3 participants