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::Map::locallySameAs slow when running computations on GPU #433

Closed
ambrad opened this issue Jun 10, 2016 · 3 comments
Closed

Tpetra::Map::locallySameAs slow when running computations on GPU #433

ambrad opened this issue Jun 10, 2016 · 3 comments
Assignees

Comments

@ambrad
Copy link
Contributor

ambrad commented Jun 10, 2016

Tpetra::DistObject::doImport calls Map::operator!= even when ! defined HAVE_TPETRA_DEBUG. That means isSameAs and locallySameAs must be fast.

If pointer equality, contiguity, uniformity, etc. checks fail, then locallySameAs iterates over GIDs on the host. This is very expensive relative to GPU computations.

I don't require an urgent fix for this problem, as I can work around this, but I'm opening this issue because I think the problem needs to be fixed at some point.

@mhoemmen mhoemmen self-assigned this Jun 10, 2016
@mhoemmen
Copy link
Contributor

mhoemmen commented Jun 10, 2016

Tpetra::DistObject::doImport calls Map::operator!= even when ! defined HAVE_TPETRA_DEBUG. That means isSameAs and locallySameAs must be fast.

That's totally wrong. The test should go inside HAVE_TPETRA_DEBUG. (Yes, git blame says I wrote it ;-) have a hard time believing that I would have let that stand, though.) It probably just doesn't pop up as a performance issue often, because apps usually hit the fast path (e.g., pointer equality).

@mhoemmen
Copy link
Contributor

I've got a fix ready. Running CUDA tests now, will do non-CUDA tests for the push.

@mhoemmen mhoemmen added the stage: in progress Work on the issue has started label Jun 10, 2016
@mhoemmen
Copy link
Contributor

@csiefer2 would you object to removal of comparable tests from transferAndFillComplete etc.?

mhoemmen pushed a commit that referenced this issue Jun 10, 2016
@trilinos/tpetra Make sure Map compatibility tests in doImport and
doExport (both forward and reverse mode) only run in a debug build.
This fixes #433.
@mhoemmen mhoemmen removed the stage: in progress Work on the issue has started label Jun 10, 2016
bartlettroscoe added a commit that referenced this issue Dec 15, 2021
Origin repo remote tracking branch: 'github/master'
Origin repo remote repo URL: 'github = git@github.com:TriBITSPub/TriBITS.git'

At commit:

commit 35d82aaa31fe81ca30a619320bb71fe481e9d4c7
Author:  Roscoe A. Bartlett <rabartl@sandia.gov>
Date:    Tue Dec 14 15:48:02 2021 -0700
Summary: Interpret a raw identifer in TPL_<tplName>_LIBRARIES as a lib name (#299, #433)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants