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

Assertion in AlignedVector<T>::Deleter::MPISharedMemDeleterAction::delete_arry with libc++ #13965

Closed
tamiko opened this issue Jun 13, 2022 · 2 comments · Fixed by #13975
Closed

Comments

@tamiko
Copy link
Member

tamiko commented Jun 13, 2022

When compiling against LLVM/Clangs libc++ we hit the following assertion on a number of tests [1]:

--------------------------------------------------------
An error occurred in line <1131> of file </srv/testsuite/dealii/include/deal.II/base/aligned_vector.h> in function
    virtual void dealii::AlignedVector<int>::Deleter::MPISharedMemDeleterAction::delete_array(const AlignedVector<T> *, T *) [T = int]
The violated condition was: 
    aligned_vector->elements.get() == ptr
Additional information: 
    This exception -- which is used in many places in the library --
    usually indicates that some condition which the author of the code
    thought must be satisfied at a certain point in an algorithm, is not
    fulfilled. An example would be that the first part of an algorithm
    sorts elements of an array in ascending order, and a second part of
    the algorithm later encounters an element that is not larger than the
    previous one.
    
    There is usually not very much you can do if you encounter such an
    exception since it indicates an error in deal.II, not in your own
    program. Try to come up with the smallest possible program that still
    demonstrates the error and contact the deal.II mailing lists with it
    to obtain help.
--------------------------------------------------------

Such issues typically arise because libc++ is stricter with pointer validity and pointer equality in different compilation units. We should investigate this one for the release.
(For completeness: this test failure does not happen for clang with GNU's libstdc++, so it is a libc++ incompatibility/issue.)

[1] https://cdash.dealii.43-1.org/test/14961686

@tamiko
Copy link
Member Author

tamiko commented Jun 13, 2022

@bangerth (as the one having edited that particular code last) any idea what might be going on?

@drwells
Copy link
Member

drwells commented Jun 14, 2022

I think @bangerth might be on vacation. I can reproduce this on my mac - I'll see if I can make some progress towards understanding the failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants