-
Notifications
You must be signed in to change notification settings - Fork 572
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::CrsGraph::globalAssemble broken with overlapping row Map (was: "Tpetra graph/matrix fill complete not communicating all data.") #601
Comments
@bathmatt Thanks for pointing this out. How urgent is this? You tried both CrsGraph and CrsMatrix for this; neither worked correctly. |
I'm using the three graph solution, it isn't urgent-urgent as it is in On Thu, Sep 8, 2016 at 3:28 PM, Mark Hoemmen [email protected]
|
The implementations of Crs{Graph,Matrix}::globalAssemble currently both assume that each process only needs to send information for a row to at most one process. This means that they likely won't work if the row Map is overlapping. I have changed the title to reflect this. We've known this for a while. See e.g., Bugzilla Bug 5782, comment number 34 (and comments in the implementation of CrsMatrix::globalAssemble). The way I would fix this is first to Export to a graph/matrix with nonoverlapping row Map, then Import to a graph/matrix with the original, overlapping row Map. (One could skip the second Import if the original row Map is one to one.) This is something you could do now, if you don't want to wait. We have not budgeted for this in our project plan, so we would need more information about urgency in order to increase this issue's priority. I'm very much eager to get rid of both globalAssemble methods, for two reasons:
|
Is there a check for this to error out? It was very hard to debug and I So, if I make my first map oneToOne I can get rid of one graph and only do On Thu, Sep 8, 2016 at 11:02 PM, Mark Hoemmen [email protected]
|
Whatever, I'm working on it right now. |
Thanks, On Fri, Sep 9, 2016 at 1:21 PM, Mark Hoemmen [email protected]
|
I split off the CrsMatrix::globalAssemble issue into #603. I think I've fixed this one. I'll try the existing unit tests first, then I'll add some more unit tests in the case of an overlapping row Map (the current unit tests don't exercise this case, as far as I can tell -- that's probably why they passed before ;-) ). |
@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
The fix passes existing unit tests. |
My fix had a minor bug in the case of an overlapping row Map. I added a unit test for that case, which caught the bug. I fixed the bug, and am running check-in tests now. |
Your work-around may still perform better, especially if you can avoid or amortize the createOneToOne call. Thus, I think it's actually the better option and you should leave it in the code if it at all makes sense. |
@trilinos/tpetra My earlier commits today reimplemented Tpetra::CrsGraph::globalAssemble to fix both performance and correctness issues. This commit fixes that work for the case where the CrsGraph has an overlapping row Map. I added a test for this case, which passes. This commit thus fixes #601.
I just pushed a fix, with a unit test that passes. |
@trilinos/tpetra Clear nonlocals_ after globalAssemble(). This avoids redundant work at subsequent fillComplete() calls on the graph.
I have a graph or a matrix which I use to get connectivity between elements and faces, I have rows which are faces and cols which are elements. I can fill this matrix and then when I do a fill complete it does not communicate the cols. The row graph is overlapping. The code is super short and pasted below. It is not clear from the documentation if this is supposed to work, but talking with people and reading the docs it looks like it should.
Here is the code with a matrix, but the graph code looks the same.
The text was updated successfully, but these errors were encountered: