-
Notifications
You must be signed in to change notification settings - Fork 577
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
Teuchos: Automatically enabling Tecuhos_ENABLE_THREAD_SAFE if you have Kokkos THREADS or OPENMP for the host #11946
Conversation
…e Kokkos THREADS or OPENMP for the host
Status Flag 'Pre-Test Inspection' - Auto Inspected - Inspection Is Not Necessary for this Pull Request. |
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: Trilinos_PR_gcc-8.3.0
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_gcc-8.3.0-serial
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_gcc-8.3.0-debug
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_clang-11.0.1
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_python3
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_cuda-11.4.2-uvm-off
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_intel-2021.3
Jenkins Parameters
Using Repos:
Pull Request Author: csiefer2 |
Status Flag 'Pull Request AutoTester' - Jenkins Testing: 1 or more Jobs FAILED Note: Testing will normally be attempted again in approx. 2 Hrs 30 Mins. If a change to the PR source branch occurs, the testing will be attempted again on next available autotester run. Pull Request Auto Testing has FAILED (click to expand)Build InformationTest Name: Trilinos_PR_gcc-8.3.0
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_gcc-8.3.0-serial
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_gcc-8.3.0-debug
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_clang-11.0.1
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_python3
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_cuda-11.4.2-uvm-off
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_intel-2021.3
Jenkins Parameters
|
@bartlettroscoe Second time should work, right? |
Status Flag 'Pull Request AutoTester' - User Requested Retest - Label AT: RETEST will be reset after testing. |
Status Flag 'Pre-Test Inspection' - Auto Inspected - Inspection Is Not Necessary for this Pull Request. |
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: Trilinos_PR_gcc-8.3.0
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_gcc-8.3.0-serial
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_gcc-8.3.0-debug
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_clang-11.0.1
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_python3
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_cuda-11.4.2-uvm-off
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_intel-2021.3
Jenkins Parameters
Using Repos:
Pull Request Author: csiefer2 |
I will put up in my review later tonight. Thanks for taking this on 😁 |
Status Flag 'Pull Request AutoTester' - Jenkins Testing: 1 or more Jobs FAILED Note: Testing will normally be attempted again in approx. 2 Hrs 30 Mins. If a change to the PR source branch occurs, the testing will be attempted again on next available autotester run. Pull Request Auto Testing has FAILED (click to expand)Build InformationTest Name: Trilinos_PR_gcc-8.3.0
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_gcc-8.3.0-serial
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_gcc-8.3.0-debug
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_clang-11.0.1
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_python3
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_cuda-11.4.2-uvm-off
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_intel-2021.3
Jenkins Parameters
|
Uhhh. That isn't good. Try a restest and hope for the best? |
@csiefer2, restart is not going to help. I can't explain it but the new test
That test passed when run in the PR #11863. If this failure can be reproduced locally, we can fix the CMakeLists.txt files to list this bad path (and other bad paths like I had to do in 29fab02 in PR #11863). |
I see the problem: Trilinos/packages/kokkos-kernels/common/CMakeLists.txt Lines 8 to 9 in 80cc3c7
You are already in the I will add a commit to remove those and push (without testing locally because, hay, why not?) |
The new test `TrilinosInstallTests_simpleBuildAgainstTrilinos_by_package_build_tree` merged from PR #11863 fails because the subdirs ${CMAKE_CURRENT_BINARY_DIR}/common and ${CMAKE_CURRENT_SOURCE_DIR}/common because this CMakeLists.txt file already sits in the kokkos-kernels/common/ subdir. I don't know why this error did not happen with PR testing for PR #11863 but this is clearly the right thing to do.
Status Flag 'Pull Request AutoTester' - User Requested Retest - Label AT: RETEST will be reset after testing. |
Status Flag 'Pre-Test Inspection' - Auto Inspected - Inspection Is Not Necessary for this Pull Request. |
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: Trilinos_PR_gcc-8.3.0
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_gcc-8.3.0-serial
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_gcc-8.3.0-debug
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_clang-11.0.1
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_python3
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_cuda-11.4.2-uvm-off
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_intel-2021.3
Jenkins Parameters
Using Repos:
Pull Request Author: csiefer2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like that should work. Feel free to merge (once testing passes). But I suggested some simplification of some IF() statements that you might want to consider.
# As per the discussion in #11921, we explicitly enable thread safe RCPs, | ||
# if Kokkos has a host thread-parallel backend | ||
SET(Teuchos_ENABLE_THREAD_SAFE_Default ${Trilinos_ENABLE_THREAD_SAFE}) | ||
IF(DEFINED ${PROJECT_NAME}_ENABLE_Kokkos AND ${PROJECT_NAME}_ENABLE_Kokkos) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be simplified as:
IF (${PROJECT_NAME}_ENABLE_Kokkos)
If a variable is undefined, it evaluates to false. See here which states:
if(<variable>)
True if given a variable that is defined to a value that is not a false
constant. False otherwise, including if the variable is undefined.
IF( (DEFINED Kokkos_ENABLE_THREADS AND Kokkos_ENABLE_THREADS) OR | ||
(DEFINED Kokkos_ENABLE_OPENMP AND Kokkos_ENABLE_OPENMP) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be simplified to:
IF( Kokkos_ENABLE_THREADS OR Kokkos_ENABLE_OPENMP)
If a variable is undefined, it evaluates to false.
IF( (DEFINED Kokkos_ENABLE_THREADS AND Kokkos_ENABLE_THREADS) OR | ||
(DEFINED Kokkos_ENABLE_OPENMP AND Kokkos_ENABLE_OPENMP) ) | ||
IF (NOT ${PACKAGE_NAME}_ENABLE_THREAD_SAFE) | ||
MESSAGE(WARNING "A Kokkos host thread-parallel backend is enabled, requiring Trilinos to enable thread-safe RCP classes. You can do this manually by specifying Teuchos_ENABLE_THREAD_SAFE=ON") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what does it mean if Kokkos_ENABLE_THREADS=ON
and Teuchos_ENABLE_THREAD_SAFE=ON
but Trilinos_ENABLE_THREAD_SAFE=OFF
? But it seems like only teuchos/CMakeLists.txt
is looking at this variable so it currently does not matter (but that might confuse and frustrate if these are inconsistent).
@@ -202,7 +202,7 @@ static void share_arrayview_to_threads(ArrayView<int> shared_arrayview, | |||
++cycle; | |||
} | |||
} | |||
catch (DanglingReferenceError) { | |||
catch (DanglingReferenceError&) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED Pull Request Auto Testing has PASSED (click to expand)Build InformationTest Name: Trilinos_PR_gcc-8.3.0
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_gcc-8.3.0-serial
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_gcc-8.3.0-debug
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_clang-11.0.1
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_python3
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_cuda-11.4.2-uvm-off
Jenkins Parameters
Build InformationTest Name: Trilinos_PR_intel-2021.3
Jenkins Parameters
|
Status Flag 'Pre-Merge Inspection' - SUCCESS: The last commit to this Pull Request has been INSPECTED AND APPROVED by [ bartlettroscoe ]! |
Status Flag 'Pull Request AutoTester' - Pull Request will be Automerged |
Merge on Pull Request# 11946: IS A SUCCESS - Pull Request successfully merged |
@@ -3,7 +3,3 @@ LIST(APPEND KK_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/common/src) | |||
LIST(APPEND KK_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/common/src/impl) | |||
LIST(APPEND KK_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/common/src/tpls) | |||
LIST(APPEND KK_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/common/unit_test) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These kokkos-kernels changes should have had a matching PR put in to the kernels repo, @bartlettroscoe can you submit a PR with these changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Matching patch to kokkos-kernels is up kokkos/kokkos-kernels#1854
Issue: #11921
Stakeholder feedback: Offline discussions with @crtrott as well as in #11921
Test: Manually verified for THREADS backend