From 5a9b48790f691946cb9c45d476250ae11e7306dd Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Wed, 12 Apr 2023 13:56:49 +0200 Subject: [PATCH] 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. --- src/GMSHPlugin/GMSHPlugin_Mesher.cxx | 7 +++++++ 1 file changed, 7 insertions(+) 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 } -- 2.39.2