-
Notifications
You must be signed in to change notification settings - Fork 708
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
Raise error when DSP is used without IndexSet #16975
Comments
What do you do if you run a parallel code on one processor? What if you run it on two processors, but you only have one cell and consequently all DoFs on one process are locally owned? |
I would compare the IndexSet passed to distribute_sparsity_pattern() with the one stored inside the DSP: if the argument doesn't contain all DoFs, then the DSP should also not store all lines. I think all your cases should work (but we should test this as well!). |
It is a hard to catch bug as you can see in #16878, where none of the reviewers caught it (including myself). :-) |
Ha, yes, for sure. I think comparing the index sets is a good strategy! |
#17033 |
A very annoying and subtle bug is when you forget to provide an IndexSet to DynamicSparsityPattern: Everything works but the memory requirements for the data structure are O(total DoFs) instead of O(locally owned DoFs) in parallel.
My suggestion:
Add an AssertThrow() to distribute_sparsity_pattern() to check that the DSP has an IndexSet set, which is not the whole set.
Can you do this, @vyushut ?
The text was updated successfully, but these errors were encountered: