From: Nabil Ghodbane Date: Wed, 12 Apr 2023 11:56:49 +0000 (+0200) Subject: spns #34443: on Windows, if HXT algorithm is used, ensure number of threads for this... X-Git-Tag: V9_11_0a1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5a9b48790f691946cb9c45d476250ae11e7306dd;p=plugins%2Fgmshplugin.git spns #34443: on Windows, if HXT algorithm is used, ensure number of threads for this 3D algorithm is set to 1.Computation will fail otherwise. --- diff --git a/src/GMSHPlugin/GMSHPlugin_Mesher.cxx b/src/GMSHPlugin/GMSHPlugin_Mesher.cxx index 4ce6c58..92b5030 100644 --- a/src/GMSHPlugin/GMSHPlugin_Mesher.cxx +++ b/src/GMSHPlugin/GMSHPlugin_Mesher.cxx @@ -329,6 +329,13 @@ void GMSHPlugin_Mesher::SetGmshOptions() **/ ok = GmshSetOption("General", "NumThreads" , _maxThreads ) ; // system default i.e. OMP_NUM_THREADS ASSERT(ok); +#ifdef WIN32 + if ( GMSHPlugin_Hypothesis::Algo3D::hxt == _algo3d ){ + MESSAGE("GMSHPlugin_Mesher::SetGmshOptions: HXT algorithm is being used. Setting number of threads to 1."); + ok = GmshSetOption("Mesh", "MaxNumThreads3D" , 1. ); + ASSERT(ok); + } // hxt +#endif #endif }