Skip to content

Commit f6ad1b6

Browse files
committed
Simplify the first switch between release-05 and release-06 versions; Better clarify that the fix is temporary
1 parent 854ab31 commit f6ad1b6

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

ecl/modules/eclCRFinder/src/ECLCRFinderModule.cc

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -249,21 +249,14 @@ void ECLCRFinderModule::event()
249249
// 'find" in a map is faster if the number of seeds is not too large, can be replaced easily once we know what seed cuts we want.
250250
// This is weird: if we are running online, we use behaviour that was in place until release-05,
251251
// otherwise we use the one implemented since release-06
252-
// This is fundamental for avoiding a segfault error caused by veeery noisy ECL events.
253-
if (m_isOnlineProcessing) { // release-05
254-
for (unsigned int pos = 1; pos < m_cellIdToSeedVec.size(); ++pos) {
255-
if (m_cellIdToSeedVec[pos] > 0) {
256-
checkNeighbours(pos, m_tempCRId, 0);
257-
++m_tempCRId; // This is just a number, will be replaced by a consecutive number later in this module
258-
}
259-
}
260-
} else { // release-06 and newer versions
261-
for (unsigned int pos = 1; pos < m_cellIdToSeedVec.size(); ++pos) {
262-
if (m_cellIdToSeedVec[pos] > 0 and m_cellIdToCheckVec[pos] == 0) {
263-
m_cellIdToCheckVec[pos] = 1;
264-
checkNeighbours(pos, m_tempCRId, 0);
265-
++m_tempCRId; // This is just a number, will be replaced by a consecutive number later in this module
266-
}
252+
// This is fundamental for avoiding a segfault error caused by veeery noisy ECL events,
253+
// but note it is a temporary fix.
254+
for (unsigned int pos = 1; pos < m_cellIdToSeedVec.size(); ++pos) {
255+
// check for m_isOnlineProcessing is for release-05 behaviour
256+
if (m_cellIdToSeedVec[pos] > 0 and (m_cellIdToCheckVec[pos] == 0 or m_isOnlineProcessing)) {
257+
if (!m_isOnlineProcessing) m_cellIdToCheckVec[pos] = 1; // release-06 and newer versions
258+
checkNeighbours(pos, m_tempCRId, 0);
259+
++m_tempCRId; // This is just a number, will be replaced by a consecutive number later in this module
267260
}
268261
}
269262

@@ -354,7 +347,8 @@ void ECLCRFinderModule::checkNeighbours(const int cellid, const int tempcrid, co
354347
m_cellIdToTempCRIdVec[neighbour]);
355348
// This is weird: if we are running online, we use behaviour that was in place until release-05,
356349
// otherwise we use the one implemented since release-06
357-
// This is fundamental for avoiding a segfault error caused by veeery noisy ECL events.
350+
// This is fundamental for avoiding a segfault error caused by veeery noisy ECL events,
351+
// but note it is a temporary fix.
358352
if (m_isOnlineProcessing) { // release-05
359353
if (m_cellIdToTempCRIdVec[neighbour] == 0) { // found
360354
checkNeighbours(neighbour, tempcrid, 1);

0 commit comments

Comments
 (0)