-
Notifications
You must be signed in to change notification settings - Fork 578
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
Conversation
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_8.3.0
Jenkins Parameters
Build InformationTest Name: Trilinos_pullrequest_gcc_7.2.0_serial
Jenkins Parameters
Build InformationTest Name: Trilinos_pullrequest_gcc_7.2.0_debug
Jenkins Parameters
Build InformationTest Name: Trilinos_pullrequest_intel_17.0.1
Jenkins Parameters
Build InformationTest Name: Trilinos_pullrequest_cuda_9.2
Jenkins Parameters
Build InformationTest Name: Trilinos_pullrequest_clang_10.0.0
Jenkins Parameters
Build InformationTest Name: Trilinos_pullrequest_python_3
Jenkins Parameters
Using Repos:
Pull Request Author: tasmith4 |
There was a problem hiding this 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.
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_8.3.0
Jenkins Parameters
Build InformationTest Name: Trilinos_pullrequest_gcc_7.2.0_serial
Jenkins Parameters
Build InformationTest Name: Trilinos_pullrequest_gcc_7.2.0_debug
Jenkins Parameters
Build InformationTest Name: Trilinos_pullrequest_intel_17.0.1
Jenkins Parameters
Build InformationTest Name: Trilinos_pullrequest_cuda_9.2
Jenkins Parameters
Build InformationTest Name: Trilinos_pullrequest_clang_10.0.0
Jenkins Parameters
Build InformationTest Name: Trilinos_pullrequest_python_3
Jenkins Parameters
|
Status Flag 'Pre-Merge Inspection' - SUCCESS: The last commit to this Pull Request has been INSPECTED AND APPROVED by [ brian-kelley ]! |
Status Flag 'Pull Request AutoTester' - Pull Request will be Automerged |
Merge on Pull Request# 8499: IS A SUCCESS - Pull Request successfully merged |
@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 OK, got it, thanks for figuring all this out. |
@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).