Welcome, Guest
Username: Password: Remember me

TOPIC: Speed of the mesher: regression ?

Speed of the mesher: regression ? 1 month 1 day ago #45817

  • nicogodet
  • nicogodet's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 166
  • Thank you received: 40
Hi Alan,

I did a comparative analysis of the speed of the mesher between latest version (3.12.23) and good old fashion 3.3.4 and I have one question:
Why does it take 300s on 3.3.4 while it takes more than 30min on latest ?

Same outline, same cell size.

i5-8365U, 3.12.23 -> 60min
AMD Threadripper PRO 5975WX, 3.12.23 -> 30min
Xeon E3-1270v6, 3.3.4 -> 300sec

Considering this, I'm tempted to stay on 3.3.4 or even move to another mesher.

It does not change the good work you are doing on BK ;)
Regards,
The administrator has disabled public write access.

Speed of the mesher: regression ? 1 month 1 day ago #45818

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 781
  • Thank you received: 188
The focus (for me) has always been on correctness over speed (i.e. performance) because incorrect things can be hard to detect and fix while speed is typically much easier to address given correct processing.

A case in point would be the mapping of strings through 2D and 3D line sets; something that ends up distorting the string values. Or the 1/2 millisecond rounding that was being performed during SLF file loading because of some incorrect underlying date/time functions... etc. etc. ...

That being said, your post is the first performance comparison result that I have ever heard anyone tell me. Please consider sharing an example that I could then use for performance comparison and regression testing.

I'd love to have automated regression tests put in place too... as nothing currently exists. If I can get to this, I'd probably add it along side the UNIT CLI tests so that they can be easily run from a script.

Kindly... Alan
The administrator has disabled public write access.

Speed of the mesher: regression ? 1 month 1 day ago #45820

  • nicogodet
  • nicogodet's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 166
  • Thank you received: 40
I agree correctness should be focused but speed is also crucial :P
Especially when 5min become 30min or 1h.

I joined the outline I used and I wanted to generate a 10m mesh.
270000 nodes once it's generated (which is not a huge mesh).
Attachments:
The administrator has disabled public write access.

Speed of the mesher: regression ? 1 month 1 day ago #45822

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 781
  • Thank you received: 188
Thanks for the outline.

With BK 3.12.23-beta; no outline resampling (which seems to be needed in this case), 1.2 edge growth ratio, default edge length 10, and no auto smoothing.

A new mesh was created with 190,649 nodes and 379,760 edges in 8.5 minutes (see MeshCreationTime in the Meta Data tab). The mesh density ranges from 10 to 517.06.

In one of the recent betas, I increased the number of iterations for auto-smoothing. I may change the interface to allow you to specify a number to control this because the auto-smoothing can certainly take some additional time. The coverage numbers are certainly slowing down near about 91% coverage and then everything completes quickly after that.

How many times per day do you create new meshes?

Kindly... Alan
The administrator has disabled public write access.

Speed of the mesher: regression ? 1 month 1 day ago #45823

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 781
  • Thank you received: 188
With BK 3.12.23-beta; WITH outline resampling, 1.2 edge growth ratio, default edge length 10, and no auto smoothing.

A new mesh was created with 228,277 nodes and 447,505 edges in 21.0 minutes. The mesh density ranges from 10 to 10 (i.e. it is constant).

I will look into this a little more to see why the meshing is taking 21 minutes.

Thanks for raising this point!

Kindly... Alan
The administrator has disabled public write access.

Speed of the mesher: regression ? 1 month 1 day ago #45824

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 781
  • Thank you received: 188
And once more...

With BK 3.12.23-beta; WITH outline resampling, 1.2 edge growth ratio, default edge length 10, and WITH auto smoothing.

A new mesh was created with 228,277 nodes and 447,505 edges in 21.3 minutes. The mesh density ranges from 10 to 10 (i.e. it is constant).

Therefore, the increase in number of iterations used by the "new" autosmoothing iteration count does NOT play a significant role in the overall performance of meshing (only 0.3 minutes / 21.3 minute = 1.4%).

Kindly... Alan
The administrator has disabled public write access.

Speed of the mesher: regression ? 1 month 22 hours ago #45825

  • nicogodet
  • nicogodet's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 166
  • Thank you received: 40
During mesh workflow, I may have to generate it tens of time to do few adjustments (add breakline, density area,…) so 3min or 30min makes a huge difference.

With the provided outline, I will have density from 2 or 3 meters up to around 25 with severals submeshes, hardlines, hardpoints,…

Thanks for looking into it!
The administrator has disabled public write access.

Speed of the mesher: regression ? 1 month 6 hours ago #45827

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 781
  • Thank you received: 188
You're very welcome

Once I finish work I have already committed to in post #45751, I'll create a new beta.

That way, people can help me test all of those changes and be able to use things that they need while I look into what could be optimized in the mesher as raised by you in this thread.

Sound like a reasonable approach to you?

Kindly... Alan
The administrator has disabled public write access.
The following user(s) said Thank You: nicogodet

Speed of the mesher: regression ? 1 month 6 hours ago #45828

  • nicogodet
  • nicogodet's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 166
  • Thank you received: 40
Sounds OK to me!
The administrator has disabled public write access.

Speed of the mesher: regression ? 3 weeks 3 days ago #45864

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 781
  • Thank you received: 188
12 Dec 2024 update...

While performing the upgrade for 2D and 3D line sets, as per post #45751, I also included a few optimization improvements when I saw them.

The following image shows timing results for 2 functions I identified as possible locations for performance optimization.

2024-12-12_BeforeDetailedOptimization.png


As you may observe, they are both invoked 333,378 times using your outline and the former function consumes 53 seconds while the latter consumes 12 seconds. Therefore, if I were to pick, I would focus on the former function and see if I could improve it.

Marching on... Alan
The administrator has disabled public write access.
Moderators: Serrer, a.barton

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.