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:
-rw-r--r--intern/elbeem/intern/simulation_object.cpp3
-rw-r--r--source/blender/modifiers/intern/MOD_fluidsim_util.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/intern/elbeem/intern/simulation_object.cpp b/intern/elbeem/intern/simulation_object.cpp
index 4227351f988..d89b28bbf7a 100644
--- a/intern/elbeem/intern/simulation_object.cpp
+++ b/intern/elbeem/intern/simulation_object.cpp
@@ -73,7 +73,7 @@ SimulationObject::~SimulationObject()
debMsgStd("SimulationObject",DM_MSG,"El'Beem Done!\n",10);
#if PARALLEL==1
omp_set_num_threads(omp_threadcache);
- printf("Resetting omp_threads to cached vakue %d \n", omp_threadcache);
+ printf("Resetting omp_threads to cached value %d \n", omp_threadcache);
#endif
}
@@ -185,6 +185,7 @@ int SimulationObject::initializeLbmSimulation(ntlRenderGlobals *glob)
mpLbm->setSmoothing(1.0 * mpElbeemSettings->surfaceSmoothing, 1.0 * mpElbeemSettings->surfaceSmoothing);
mpLbm->setIsoSubdivs(mpElbeemSettings->surfaceSubdivs);
#if PARALLEL==1
+ omp_threadcache = omp_get_max_threads();
omp_set_num_threads(mpElbeemSettings->threads);
printf("Setting omp_threads to usersetting %d \n", mpElbeemSettings->threads);
#endif
diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.c b/source/blender/modifiers/intern/MOD_fluidsim_util.c
index 6afe121be90..ed42a30b351 100644
--- a/source/blender/modifiers/intern/MOD_fluidsim_util.c
+++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c
@@ -46,6 +46,7 @@
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
+#include "BLI_threads.h"
#include "BKE_main.h"
#include "BKE_fluidsim.h" /* ensure definitions here match */
@@ -75,7 +76,7 @@ void fluidsim_init(FluidsimModifierData *fluidmd)
fss->fmd = fluidmd;
fss->type = OB_FLUIDSIM_ENABLE;
- fss->threads = 4;
+ fss->threads = BLI_system_thread_count();
fss->show_advancedoptions = 0;
fss->resolutionxyz = 65;