File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 3030
3131#include < igl/Timer.h>
3232#include < igl/write_triangle_mesh.h>
33+ #include " igl/default_num_threads.h"
34+
3335
3436#ifdef LIBIGL_WITH_TETGEN
3537#include < igl/copyleft/tetgen/tetrahedralize.h>
@@ -277,6 +279,9 @@ int main(int argc, char** argv)
277279 std::cout << " TBB threads " << num_threads << std::endl;
278280 tbb::global_control parallelism_limit (tbb::global_control::max_allowed_parallelism, num_threads);
279281 tbb::global_control stack_size_limit (tbb::global_control::thread_stack_size, stack_size);
282+ // IGL has issues with a nested for loop and oversubscription, see
283+ // https://github.com/libigl/libigl/issues/2412
284+ igl::default_num_threads (std::ceil (std::sqrt (num_threads)));
280285#endif
281286
282287 // if(params.is_quiet){
You can’t perform that action at this time.
0 commit comments