Skip to content

Commit 70494e0

Browse files
committed
- openmp issue with msvc llvm
only a variable or static data member can be used in a data-sharing clause
1 parent cdf562e commit 70494e0

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

copasi/optimization/COptMethodSS.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -694,10 +694,10 @@ bool COptMethodSS::combination(void)
694694
C_INT32 improvement; // count iterations with improvement in go-beyond strategy
695695

696696
// signal no children yet
697-
mChildrenGenerated = false;
697+
bool childrenGenerated = false;
698698

699699
// generate children for each member of the population
700-
#pragma omp parallel for reduction(| : mChildrenGenerated) schedule(runtime)
700+
#pragma omp parallel for reduction(| : childrenGenerated) schedule(runtime)
701701
for (size_t i = 0; i < mPopulationSize; i++)
702702
{
703703
C_FLOAT64 alpha; // 1 or -1
@@ -796,7 +796,7 @@ bool COptMethodSS::combination(void)
796796
mStuck[i] = 0;
797797

798798
// signal we have generated a child (improvement)
799-
mChildrenGenerated = true;
799+
childrenGenerated = true;
800800
}
801801
}
802802
}
@@ -869,6 +869,8 @@ bool COptMethodSS::combination(void)
869869
}
870870
}
871871

872+
mChildrenGenerated = childrenGenerated;
873+
872874
return true;
873875
}
874876

0 commit comments

Comments
 (0)