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

Tpetra,Teuchos: Fix #3057 #3058

Merged
merged 4 commits into from
Jul 4, 2018
Merged

Tpetra,Teuchos: Fix #3057 #3058

merged 4 commits into from
Jul 4, 2018

Conversation

mhoemmen
Copy link
Contributor

@mhoemmen mhoemmen commented Jul 3, 2018

@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 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 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

  • My commit messages mention the appropriate GitHub issue numbers.
  • My code follows the code style of the affected package(s).
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the code contribution guidelines for this project.
  • All new and existing tests passed.
  • No new compiler warnings were introduced.

Mark Hoemmen added 4 commits July 3, 2018 15:47
@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.
@mhoemmen mhoemmen self-assigned this Jul 3, 2018
@mhoemmen mhoemmen requested review from ibaned and kddevin July 3, 2018 22:08
@trilinos-autotester
Copy link
Contributor

Status Flag 'Pre-Test Inspection' - Auto Inspected - Inspection Is Not Necessary for this Pull Request.

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects:

Pull Request Auto Testing STARTING (click to expand)

Build Information

Test Name: Trilinos_pullrequest_gcc_4.9.3

  • Build Num: 1004
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
COMPILER_MODULE sems-gcc/4.9.3
JENKINS_BUILD_TYPE Release
JENKINS_COMM_TYPE MPI
JENKINS_DO_COMPLEX OFF
JENKINS_JOB_TYPE Experimental
MPI_MODULE sems-openmpi/1.8.7
PULLREQUESTNUM 3058
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH Fix-3033
TRILINOS_SOURCE_REPO https://github.com/trilinos/Trilinos
TRILINOS_SOURCE_SHA b1b11f8
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA a992c9e

Build Information

Test Name: Trilinos_pullrequest_gcc_4.8.4

  • Build Num: 710
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
COMPILER_MODULE sems-gcc/4.8.4
JENKINS_BUILD_TYPE Release
JENKINS_COMM_TYPE MPI
JENKINS_DO_COMPLEX OFF
JENKINS_JOB_TYPE Experimental
MPI_MODULE sems-openmpi/1.8.7
PULLREQUESTNUM 3058
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH Fix-3033
TRILINOS_SOURCE_REPO https://github.com/trilinos/Trilinos
TRILINOS_SOURCE_SHA b1b11f8
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA a992c9e

Build Information

Test Name: Trilinos_pullrequest_intel_17.0.1

  • Build Num: 264
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
PULLREQUESTNUM 3058
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH Fix-3033
TRILINOS_SOURCE_REPO https://github.com/trilinos/Trilinos
TRILINOS_SOURCE_SHA b1b11f8
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA a992c9e

Using Repos:

Repo: TRILINOS (trilinos/Trilinos)
  • Branch: Fix-3033
  • SHA: b1b11f8
  • Mode: TEST_REPO

Pull Request Author: mhoemmen

@mhoemmen mhoemmen added pkg: Tpetra pkg: Teuchos Issues primarily dealing with the Teuchos Package TpetraRF pkg: Kokkos labels Jul 3, 2018
@trilinos-autotester
Copy link
Contributor

Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED

Pull Request Auto Testing has PASSED (click to expand)

Build Information

Test Name: Trilinos_pullrequest_gcc_4.9.3

  • Build Num: 1004
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
COMPILER_MODULE sems-gcc/4.9.3
JENKINS_BUILD_TYPE Release
JENKINS_COMM_TYPE MPI
JENKINS_DO_COMPLEX OFF
JENKINS_JOB_TYPE Experimental
MPI_MODULE sems-openmpi/1.8.7
PULLREQUESTNUM 3058
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH Fix-3033
TRILINOS_SOURCE_REPO https://github.com/trilinos/Trilinos
TRILINOS_SOURCE_SHA b1b11f8
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA a992c9e

Build Information

Test Name: Trilinos_pullrequest_gcc_4.8.4

  • Build Num: 710
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
COMPILER_MODULE sems-gcc/4.8.4
JENKINS_BUILD_TYPE Release
JENKINS_COMM_TYPE MPI
JENKINS_DO_COMPLEX OFF
JENKINS_JOB_TYPE Experimental
MPI_MODULE sems-openmpi/1.8.7
PULLREQUESTNUM 3058
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH Fix-3033
TRILINOS_SOURCE_REPO https://github.com/trilinos/Trilinos
TRILINOS_SOURCE_SHA b1b11f8
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA a992c9e

Build Information

Test Name: Trilinos_pullrequest_intel_17.0.1

  • Build Num: 264
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
PULLREQUESTNUM 3058
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH Fix-3033
TRILINOS_SOURCE_REPO https://github.com/trilinos/Trilinos
TRILINOS_SOURCE_SHA b1b11f8
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA a992c9e


CDash Test Results for PR# 3058.

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pre-Merge Inspection' - SUCCESS: The last commit to this Pull Request has been INSPECTED AND APPROVED by [ kddevin ibaned ]!

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pull Request AutoTester' - Pull Request MUST BE MERGED MANUALLY BY Project Team - Master Automerge is disabled (in .cfg file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: Kokkos pkg: Teuchos Issues primarily dealing with the Teuchos Package pkg: Tpetra TpetraRF
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants