Skip to content

Tpetra::MultiVector: Fix #4870 (prefer running norms on device)

James Willenbring requested to merge mhoemmen:Fix-4870-2 into develop

Created by: mhoemmen

@trilinos/tpetra @trilinos/stokhos

Supersedes PR #4871.

Description

  • Prefer running MultiVector norms on device, even if it is currently sync'd to host, unless the vector has too few local rows.
  • Factor out the implementation of Tpetra::MultiVector::norm* into a separate function, Tpetra::Details::normImpl. I do ETI for that function, when ETI is enabled. This required adding new ETI macros for iterating over the (Scalar, Node) type combination.
  • Fix Stokhos to work around lack of ETI for Tpetra::Details::normImpl. Tpetra's ETI macro for Tpetra::Details::normImpl only takes 2 template parameters: Scalar and Node. This meant that I couldn't use Stokhos' ETI system (see TPETRA_ETI_CLASSES in stokhos/src/CMakeLists.txt). I hacked in a header file include in Stokhos to make this build.

Motivation and Context

  • SPARC performance
  • Build time

Related Issues

Merge request reports