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

CMake: AMReX_PARALLEL_LINK_JOBS #3628

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

WeiqunZhang
Copy link
Member

@WeiqunZhang WeiqunZhang commented Nov 14, 2023

Add AMReX_PARALLEL_LINK_JOBS option to the CMake build system and use it for SYCL builds.

Adjust SYCL's RelWithDebInfo mode to the recommendation of Intel VTune.

This is a follow-up on #3498 that made similar changes to GNU Make.

Checklist

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • include documentation in the code and/or rst files, if appropriate

@WeiqunZhang WeiqunZhang requested a review from ax3l November 14, 2023 17:41
Copy link
Member

@ax3l ax3l left a comment

Choose a reason for hiding this comment

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

Great option!

I think there is a general option now for vanilla LLVM and GCC's LTO as well that supports threading... Maybe we can unify them into a general name instead of calling it SYCL?

AMReX_SYCL_PARALLEL_LINK_JOBS -> AMReX_PARALLEL_LINK_JOBS?

@@ -44,7 +44,8 @@ jobs:
-DCMAKE_C_COMPILER=$(which icx) \
-DCMAKE_CXX_COMPILER=$(which icpx) \
-DCMAKE_Fortran_COMPILER=$(which ifx) \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DAMReX_SYCL_PARALLEL_LINK_JOBS=2
Copy link
Member

Choose a reason for hiding this comment

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

We have to be careful not to oversubscribe CI:
if we build more than one AMReX lib (1D, 2D, 3D), then CMake will with --parallel 2 already run two linkers.

This is not the case here, so we are good 👍

@ax3l ax3l self-assigned this Dec 14, 2023
@ax3l ax3l added the install label Dec 14, 2023
@WeiqunZhang
Copy link
Member Author

AMReX_SYCL_PARALLEL_LINK_JOBS -> AMReX_PARALLEL_LINK_JOBS?

Sounds good. I will make the change. But will limit its use to SYCL for now.

Add AMReX_PARALLEL_LINK_JOBS option to the CMake build system and use it for
SYCL builds.

Adjust SYCL's RelWithDebInfo mode to the recommendation of Intel VTune.

This is a follow-up on AMReX-Codes#3498 that made similar changes to GNU Make.
@WeiqunZhang WeiqunZhang changed the title CMake: AMReX_SYCL_PARALLEL_LINK_JOBS CMake: AMReX_PARALLEL_LINK_JOBS Dec 14, 2023
@WeiqunZhang WeiqunZhang enabled auto-merge (squash) December 14, 2023 22:15
@WeiqunZhang WeiqunZhang merged commit 0c6f2b4 into AMReX-Codes:development Dec 14, 2023
69 checks passed
@WeiqunZhang WeiqunZhang deleted the cmake_sycl_link branch December 14, 2023 22:57
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.

2 participants