-
Notifications
You must be signed in to change notification settings - Fork 573
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
Tpetra,Teuchos: Fix #3057 #3058
Conversation
@trilinos/tpetra @trilinos/teuchos Tpetra::Map was and still is responsible for initializing Kokkos, if the user hasn't done it already. This commit moves the initialization code out of Teuchos into Tpetra. It also removes the dependency on std::call_once. It appears that with GCC, std::call_once only works if linking with libpthread. Thus, setting TPL_ENABLE_Pthread=OFF (which we don't recommend -- Trilinos autodetects this) could break std::call_once. This change could break a possible use case in which Kokkos::initialize has not been called, and different user threads each create different Tpetra::Map instances. However, Trilinos does not test this use case, nor do the applications we support appear to exercise it. I also took the liberty to purge some unnecessary header includes.
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_pullrequest_gcc_4.9.3
Jenkins Parameters
Build InformationTest Name: Trilinos_pullrequest_gcc_4.8.4
Jenkins Parameters
Build InformationTest Name: Trilinos_pullrequest_intel_17.0.1
Jenkins Parameters
Using Repos:
Pull Request Author: mhoemmen |
Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED Pull Request Auto Testing has PASSED (click to expand)Build InformationTest Name: Trilinos_pullrequest_gcc_4.9.3
Jenkins Parameters
Build InformationTest Name: Trilinos_pullrequest_gcc_4.8.4
Jenkins Parameters
Build InformationTest Name: Trilinos_pullrequest_intel_17.0.1
Jenkins Parameters
|
Status Flag 'Pre-Merge Inspection' - SUCCESS: The last commit to this Pull Request has been INSPECTED AND APPROVED by [ kddevin ibaned ]! |
Status Flag 'Pull Request AutoTester' - Pull Request MUST BE MERGED MANUALLY BY Project Team - Master Automerge is disabled (in .cfg file) |
@trilinos/tpetra @trilinos/teuchos
Description
Tpetra::Map
was and still is responsible for initializing Kokkos, if the user hasn't done it already. This pull request moves the initialization code out of Teuchos into Tpetra. It also removes the dependency onstd::call_once
. It appears that with GCC,std::call_once
only works if linking with libpthread. Thus, settingTPL_ENABLE_Pthread=OFF
(which we don't recommend -- Trilinos autodetects this) could breakstd::call_once
.This change could break a possible use case in which
Kokkos::initialize
has not been called, and different user threads each create differentTpetra::Map
instances. However, Trilinos does not test this use case, nor do the applications we support appear to exercise it.I also took the liberty to purge some unnecessary header includes and fix some shadowing warnings.
The commit refers to #3033, because I wrote the commit message before #3057 superseded it.
Motivation and Context
This aligns with #57 and the general push to deprecate and remove Node in Tpetra, in favor of
device_type = Kokkos::Device
.Related Issues
How Has This Been Tested?
Locally, with OpenMP enabled.
Checklist