[Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
sgrogan
Posts: 5340
Joined: Wed Oct 22, 2014 5:02 pm

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Postby sgrogan » Tue Apr 04, 2017 10:18 pm

gdo35 wrote:I'll try to test with git-builder this week ;)
Thanks gdo35! I really appreciate all the effort! We have a Path guy, a MCAD guy, and a windows guy, advancing the PPA, pretty cool :geek:
gdo35
Posts: 189
Joined: Wed Jan 25, 2012 7:25 pm

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Postby gdo35 » Wed Apr 05, 2017 3:01 pm

sgrogan wrote:Thanks gdo35! I really appreciate all the effort! We have a Path guy, a MCAD guy, and a windows guy, advancing the PPA, pretty cool :geek:
I cannot find myself it that list !!! :lol: :lol: :lol:
I'm more a Linux guy and happy FreeCAD user. ;)

It is just a pleasure to help a little. :)
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Postby abdullah » Sat May 06, 2017 9:07 pm

Hi there!

A user in the spanish forum is asking about how to activate OCCT multithreading in Ubuntu. I found the topic interesting.

I thought OCCT 7.1 from the daily PPA was built with TBB enabled.

1. Does anybody have any information about this?

2. Is there anything one should do to "enable" the multithread support?

3. BTW has anybody benchmarked the effect of OCCT multithread in FC?
User avatar
Kunda1
Posts: 5565
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Postby Kunda1 » Sat May 06, 2017 9:21 pm

@Abdullah check out viewtopic.php?f=10&t=18179&p=142585#p142585 and its partner issue #2750
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
triplus
Posts: 8689
Joined: Mon Dec 12, 2011 4:45 pm

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Postby triplus » Sat May 06, 2017 10:03 pm

As @Kunda1 mentioned this is the relevant bench:

https://forum.freecadweb.org/viewtopic. ... 30#p154815

Best to create 2 macros and after run each once. Look in the report view for the time that was needed for each bench to complete and compare the results. Use Top or System Monitor to observe multi-threading. Note that in both tests some multi-threading will be detected (detected at the end). It is meshing related:

Code: Select all

Part.show(result)
If hardware is fast increase the value of:

Code: Select all

cols = 20
rows = 20
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Postby NormandC » Sat May 06, 2017 10:19 pm

The libopencascade packages used by the freecad-daily PPA are built with libtbb-dev as a dependency and the rules build script enables TBB. But I haven't tested this.
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Postby abdullah » Sun May 07, 2017 1:41 pm

Thank you for your answers.

Ok, so I repeated triplus test, the 100x100 version with 8 cores using Ubuntu's daily build:

OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10993 (Git)
Build type: None
Branch: master
Hash: bf5f3484f6f5506795b6e9b86288c75ab7357291
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0

You can see multitask:
cores8.png
cores8.png (527 Bytes) Viewed 2241 times
However:
1. Multi-thread is not used during the whole time.
2. Not everytime that multi-thread is used the 8 cores are running

Results:
314.795207024s - 100x100
222.212337971s - 100x100


So you need about the 70% of the time for the same operation.
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Postby abdullah » Sun May 07, 2017 1:52 pm

So, if understood it correctly, when you use operations that are optimized in OCCT for multithread, you get the boost in performance.

I have some follow-up questions:
1. Which operations are generally optimized?
2. What needs to be done in FreeCAD so that in the general workflow (e.g. Part Design) we get this boost?
damian
Posts: 583
Joined: Sun May 31, 2015 6:16 pm

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Postby damian » Sun May 07, 2017 2:44 pm

hello @abdullah:
abdullah wrote:1. Which operations are generally optimized?
I think all the operations based on the GeneralFuse algorithm.

Code: Select all

shape=Part.Shape()
shape.cut.__doc__
'Difference of this and a given (list of) topo shape\ncut(tool) -> Shape\n  or\ncut((tool1,tool2,...),[tolerance=0.0]) -> Shape\n\nSubstraction of this and a given list of topo shapes.\n\nSupports:\n- Fuzzy Boolean operations (global tolerance for a Boolean operation)\n- Support of multiple arguments for a single Boolean operation\n- Parallelization of Boolean Operations algorithm\n\nOCC 6.9.0 or later is required.'
The complete explanation in the OCCT documentation, chapter User Guides
https://www.opencascade.com/doc/occt-7. ... gorithms_1
The Boolean Component contains:

General Fuse Operator (GFA),
Boolean Operator (BOA),
Section Operator (SA),
Partition Operator (PA).

GFA is the base algorithm for BOA, PA, SA.
Uhf! What's Partition Operator (PA)?
EDIT: fix typos
triplus
Posts: 8689
Joined: Mon Dec 12, 2011 4:45 pm

Re: [Ubuntu Daily PPA] Transitioning to OCCT7, VTK7...

Postby triplus » Mon May 08, 2017 12:11 am

abdullah wrote:So, if understood it correctly, when you use operations that are optimized in OCCT for multithread, you get the boost in performance.

I have some follow-up questions:
1. Which operations are generally optimized?
2. What needs to be done in FreeCAD so that in the general workflow (e.g. Part Design) we get this boost?
For some operations you don't need to do anything as the support is there by default. For example:

Code: Select all

Part.show(shape)
Latest OCC/OCE should use algorithms that do this in parallel. As for boolean operations here is a list of the current situation in FreeCAD:

https://forum.freecadweb.org/viewtopic. ... 30#p143338

And some more info:

https://forum.freecadweb.org/viewtopic. ... 10#p151947