-
Notifications
You must be signed in to change notification settings - Fork 576
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
Issue 4283: refactor muelu to not use dynamic profile when declaring crsgraph #4411
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -249,7 +249,7 @@ namespace MueLu { | |
myGraph = CrsGraphFactory::Build(rowMap, | ||
colMap, | ||
nnzOnRow, | ||
Xpetra::DynamicProfile); | ||
Xpetra::StaticProfile); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lucbv should really comment on this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My feeling is: this should be fine, the graph constructor actually allocates the exact amount of memory it needs since nnzOnRow is specified. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @lucbv :-) |
||
|
||
*out << "Fill CrsGraph" << std::endl; | ||
LO rowIdx = 0; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,7 +134,7 @@ namespace MueLu { | |
|
||
|
||
// 3) create graph of amalgamated matrix | ||
RCP<CrsGraph> crsGraph = CrsGraphFactory::Build(nodeMap, 10, Xpetra::DynamicProfile); | ||
RCP<CrsGraph> crsGraph = CrsGraphFactory::Build(nodeMap, 10, Xpetra::StaticProfile); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, for the same reason as for |
||
|
||
// 4) do amalgamation. generate graph of amalgamated matrix | ||
for(LO row=0; row<Teuchos::as<LO>(A->getRowMap()->getNodeNumElements()); row++) { | ||
|
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.
@GeoffDanielson Ugh. I suspect
10
is arbitrary, and that this code relies on having the matrix expand its row storage as needed. Did you run the MueLu unit tests to see if this branch is ever hit?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.
I did run the muelu unit tests and the limit doesn't get hit. I suspect you're right, but I'm not sure whether it'd be more correct to fix it with the proper upper limit or just leave as is.
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.
If the matrix is an Xpetra::BlockedCrsMatrix, then the method
getNodeMaxNumRowEntries
is available. I am fine with this change.