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: Add missing syncs/modifies in BlockMultiVector unit tests #8499

Merged
merged 3 commits into from
Dec 19, 2020

Conversation

tasmith4
Copy link
Contributor

@trilinos/tpetra

Motivation

These tests operate on primarily on host, but without explicit sync/modify calls, data added on host using non-const Views handed out from the BlockMultivector was being overwritten. Also, in the Import test, without X being marked modify_host after modifications were made to a host view of X's data, the correct data was not brought over to Y.

Related Issues

Testing

Now passing in a non-UVM build on an x86/V100 platform (ascicgpu).

@tasmith4 tasmith4 added pkg: Tpetra AT: AUTOMERGE Causes the PR autotester to automatically merge the PR branch once approvals are completed UVM removal labels Dec 18, 2020
@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_8.3.0

  • Build Num: 3076
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
PR_LABELS AT: AUTOMERGE;UVM removal;pkg: Tpetra
PULLREQUESTNUM 8499
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH tasmit/blockMV
TRILINOS_SOURCE_REPO https://github.com/trilinos/Trilinos
TRILINOS_SOURCE_SHA 9a94dab
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA 6068405

Build Information

Test Name: Trilinos_pullrequest_gcc_7.2.0_serial

  • Build Num: 704
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
PR_LABELS AT: AUTOMERGE;UVM removal;pkg: Tpetra
PULLREQUESTNUM 8499
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH tasmit/blockMV
TRILINOS_SOURCE_REPO https://github.com/trilinos/Trilinos
TRILINOS_SOURCE_SHA 9a94dab
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA 6068405

Build Information

Test Name: Trilinos_pullrequest_gcc_7.2.0_debug

  • Build Num: 1198
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
PR_LABELS AT: AUTOMERGE;UVM removal;pkg: Tpetra
PULLREQUESTNUM 8499
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH tasmit/blockMV
TRILINOS_SOURCE_REPO https://github.com/trilinos/Trilinos
TRILINOS_SOURCE_SHA 9a94dab
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA 6068405

Build Information

Test Name: Trilinos_pullrequest_intel_17.0.1

  • Build Num: 8555
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
PR_LABELS AT: AUTOMERGE;UVM removal;pkg: Tpetra
PULLREQUESTNUM 8499
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH tasmit/blockMV
TRILINOS_SOURCE_REPO https://github.com/trilinos/Trilinos
TRILINOS_SOURCE_SHA 9a94dab
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA 6068405

Build Information

Test Name: Trilinos_pullrequest_cuda_9.2

  • Build Num: 6269
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
PR_LABELS AT: AUTOMERGE;UVM removal;pkg: Tpetra
PULLREQUESTNUM 8499
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH tasmit/blockMV
TRILINOS_SOURCE_REPO https://github.com/trilinos/Trilinos
TRILINOS_SOURCE_SHA 9a94dab
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA 6068405

Build Information

Test Name: Trilinos_pullrequest_clang_10.0.0

  • Build Num: 1401
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
PR_LABELS AT: AUTOMERGE;UVM removal;pkg: Tpetra
PULLREQUESTNUM 8499
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH tasmit/blockMV
TRILINOS_SOURCE_REPO https://github.com/trilinos/Trilinos
TRILINOS_SOURCE_SHA 9a94dab
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA 6068405

Build Information

Test Name: Trilinos_pullrequest_python_3

  • Build Num: 4152
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
PR_LABELS AT: AUTOMERGE;UVM removal;pkg: Tpetra
PULLREQUESTNUM 8499
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH tasmit/blockMV
TRILINOS_SOURCE_REPO https://github.com/trilinos/Trilinos
TRILINOS_SOURCE_SHA 9a94dab
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA 6068405

Using Repos:

Repo: TRILINOS (trilinos/Trilinos)
  • Branch: tasmit/blockMV
  • SHA: 9a94dab
  • Mode: TEST_REPO

Pull Request Author: tasmith4

Copy link
Contributor

@brian-kelley brian-kelley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

One thing I'm curious about, I see you did sync_host on a newly constructed BMV on line 266. Is that necessary to avoid overwriting host modifications?

For the constructor which just takes a map and makes a new DualView, both d_view and h_view are intialized to zeros and so are both modified flags. On the other hand, if the modified_flags(1) == 0, then this sync is a no-op so maybe it doesn't matter.

@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_8.3.0

  • Build Num: 3076
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
PR_LABELS AT: AUTOMERGE;UVM removal;pkg: Tpetra
PULLREQUESTNUM 8499
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH tasmit/blockMV
TRILINOS_SOURCE_REPO https://github.com/trilinos/Trilinos
TRILINOS_SOURCE_SHA 9a94dab
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA 6068405

Build Information

Test Name: Trilinos_pullrequest_gcc_7.2.0_serial

  • Build Num: 704
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
PR_LABELS AT: AUTOMERGE;UVM removal;pkg: Tpetra
PULLREQUESTNUM 8499
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH tasmit/blockMV
TRILINOS_SOURCE_REPO https://github.com/trilinos/Trilinos
TRILINOS_SOURCE_SHA 9a94dab
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA 6068405

Build Information

Test Name: Trilinos_pullrequest_gcc_7.2.0_debug

  • Build Num: 1198
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
PR_LABELS AT: AUTOMERGE;UVM removal;pkg: Tpetra
PULLREQUESTNUM 8499
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH tasmit/blockMV
TRILINOS_SOURCE_REPO https://github.com/trilinos/Trilinos
TRILINOS_SOURCE_SHA 9a94dab
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA 6068405

Build Information

Test Name: Trilinos_pullrequest_intel_17.0.1

  • Build Num: 8555
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
PR_LABELS AT: AUTOMERGE;UVM removal;pkg: Tpetra
PULLREQUESTNUM 8499
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH tasmit/blockMV
TRILINOS_SOURCE_REPO https://github.com/trilinos/Trilinos
TRILINOS_SOURCE_SHA 9a94dab
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA 6068405

Build Information

Test Name: Trilinos_pullrequest_cuda_9.2

  • Build Num: 6269
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
PR_LABELS AT: AUTOMERGE;UVM removal;pkg: Tpetra
PULLREQUESTNUM 8499
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH tasmit/blockMV
TRILINOS_SOURCE_REPO https://github.com/trilinos/Trilinos
TRILINOS_SOURCE_SHA 9a94dab
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA 6068405

Build Information

Test Name: Trilinos_pullrequest_clang_10.0.0

  • Build Num: 1401
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
PR_LABELS AT: AUTOMERGE;UVM removal;pkg: Tpetra
PULLREQUESTNUM 8499
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH tasmit/blockMV
TRILINOS_SOURCE_REPO https://github.com/trilinos/Trilinos
TRILINOS_SOURCE_SHA 9a94dab
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA 6068405

Build Information

Test Name: Trilinos_pullrequest_python_3

  • Build Num: 4152
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
PR_LABELS AT: AUTOMERGE;UVM removal;pkg: Tpetra
PULLREQUESTNUM 8499
TEST_REPO_ALIAS TRILINOS
TRILINOS_SOURCE_BRANCH tasmit/blockMV
TRILINOS_SOURCE_REPO https://github.com/trilinos/Trilinos
TRILINOS_SOURCE_SHA 9a94dab
TRILINOS_TARGET_BRANCH develop
TRILINOS_TARGET_REPO https://github.com/trilinos/Trilinos
TRILINOS_TARGET_SHA 6068405


CDash Test Results for PR# 8499.

@trilinos-autotester
Copy link
Contributor

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

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pull Request AutoTester' - Pull Request will be Automerged

@trilinos-autotester trilinos-autotester merged commit 69f1931 into develop Dec 19, 2020
@trilinos-autotester
Copy link
Contributor

Merge on Pull Request# 8499: IS A SUCCESS - Pull Request successfully merged

@trilinos-autotester trilinos-autotester removed the AT: AUTOMERGE Causes the PR autotester to automatically merge the PR branch once approvals are completed label Dec 19, 2020
@tasmith4
Copy link
Contributor Author

@brian-kelley MultiVector and friends are almost always marked modified on device (need sync to host) after construction, and I confirmed that is also the case in these tests. Since we need to modify on host, we need an intervening sync_host to guarantee the initial values are copied to host memory (and to avoid a Kokkos error when we follow up with a modify_host after modifying host data).

In this case, the initial values might also be correct on host, but several of the MV constructors do save time by only initializing on device, so it's not guaranteed, and in any case, we should respect the modified on device flag for consistency.

@tasmith4 tasmith4 deleted the tasmit/blockMV branch December 19, 2020 04:58
@tasmith4 tasmith4 mentioned this pull request Dec 19, 2020
93 tasks
@brian-kelley
Copy link
Contributor

@tasmith4 OK, got it, thanks for figuring all this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants