Optimized Intel builds result in segfaults when iterating over the boundary of a macro-face accessing edge unknowns
The following code produces segfaults (only) for Intel 2018 and 2019 release builds:
for ( const auto & it : edgedof::macroface::Iterator( fineLevel, 0 ) )
{
edgeFineData[ edgedof::macroface::index( fineLevel, it.x(), it.y(), edgedof::EdgeDoFOrientation::X ) ] = real_c( 0 );
edgeFineData[ edgedof::macroface::index( fineLevel, it.x(), it.y(), edgedof::EdgeDoFOrientation::XY ) ] = real_c( 0 );
edgeFineData[ edgedof::macroface::index( fineLevel, it.x(), it.y(), edgedof::EdgeDoFOrientation::Y ) ] = real_c( 0 );
}
Compare codebase at b67f0f72 (P2toP2QuadraticProlongation.cpp::prolongateAdditively()
)
Currently replaced with:
const uint_t edgedofFieldSize = face->getData( function.getEdgeDoFFunction().getFaceDataID() )->getSize( fineLevel );
for ( uint_t i = 0; i < edgedofFieldSize; i++ )
{
edgeFineData[i] = real_c( 0 );
}
The replacement appears to produce working code.