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

Use the same flags in Makefile.kokkos for POWER7/8/9 as for CMake #4483

Merged
merged 1 commit into from
Nov 3, 2021

Conversation

masterleinad
Copy link
Contributor

Fixes #4247. Note that this is also the logic used for Power7 already.

@stanmoore1
Copy link
Contributor

Thanks @masterleinad!

@masterleinad
Copy link
Contributor Author

The corresponding CMake options are

IF (KOKKOS_ARCH_POWER7)
COMPILER_SPECIFIC_FLAGS(
COMPILER_ID KOKKOS_CXX_HOST_COMPILER_ID
NVHPC NO-VALUE-SPECIFIED
DEFAULT -mcpu=power7 -mtune=power7
)
SET(KOKKOS_USE_ISA_POWERPCBE ON)
ENDIF()
IF (KOKKOS_ARCH_POWER8)
COMPILER_SPECIFIC_FLAGS(
COMPILER_ID KOKKOS_CXX_HOST_COMPILER_ID
NVHPC -tp=pwr8
DEFAULT -mcpu=power8 -mtune=power8
)
ENDIF()
IF (KOKKOS_ARCH_POWER9)
COMPILER_SPECIFIC_FLAGS(
COMPILER_ID KOKKOS_CXX_HOST_COMPILER_ID
NVHPC -tp=pwr9
DEFAULT -mcpu=power9 -mtune=power9
)
ENDIF()
.

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.

Why did you keep ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)?

@masterleinad
Copy link
Contributor Author

Why did you keep ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)?

We discussed before that PGI/NVC++ by default optimizes for the host architecture so that not using flags here should be fine. I didn't want to discuss/change that here but just fixing flags for other compilers that don't do that.
The problem with the PGI flags is that their existence very much depends on the installation (and the version). Of course, you could argue that compilers on Power architectures should be properly configured so that this works.
Anyway, if we want the behavior for Power architectures to be consistent as well, I am happy to change that here, too.

On a separate note, I'm not sure whether Makefile.kokkos recognizes nvc++ at all.

@crtrott crtrott merged commit 320ff0e into kokkos:develop Nov 3, 2021
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