-
Notifications
You must be signed in to change notification settings - Fork 563
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: Graph / matrix insert doesn't merge, taking extra space & hindering thread parallelism #119
Comments
Current status:
|
Origin repo remote tracking branch: 'github/master' Origin repo remote repo URL: 'github = git@github.com:tribitspub/TriBITS.git' At commit: commit 514ea61cde407bb713d837b3d3a92f641c2c7dd8 Author: Roscoe A. Bartlett <rabartl@sandia.gov> Date: Mon Aug 1 17:31:16 2016 -0400 Summary: Move and rename sorted_str() to sorted_dict_str() (TriBITS #119)
Origin repo remote tracking branch: 'github/master' Origin repo remote repo URL: 'github = git@github.com:tribitspub/TriBITS.git' At commit: commit 1205b3f13656316d9e88c03e62b4739f68e49c9d Author: Roscoe A. Bartlett <rabartl@sandia.gov> Date: Mon Aug 8 17:36:52 2016 -0400 Summary: Fix echoRunSysCmnd() with extraEnv (#119)
@trilinos/tpetra Address #601 (globalAssemble highly broken) for CrsGraph. This fixes the known performance and correctness issues with CrsGraph::globalAssemble. This commit has the side effect of starting to address #119 for CrsGraph::insertGlobalIndices. When the graph is StaticProfile and the graph doesn't have enough space for us just to write the values into the extra space, insertGlobalIndicesImpl now checks whether the input indices have some entries in common ("duplicates") with the row's current column indices. If so (if there are duplicates), and if that means the row actually _does_ have enough space, it then merges in the new entries (without sorting). In order to make tests pass, I had to fix CrsGraph unit tests as well. I wrote "fix" because the tests were being _too_ strict. That is, they were expecting StaticProfile inserts always to fail if the row is out of room, regardless of whether there _would_ be enough space if the input were merged in instead of just being appended without a merge. This commit fixes that. Now, the CrsGraph tets only expect StaticProfile inserts to fail if the result of merging the input column indices with the current column indices in that row does not exceed the static allocation. Build/Test Cases Summary Enabled Packages: Ifpack2, TpetraCore Disabled Packages: FEI,PyTrilinos,Moertel,STK,SEACAS,ThreadPool,OptiPack,Rythmos,Intrepid,ROL 0) MPI_DEBUG => passed: passed=130,notpassed=0 (3.67 min) 1) SERIAL_RELEASE => passed: passed=100,notpassed=0 (1.36 min) Other local commits for this build/test group: 081712c, 7be0c06
This is story-level, because it needs to be broken up into smaller tasks in order to succeed. |
I've been looking at this. It turns out that it's not enough to check whether input indices have matching entries currently in the row. One must also check whether the input itself has duplicates. Otherwise, if the input is (for example) [1, 1, 1, 1], insertion into an empty row [] would result in [1, 1, 1, 1], but insertion into a row [1] would result in [1]. |
BUMP: This hinders (not actually blocks) #2267 .
|
@trilinos/tpetra BUMP per @csiefer2 request |
This issue has had no activity for 365 days and is marked for closure. It will be closed after an additional 30 days of inactivity. |
I have a vague memory that this got fixed early this year, but I might be remembering a different bug. |
This issue has had no activity for 365 days and is marked for closure. It will be closed after an additional 30 days of inactivity. |
@csiefer2 Did y'all actually fix this? |
Kokkos-level graph assembly (in progress) should render this moot, at least if you're using it. |
@trilinos/tpetra
CrsGraph::insert{Local,Global}Indices and CrsMatrix::insert{Local,Global}Values currently do something nonintuitive: multiple inserts to the same row and column index are stored separately and not merged until fillComplete. For example, inserting (1,1) into a CrsGraph 10 times would require storing 10 entries, until fillComplete, at which point the entries get merged together into a single entry. This is especially bad for StaticProfile, which currently would counterintuitively fail on 9 of those 10 inserts if the user reasonably gave CrsGraph an upper bound of 1 entry per row. We don't want users to have to rely on DynamicProfile, which is both slow and (especially due to this issue) memory-intensive.
Commit 68e77d5 begins the process of fixing this. It does not yet change the behavior of CrsGraph or CrsMatrix. For now, Tpetra has new internal utility functions for merging indices (for CrsGraph) or indices and values together (for CrsMatrix). I also added some unit tests for the new functions. However, they still need to be integrated into CrsGraph and CrsMatrix. My initial attempts broke a lot of invariants and made a lot of tests fail. I realize I'll have to do this VERY cautiously.
The text was updated successfully, but these errors were encountered: