gnu: Add kafs-client
[jackhill/guix/guix.git] / gnu / packages / patches / blender-2.79-gcc9.patch
1 commit e6d803fd4a383cecf8c643095f093a31c944b785
2 Author: Robert-André Mauchin <zebob.m@gmail.com>
3 Date: Wed Apr 3 01:36:52 2019 +0200
4
5 Fix for GCC9 new OpenMP data sharing
6
7 GCC 9 started implementing the OpenMP 4.0 and later behavior. When not using
8 default clause or when using default(shared), this makes no difference, but
9 if using default(none), previously the choice was not specify the const
10 qualified variables on the construct at all, or specify in firstprivate
11 clause. In GCC 9 as well as for OpenMP 4.0 compliance, those variables need
12 to be specified on constructs in which they are used, either in shared or
13 in firstprivate clause. Specifying them in firstprivate clause is one way to
14 achieve compatibility with both older GCC versions and GCC 9,
15 another option is to drop the default(none) clause.
16
17 This patch thus drops the default(none) clause.
18
19 See https://gcc.gnu.org/gcc-9/porting_to.html#ompdatasharing
20
21 Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
22
23 diff --git a/intern/elbeem/intern/solver_main.cpp b/intern/elbeem/intern/solver_main.cpp
24 index 68f7c04cd54..514087b6130 100644
25 --- a/intern/elbeem/intern/solver_main.cpp
26 +++ b/intern/elbeem/intern/solver_main.cpp
27 @@ -381,7 +381,7 @@ LbmFsgrSolver::mainLoop(const int lev)
28 GRID_REGION_INIT();
29 #if PARALLEL==1
30 const int gDebugLevel = ::gDebugLevel;
31 -#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
32 +#pragma omp parallel num_threads(mNumOMPThreads) \
33 reduction(+: \
34 calcCurrentMass,calcCurrentVolume, \
35 calcCellsFilled,calcCellsEmptied, \
36 @@ -1126,7 +1126,7 @@ LbmFsgrSolver::preinitGrids()
37 GRID_REGION_INIT();
38 #if PARALLEL==1
39 const int gDebugLevel = ::gDebugLevel;
40 -#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
41 +#pragma omp parallel num_threads(mNumOMPThreads) \
42 reduction(+: \
43 calcCurrentMass,calcCurrentVolume, \
44 calcCellsFilled,calcCellsEmptied, \
45 @@ -1164,7 +1164,7 @@ LbmFsgrSolver::standingFluidPreinit()
46 GRID_REGION_INIT();
47 #if PARALLEL==1
48 const int gDebugLevel = ::gDebugLevel;
49 -#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
50 +#pragma omp parallel num_threads(mNumOMPThreads) \
51 reduction(+: \
52 calcCurrentMass,calcCurrentVolume, \
53 calcCellsFilled,calcCellsEmptied, \