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

Hotfix/ccomplex #1485

Merged
merged 6 commits into from
Aug 20, 2024
Merged

Hotfix/ccomplex #1485

merged 6 commits into from
Aug 20, 2024

Conversation

maddyscientist
Copy link
Member

Fixes a bug observed with some compilers (nvc++, rocm clang) where the compiler fails to compile if:

  • The source code includes the complex.h / complex header
  • A template class name is given as I

I've also fixed a warning with nvc++ and reduced the argument size for the dilution kernel.

@maddyscientist maddyscientist requested review from a team as code owners August 13, 2024 20:39
Copy link
Member

@hummingtree hummingtree left a comment

Choose a reason for hiding this comment

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

The code change looks all good to me but just curious why would the typename I matter here?

@stevengottlieb
Copy link
Member

stevengottlieb commented Aug 14, 2024 via email

@maddyscientist
Copy link
Member Author

Thanks @stevengottlieb for testing this. This is indeed an Arm issue, with NEON being one of the vector instruction sets equivalent to SEE on Intel. Moreover, I see the issue is with compiling the Eigen headers. I'll investigate and report back.

@stevengottlieb
Copy link
Member

stevengottlieb commented Aug 14, 2024 via email

@maddyscientist
Copy link
Member Author

@stevengottlieb this is a bug in Eigen it seems. The patch to apply is to replace

#if EIGEN_COMP_CLANG || EIGEN_COMP_CASTXML

with

#if EIGEN_COMP_CLANG || EIGEN_COMP_CASTXML || __NVCOMPILER_LLVM__

in $PATH_TO_QUDA_BUILD_DIR/_deps/eigen-src/Eigen/src/Core/arch/NEON/Complex.h. Can you verify this fixes the issue for you?

I'm trying to work out the best way to fix this issue in the short term (until Eigen is fixed at source).

@stevengottlieb
Copy link
Member

stevengottlieb commented Aug 14, 2024 via email

@maddyscientist maddyscientist requested a review from a team as a code owner August 18, 2024 17:23
@maddyscientist
Copy link
Member Author

Thanks for confirming the fix works @stevengottlieb. I've updated the build system to now apply the patch automatically if using the NVHPC compiler, so this should now work out of the box for you.

@maddyscientist
Copy link
Member Author

cscs-ci run

1 similar comment
@maddyscientist
Copy link
Member Author

cscs-ci run

@stevengottlieb
Copy link
Member

stevengottlieb commented Aug 19, 2024 via email

@maddyscientist
Copy link
Member Author

cscs-ci run

1 similar comment
@maddyscientist
Copy link
Member Author

cscs-ci run

@maddyscientist maddyscientist merged commit 6964f90 into develop Aug 20, 2024
14 checks passed
@maddyscientist maddyscientist deleted the hotfix/ccomplex branch August 20, 2024 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants