Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert-André Mauchin <zebob.m@gmail.com>2019-04-03 02:36:52 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-04-07 12:20:50 +0300
commitd780409156e838e366f4da5126e6aeab44174d62 (patch)
tree66176ec5353c6d40d94abca65846dec8642e9516
parent44b54baf96798378374451e63470b7e63175c84d (diff)
Fix for GCC9 new OpenMP data sharing
GCC 9 started implementing the OpenMP 4.0 and later behavior. When not using default clause or when using default(shared), this makes no difference, but if using default(none), previously the choice was not specify the const qualified variables on the construct at all, or specify in firstprivate clause. In GCC 9 as well as for OpenMP 4.0 compliance, those variables need to be specified on constructs in which they are used, either in shared or in firstprivate clause. Specifying them in firstprivate clause is one way to achieve compatibility with both older GCC versions and GCC 9, another option is to drop the default(none) clause. This patch thus drops the default(none) clause. See https://gcc.gnu.org/gcc-9/porting_to.html#ompdatasharing Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
-rw-r--r--intern/elbeem/intern/solver_main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/elbeem/intern/solver_main.cpp b/intern/elbeem/intern/solver_main.cpp
index 68f7c04cd54..514087b6130 100644
--- a/intern/elbeem/intern/solver_main.cpp
+++ b/intern/elbeem/intern/solver_main.cpp
@@ -381,7 +381,7 @@ LbmFsgrSolver::mainLoop(const int lev)
GRID_REGION_INIT();
#if PARALLEL==1
const int gDebugLevel = ::gDebugLevel;
-#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
+#pragma omp parallel num_threads(mNumOMPThreads) \
reduction(+: \
calcCurrentMass,calcCurrentVolume, \
calcCellsFilled,calcCellsEmptied, \
@@ -1126,7 +1126,7 @@ LbmFsgrSolver::preinitGrids()
GRID_REGION_INIT();
#if PARALLEL==1
const int gDebugLevel = ::gDebugLevel;
-#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
+#pragma omp parallel num_threads(mNumOMPThreads) \
reduction(+: \
calcCurrentMass,calcCurrentVolume, \
calcCellsFilled,calcCellsEmptied, \
@@ -1164,7 +1164,7 @@ LbmFsgrSolver::standingFluidPreinit()
GRID_REGION_INIT();
#if PARALLEL==1
const int gDebugLevel = ::gDebugLevel;
-#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
+#pragma omp parallel num_threads(mNumOMPThreads) \
reduction(+: \
calcCurrentMass,calcCurrentVolume, \
calcCellsFilled,calcCellsEmptied, \