eclipseo / rpms / blender

Forked from rpms/blender 10 days ago
Clone
fb8bb92
From 043c52d3d2df6f6d0780acd02a3dd4e25b7ba7f0 Mon Sep 17 00:00:00 2001
fb8bb92
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
fb8bb92
Date: Wed, 3 Apr 2019 01:36:52 +0200
fb8bb92
Subject: [PATCH] Fix for GCC9 new OpenMP data sharing
fb8bb92
MIME-Version: 1.0
fb8bb92
Content-Type: text/plain; charset=UTF-8
fb8bb92
Content-Transfer-Encoding: 8bit
fb8bb92
fb8bb92
GCC 9 started implementing the OpenMP 4.0 and later behavior. When not using
fb8bb92
default clause or when using default(shared), this makes no difference, but
fb8bb92
if using default(none), previously the choice was not specify the const
fb8bb92
qualified variables on the construct at all, or specify in firstprivate
fb8bb92
clause. In GCC 9 as well as for OpenMP 4.0 compliance, those variables need
fb8bb92
to be specified on constructs in which they are used, either in shared or
fb8bb92
in firstprivate clause. Specifying them in firstprivate clause is one way to
fb8bb92
achieve compatibility with both older GCC versions and GCC 9,
fb8bb92
another option is to drop the default(none) clause.
fb8bb92
fb8bb92
This patch thus drops the default(none) clause.
fb8bb92
fb8bb92
See https://gcc.gnu.org/gcc-9/porting_to.html#ompdatasharing
fb8bb92
fb8bb92
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
fb8bb92
---
fb8bb92
 intern/elbeem/intern/solver_main.cpp | 6 +++---
fb8bb92
 1 file changed, 3 insertions(+), 3 deletions(-)
fb8bb92
fb8bb92
diff --git a/intern/elbeem/intern/solver_main.cpp b/intern/elbeem/intern/solver_main.cpp
fb8bb92
index 68f7c04cd54..514087b6130 100644
fb8bb92
--- a/intern/elbeem/intern/solver_main.cpp
fb8bb92
+++ b/intern/elbeem/intern/solver_main.cpp
fb8bb92
@@ -381,7 +381,7 @@ LbmFsgrSolver::mainLoop(const int lev)
fb8bb92
 	GRID_REGION_INIT();
fb8bb92
 #if PARALLEL==1
fb8bb92
 	const int gDebugLevel = ::gDebugLevel;
fb8bb92
-#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
fb8bb92
+#pragma omp parallel num_threads(mNumOMPThreads) \
fb8bb92
   reduction(+: \
fb8bb92
 	  calcCurrentMass,calcCurrentVolume, \
fb8bb92
 		calcCellsFilled,calcCellsEmptied, \
fb8bb92
@@ -1126,7 +1126,7 @@ LbmFsgrSolver::preinitGrids()
fb8bb92
 		GRID_REGION_INIT();
fb8bb92
 #if PARALLEL==1
fb8bb92
 	const int gDebugLevel = ::gDebugLevel;
fb8bb92
-#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
fb8bb92
+#pragma omp parallel num_threads(mNumOMPThreads) \
fb8bb92
   reduction(+: \
fb8bb92
 	  calcCurrentMass,calcCurrentVolume, \
fb8bb92
 		calcCellsFilled,calcCellsEmptied, \
fb8bb92
@@ -1164,7 +1164,7 @@ LbmFsgrSolver::standingFluidPreinit()
fb8bb92
 	GRID_REGION_INIT();
fb8bb92
 #if PARALLEL==1
fb8bb92
 	const int gDebugLevel = ::gDebugLevel;
fb8bb92
-#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
fb8bb92
+#pragma omp parallel num_threads(mNumOMPThreads) \
fb8bb92
   reduction(+: \
fb8bb92
 	  calcCurrentMass,calcCurrentVolume, \
fb8bb92
 		calcCellsFilled,calcCellsEmptied, \
fb8bb92
-- 
fb8bb92
2.20.1
fb8bb92