There is a new feature in FEM that needs testing on different OSes:
It is now possible to run Elmer with several CPU cores.
-----------------
How?
- in the FEM WB go to the preferences and set for Elmer the number to a value > 1
- run Elmer as usual
Background info:
Elmer divides the mesh to portions equal to the number of used CPU cores. This a different approach than CalculiX and has some drawbacks:
- depending on your mesh a smaller number of CPU cores can run faster than using more cores
- in some cases using e.g 12 cored does not converge while 8 cores will work fine. The reason is that at some point the mesh portions become too small.
So in the end it is often necessary to adjust the number of cores, depending on the mesh.
Features?
- you can specify the number of used cores. As described, this is important
- FreeCAD can now import "Parallel (Partitioned) VTK Unstructured Data" files (*.pvtu). A *.pvtu is the result of a multi-threaded run but you can also now just load a *.ptvu you got from elsewhere.
- by default FreeCAD filters the results so that the mesh portion boundaries will become transparent too. However, to purposely made the mesh portion boundaries visible, there is a preferences option to turn off the filtering, see the images below.
Known limitation:
- for some simulation types you first need to install modules to Elmer to enable multi-threading. Check the Elmer report for info about this. A typical case is that for direct solving one has to install the MUMPS module.
Result of a heated metal rod put into streaming air:
The simulation was performed using 12 CPU cores and took 38 seconds. Down to 8 used cores the run time keeps at 42. With only one core the time increases up to 142 seconds.
When turning off the the filtering, you can see the mesh part portions:
[announcement] multi-threading for Elmer
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: [announcement] multi-threading for Elmer
Awesome news! Thanks uwe for this feature!
For those interested in testing, will this be backported and released in new minor-version OR is it assumed that testers should download the latest development versions for their respected platforms?
Edit: JFYI, Snap edge users will be able to test this feature once the new build has finished (~60+ minutes from now).
For those interested in testing, will this be backported and released in new minor-version OR is it assumed that testers should download the latest development versions for their respected platforms?
Edit: JFYI, Snap edge users will be able to test this feature once the new build has finished (~60+ minutes from now).
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
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
Re: [announcement] multi-threading for Elmer
This is new feature and changes the workflow significantly, therefore this will not be backported. I also expect that sooner or later some issue are discovered. I merged it to master to get more feedback and testing.
Re: [announcement] multi-threading for Elmer
Thanks!
I have tried to run multi-thread - all works. If I set one core in pereferences then Elmer runs one thread for assembling matrices stage and four threads for calculation stage (I have four thread CPU). If I set four cores then Elmer runs four threads on all stages.
But there is error in pereferences menu. When I changes number of cores then FreeCAD prints errors:
I have tried to run multi-thread - all works. If I set one core in pereferences then Elmer runs one thread for assembling matrices stage and four threads for calculation stage (I have four thread CPU). If I set four cores then Elmer runs four threads on all stages.
But there is error in pereferences menu. When I changes number of cores then FreeCAD prints errors:
After I closed menu I can't open it - error appears:16:25:24 Unhandled std::exception caught in GUIApplication::notify.
The error message is: basic_string::substr: __pos (which is 18446744073709551612) > this->size() (which is 0)
16:26:03 C++ exception thrown (basic_string::substr: __pos (which is 18446744073709551612) > this->size() (which is 0))
Code: Select all
OS: Linux Mint 20.3 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.21.29667 (Git)
Build type: Unknown
Branch: upstream/master
Hash: fba4663baa4a8b0932115700e3b726d04bf719b8
Python 3.8.10, Qt 5.12.8, Coin 4.0.0, Vtk 7.1.1, OCC 7.5.2
Locale: Russian/Russia (ru_RU)
Re: [announcement] multi-threading for Elmer
Am i right if i say that FC mis use backporting quite often? In my opinion backporting is mainly about fixing bugs and everything that can be seen as a Feature is just the next release...
Re: [announcement] multi-threading for Elmer
Where for example?
Jee-Bee wrote: ↑Tue Jul 19, 2022 3:55 pm In my opinion backporting is mainly about fixing bugs and everything that can be seen as a Feature is just the next release...
Sure, see https://forum.freecadweb.org/viewtopic. ... 58#p610658