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

Try to work around an Intel compiler issue. #15390

Merged
merged 2 commits into from
Jun 21, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 9 additions & 5 deletions source/dofs/dof_handler_policy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3529,14 +3529,18 @@ namespace internal
cell->active_fe_index(),
DoFAccessorImplementation::Implementation::
DoFIndexProcessor<dim, spacedim>(),
[&complete](auto &stored_index, auto received_index) {
if (*received_index != numbers::invalid_dof_index)

// Intel ICC 19 and earlier for some reason believe that
// numbers::invalid_dof_index is not a valid object
// inside the lambda function. Fix this by creating a
// local variable initialized by the global one.
[&complete, invalid_dof_index = numbers::invalid_dof_index](
auto &stored_index, const auto received_index) {
if (*received_index != invalid_dof_index)
{
# if !defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1900
Assert((stored_index == (numbers::invalid_dof_index)) ||
Assert((stored_index == (invalid_dof_index)) ||
(stored_index == *received_index),
ExcInternalError());
# endif
stored_index = *received_index;
}
else
Expand Down