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

fix: Add back support for ppc64le #35

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

Conversation

matthewfeickert
Copy link
Contributor

@matthewfeickert matthewfeickert commented Dec 21, 2024

* ppc64 little-endian is a supported architecture both on conda-forge and used in
  HPC systems. Add back support for it by only disabling libquadmath on aarch64
  builds and by checking for the ppc64 in header files.
@matthewfeickert matthewfeickert force-pushed the fix/patch-back-ppc64le-support branch from a4c0e09 to 6e3aac0 Compare December 21, 2024 07:25
@matthewfeickert matthewfeickert marked this pull request as ready for review December 21, 2024 07:25
@matthewfeickert
Copy link
Contributor Author

@scarrazza this is ready for review. c.f. conda-forge/qcdloop-feedstock#8

@andriish as I'm amending PR #34 please take a look too.

CMakeLists.txt Outdated
Comment on lines 69 to 71
# Only enable quadmath for non-aarch64 as aarch64 supports float128 and so
# doesn't have libquadmath
IF(NOT ${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@henryiii is there a more preferred way to do this? Or is just checking for aarch64 somewhere good enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm. From conda-forge/qcdloop-feedstock#7 it seems like maybe ${CMAKE_SYSTEM_PROCESSOR} isn't what is desired when cross-compiling, as when cross-compiling for aarch64 on x86 it is attempting to link against libquadmath.

matthewfeickert added a commit to conda-forge/qcdloop-feedstock that referenced this pull request Dec 21, 2024
* updated v2.1.0
* MNT: Add patch to get ppc64le support working
   - c.f. scarrazza/qcdloop#35
   - This patch can be removed in subsequent releases.

---------

Co-authored-by: Matthew Feickert <matthew.feickert@cern.ch>
* Compare to a regex of aarch64 or arm.
@@ -17,7 +17,7 @@ namespace std {
seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
}

#if defined(__x86_64__) || defined(__i386__)
Copy link

@andriish andriish Jan 9, 2025

Choose a reason for hiding this comment

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

I would limit it here just to

__ppc64__

and

__ppc__

for the sake of consistency, see https://sourceforge.net/p/predef/wiki/Architectures/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@andriish Can you elaborate on what you mean by "consistency"? I'm not sure what you're trying to communicate and the link isn't informative. I'm sure to you it is clear, but I'm going to need you to write out your point.

@@ -66,7 +66,9 @@ configure_file(
"${PROJECT_SOURCE_DIR}/src/qcdloop.pc.in"
"${PROJECT_SOURCE_DIR}/src/qcdloop.pc"
)
IF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
Copy link

Choose a reason for hiding this comment

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

OK, Something like

IF(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "x86_64|i686|ppc64|ppc64le|ppc|ppcle" )

would be better.
But it is important to list supported architectures explicitly, and not "everything but...".

Copy link
Contributor Author

@matthewfeickert matthewfeickert Jan 9, 2025

Choose a reason for hiding this comment

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

@andriish Can you explain more on why? How is this different or better? Is there another architecture that supports float128 that you know of? Or do you mean that there could be other architectures not considered here that also don't support libquadmath and these would get picked up erroneously here?

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