100% Multi-Core Utilisation

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
wmayer
Founder
Posts: 20317
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: 100% Multi-Core Utilisation

Post by wmayer »

This all makes sense, as the computation required by the solver on a sketch-by-sketch basis is considerably reduced, but I'm still a little confused as to why all 12 cores were being locked on a (largely) single-threaded application.
Some 3rd party libraries do some multi-threading like the CAD kernel OCC for boolean operations or the tessellation to create a display mesh from the model. The Eigen3 library which is heavily used for the Sketcher also supports multi-threading but don't know if it's activated there.
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: 100% Multi-Core Utilisation

Post by easyw-fc »

wmayer wrote: Fri Jun 28, 2019 8:42 am Some 3rd party libraries do some multi-threading like the CAD kernel OCC for boolean operations or the tessellation to create a display mesh from the model. The Eigen3 library which is heavily used for the Sketcher also supports multi-threading but don't know if it's activated there.
Hi @Werner
I switched my home pc to Linux and I noticed that FC mainly acts as single thread also when loading STEP files or doing Boolean operations...
Edit:
I would like to help in debugging this to allow multi-threading also on linux, like it acts on windows...
Please let me know if I can provide help files/scripts to test multi-threading.

Maurice
Last edited by easyw-fc on Fri Jun 28, 2019 11:54 am, edited 1 time in total.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: 100% Multi-Core Utilisation

Post by Kunda1 »

This all makes sense, as the computation required by the solver on a sketch-by-sketch basis is considerably reduced, but I'm still a little confused as to why all 12 cores were being locked on a (largely) single-threaded application.
Some 3rd party libraries do some multi-threading like the CAD kernel OCC for boolean operations or the tessellation to create a display mesh from the model. The Eigen3 library which is heavily used for the Sketcher also supports multi-threading but don't know if it's activated there.
Multithreading
#documentation
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
wmayer
Founder
Posts: 20317
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: 100% Multi-Core Utilisation

Post by wmayer »

So, far the only functions that support multi-threading I know of are boolean operations, tessellation and the shape checker. No idea which other algorithms also support multi-threading.
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: 100% Multi-Core Utilisation

Post by TheMarkster »

easyw-fc wrote: Fri Jun 28, 2019 9:26 am
wmayer wrote: Fri Jun 28, 2019 8:42 am Some 3rd party libraries do some multi-threading like the CAD kernel OCC for boolean operations or the tessellation to create a display mesh from the model. The Eigen3 library which is heavily used for the Sketcher also supports multi-threading but don't know if it's activated there.
Hi @Werner
I switched my home pc to Linux and I noticed that FC mainly acts as single thread also when loading STEP files or doing Boolean operations...
Edit:
I would like to help in debugging this to allow multi-threading also on linux, like it acts on windows...
Please let me know if I can provide help files/scripts to test multi-threading.

Maurice

Found this on stack exchange:

In linux the terminal command

export OMP_NUM_THREADS=<num>
will do the trick. FC does a lot more than modelling: gmsh, FEM, etc.

https://unix.stackexchange.com/question ... iple-cores
Post Reply