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

Operator () of a petsc vector is not safe if used together with set() in a threaded loop. #3808

Open
grmnptr opened this issue Mar 19, 2024 · 0 comments

Comments

@grmnptr
Copy link
Contributor

grmnptr commented Mar 19, 2024

If this is used in a threaded loop:

const auto normalized_value = (*grad_container[dim_index])(dof_id_elem) / volume;
grad_container[dim_index]->set(dof_id_elem, normalized_value);

We get the following error:

libMesh terminating:
Assertion `local_index < _local_size' failed.
local_index = 24
_local_size = 0

which comes from the fact that the set function can set _local_size to 0.

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