Skip to content

Commit 69549b0

Browse files
committed
Warn about active parts inside passive parallel regions.
1 parent 389a08b commit 69549b0

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

include/opdi/logic/omp/implicitTaskOmpLogic.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
*/
2525

2626
#include "../../config.hpp"
27+
#include "../../helpers/exceptions.hpp"
2728
#include "../../tool/toolInterface.hpp"
2829

2930
#include "instrument/ompLogicInstrumentInterface.hpp"
@@ -97,6 +98,14 @@ void opdi::ImplicitTaskOmpLogic::onImplicitTaskEnd(void* dataPtr) {
9798
tool->getTapePosition(data->parallelData->tapes[data->index],
9899
data->parallelData->positions[data->index].back());
99100

101+
if (!data->parallelData->activeParallelRegion) {
102+
if (tool->comparePosition(data->parallelData->positions[data->index].front(),
103+
data->parallelData->positions[data->index].back()) != 0) {
104+
OPDI_WARNING("Something became active during a passive parallel region. This is not supported and will not be ",
105+
"differentiated correctly.");
106+
}
107+
}
108+
100109
#if OPDI_OMP_LOGIC_INSTRUMENT
101110
for (auto& instrument : ompLogicInstruments) {
102111
instrument->onImplicitTaskEnd(data);

0 commit comments

Comments
 (0)