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

Fix compressing TrilinosWrappers::SparsityPattern with empty column map #8277

Merged

Conversation

masterleinad
Copy link
Member

@masterleinad masterleinad commented May 23, 2019

Fixes the problem in https://groups.google.com/forum/#!topic/dealii/Pb4xy7qcNW0

nonlocal_graph->FillComplete(*column_space_map, graph->RangeMap());

causes problems if we try to insert an entry that it is not contained in the row and column maps.
If the column map is empty, we consequently can't insert any dummy element at all.

@masterleinad
Copy link
Member Author

/rebuild

@@ -791,7 +791,8 @@ namespace TrilinosWrappers
if (nonlocal_graph.get() != nullptr)
{
if (nonlocal_graph->IndicesAreGlobal() == false &&
nonlocal_graph->RowMap().NumMyElements() > 0)
nonlocal_graph->RowMap().NumMyElements() > 0 &&
column_space_map->NumMyElements() > 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you want to check for column_space_map->NumGlobalElements() > 0? We have a switch for an empty column space map on the local process in line 811 below. See also #7833.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed that.

@masterleinad masterleinad force-pushed the fix_trilinos_sp_empty_col_map branch from 3da8c3b to a888d8c Compare May 27, 2019 14:57
@masterleinad masterleinad force-pushed the fix_trilinos_sp_empty_col_map branch from a888d8c to c5ff9b4 Compare May 27, 2019 14:58
Copy link
Member

@kronbichler kronbichler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kronbichler kronbichler merged commit 0693564 into dealii:master Jun 3, 2019
@masterleinad masterleinad deleted the fix_trilinos_sp_empty_col_map branch August 23, 2019 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants