Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • T Trilinos
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 936
    • Issues 936
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • James Willenbring
  • Trilinos
  • Issues
  • #4249

Closed
Open
Created Jan 23, 2019 by James Willenbring@jmwilleMaintainer

Teuchos: Kokkos::Compat::persistingView must not call Teuchos::arcp with nonnull pointer and zero length

Created by: mhoemmen

@trilinos/teuchos @trilinos/tpetra @trilinos/kokkos

Kokkos::Compat::persistingView passes the Kokkos::View's pointer directly to Teuchos::arcp (nonmember "constructor" for Teuchos::ArrayRCP). Kokkos::View, just like std::vector, permits a nonnull pointer with a zero size. Teuchos::ArrayRCP does not; its constructor throws when bounds checking is enabled (a configure-time option). This causes some Tpetra tests to fail.

Expectations

It should be harmless to convert a zero-size Kokkos::View to a Teuchos::ArrayRCP.

Current Behavior

Some Tpetra tests fail, because Teuchos::arcp throws. When I fix persistingView as suggested below, the tests pass.

Possible Solution

Here are two possible solutions:

  1. Fix persistingView so that it gives Teuchos::arcp a null pointer if the Kokkos::View's size is zero.
  2. Fix Teuchos::arcp, analogously to Teuchos::ArrayView (see #4234 (closed)).

For now I prefer Solution (1). See #4234 (closed) discussion, esp. the comment here.

Related Issues

  • Related to #4234 (closed)
Assignee
Assign to
Time tracking