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

Support finding libquadmath with native compiler support #5286

Merged
merged 3 commits into from
Jul 29, 2022

Conversation

masterleinad
Copy link
Contributor

@masterleinad masterleinad commented Jul 28, 2022

gcc oftentimes bundles libquadmath and doesn't need any extra libraries or include directories (which would not be contained in CMake's search paths anyway).
Hence, try if the compiler supports libquadmath natively first before doing the standard package search.

KOKKOS_IMPORT_TPL needed a workaround to be able to create a consistent target whether KOKKOS_QUADMATH_COMPILER_SUPPORT is true or not.

This should in particular help with testing libquadmath support.

dalg24
dalg24 previously approved these changes Jul 28, 2022
Copy link
Member

@dalg24 dalg24 left a comment

Choose a reason for hiding this comment

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

Please apply my suggestion
Looks good other than that

cmake/Modules/FindTPLLIBQUADMATH.cmake Outdated Show resolved Hide resolved
@PhilMiller
Copy link
Contributor

This seems like a good candidate for 3.7

@dalg24 dalg24 dismissed their stale review July 28, 2022 18:01

Unrelated changes pushed post approval

@masterleinad
Copy link
Contributor Author

Unrelated changes pushed post approval

They are not unrelated but make sure the detection also works with -Werror and without extra include path.

@masterleinad
Copy link
Contributor Author

This seems like a good candidate for 3.7

I think this is not a bug fix so I would abstain from pulling more stuff in.

@PhilMiller
Copy link
Contributor

I was looking at it as something that would ease our support burden from users who have trouble with this aspect of the build/installation process

@masterleinad
Copy link
Contributor Author

There are a bunch of CI failures (mostly timing based but OpenMPTarget can't find LIBDL???) but this pull request only affects the gcc-5.3.1 build which works with

-- Performing Test KOKKOS_QUADMATH_COMPILER_SUPPORT
-- Performing Test KOKKOS_QUADMATH_COMPILER_SUPPORT - Success

scripts/docker/Dockerfile.openmptarget Outdated Show resolved Hide resolved
Comment on lines +284 to +288
GET_TARGET_PROPERTY(TPL_ORIGINAL_NAME ${TPL_IMPORTED_NAME} ALIASED_TARGET)
IF (NOT TPL_ORIGINAL_NAME)
SET(TPL_ORIGINAL_NAME ${TPL_IMPORTED_NAME})
ENDIF()
KOKKOS_EXPORT_IMPORTED_TPL(${TPL_ORIGINAL_NAME})
Copy link
Member

Choose a reason for hiding this comment

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

Why is this needed? Make sure this is in the description of the PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a comment. Without this, we are getting

-- Performing Test KOKKOS_QUADMATH_COMPILER_SUPPORT
-- Performing Test KOKKOS_QUADMATH_COMPILER_SUPPORT - Success
CMake Error at cmake/kokkos_functions.cmake:187 (INSTALL):
  INSTALL TARGETS given target "Kokkos::LIBQUADMATH" which is an alias.
Call Stack (most recent call first):
  cmake/kokkos_functions.cmake:288 (KOKKOS_EXPORT_IMPORTED_TPL)
  cmake/kokkos_tpls.cmake:86 (KOKKOS_IMPORT_TPL)
  cmake/kokkos_tribits.cmake:247 (INCLUDE)
  CMakeLists.txt:188 (KOKKOS_SETUP_BUILD_ENVIRONMENT)

@masterleinad masterleinad mentioned this pull request Jul 29, 2022
@dalg24 dalg24 merged commit 1c7f66b into kokkos:develop Jul 29, 2022
@masterleinad masterleinad mentioned this pull request Sep 7, 2022
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

4 participants