Almost one threaded optimizing particle congestion

Just thought it was multithreaded. But it is not. 10% of cpu…

aur cache 1.33 GB (1 435 243 420 bytes)

Is it bug or not ?

P.S. Why anyone need 2990wx, when it is not utilized at all :smile:

Pre render

Build Mesh start for PhoenixFDLiquid002 t:19776, moblur time:0.000000
Build Mesh: displ scale:0.895692
Build Mesh: march cubes build smap:0.021267
Build Mesh: march cubes vertices:0.509866
Build Mesh: march cubes interest:0.034506
Build Mesh: march cubes conn time: 0.227092 result vertices:3064706 triangles:6123368
Build Mesh: extend time 0.000000 vertices:3064706 triangles:6123368
Build Mesh: smooth 2.596157
Build Mesh: calculate normals 0.023753
Build Mesh: normals smoothing:0.036586
Build Mesh: vertices:3064706 triangles:6123368 time:3.667011
Build Mesh: resize 3ds Max buffers, time:0.007038
Build Mesh: build vertices, time:0.065959
Build Mesh: build faces, time:0.085476
Build Mesh: processMeshCache, time:0.008178
Build Mesh: fill normals, time:0.763463
Build Mesh: freeing data, time:0.024172
Build Mesh: Complete.

prepareRenderData of 198e370 PhoenixFDLiquid001_SplashesShader
set liquid
prepareRenderData() of PhoenixFDLiquid001 19776
VolumeShader::setGridSize: 282 345 66
prepareRenderData of f0328100 PhoenixFDLiquid001_FoamShader001
set liquid
prepareRenderData() of PhoenixFDLiquid001 19776
VolumeShader::setGridSize: 282 345 66
prepareRenderData of 2053390 PhoenixFDLiquid001_FoamShader002
set liquid
prepareRenderData() of PhoenixFDLiquid001 19776
VolumeShader::setGridSize: 282 345 66
prepareRenderData of 6e78e380 PhoenixFDLiquid002_FoamShader
set liquid
prepareRenderData() of PhoenixFDLiquid002 19776
VolumeShader::setGridSize: 920 584 66
PhoenixFrameData refCount++ 3CE19C80 2, I:0, D:\bgg\sim\watery_fin.max_Phoenix_frames\PhoenixFDLiquid002_0103.aur
PhoenixFrameData refCount++ 3CE19C80 3, I:0, D:\bgg\sim\watery_fin.max_Phoenix_frames\PhoenixFDLiquid002_0103.aur
liquid frame = 3CE19C80
prepareRenderData of 619a32a0 PhoenixFDLiquid002_SplashesShader
set liquid
prepareRenderData() of PhoenixFDLiquid002 19776
VolumeShader::setGridSize: 920 584 66
PhoenixFrameData refCount++ 3CE19C80 4, I:0, D:\bgg\sim\watery_fin.max_Phoenix_frames\PhoenixFDLiquid002_0103.aur
PhoenixFrameData refCount++ 3CE19C80 5, I:0, D:\bgg\sim\watery_fin.max_Phoenix_frames\PhoenixFDLiquid002_0103.aur
liquid frame = 3CE19C80

Build Mesh start for PhoenixFDLiquid002 t:19776, moblur time:0.000000
Build Mesh: displ scale:0.895692
Build Mesh: march cubes build smap:0.021104
Build Mesh: march cubes vertices:0.519237
Build Mesh: march cubes interest:0.028356
Build Mesh: march cubes conn time: 0.232574 result vertices:3064706 triangles:6123368
Build Mesh: extend time 0.000000 vertices:3064706 triangles:6123368
Build Mesh: smooth 2.573507
Build Mesh: calculate normals 0.023223
Build Mesh: normals smoothing:0.034592
Build Mesh: vertices:3064706 triangles:6123368 time:3.631768
Build Mesh: resize 3ds Max buffers, time:0.006594
Build Mesh: build vertices, time:0.063329
Build Mesh: build faces, time:0.086335
Build Mesh: processMeshCache, time:0.008262
Build Mesh: fill normals, time:0.695811
Build Mesh: freeing data, time:0.025410
Build Mesh: Complete.

interfaces: Sp:0 pg:0 pobjx:ef682b88
skip empty particle system Particles [Splashes] of [PhoenixFDLiquid001]
interfaces: Sp:0 pg:0 pobjx:ef682b88
skip empty particle system Particles [Foam] of [PhoenixFDLiquid001]
interfaces: Sp:0 pg:0 pobjx:ef682b88
skip empty particle system Particles [Foam] of [PhoenixFDLiquid001]
interfaces: Sp:0 pg:0 pobjx:ea3cda68
particles to collect:181293124

http://joxi.ru/BA01RoWcMJkGKr

So it’s 10% (or 18%…) from the beginning of the phase till the end?

How do your particles look like?

Nice.
http://joxi.ru/Grqvyp9S4Q7p6m

edit

particles look like this

[GRID: 35 460 480 cells, 920x584x66]
- Liquid/Temperature (0.00 : 1.00)
[PARTICLES]
- Liquid: 4 346 178 (Pos,Vel,ID)
- Foam: 181 293 124 (Pos,Vel,ID)
- Splashes: 75 489 (Pos,Vel,ID)
- Mist: 0
- WetMap: 0
* Simulated with v3.12.01 Nightly, Build ID: 2018111328690 for 3ds Max 2019 from Nov 13 2018

http://joxi.ru/RmzbzZVhY0gpnm

Okay, and now you post your particle shader settings and a crash dump and this thread might start to have some value :slight_smile:

Thank you!

I forgot that ftp, where I could upload cache files. Also no dump, 3dsmax is working :slight_smile:

Yup, please drop a mail to Support and they will send you the credentials - it’s not okay to share them publicly.

Do you have count multiplier or size addend or multiplier?

Nop, just bubbles. But, already overridden the cache files (overnight script damn :frowning: ), but will recreate that thing maybe next week. Just thought it was a known issue (like sometimes you guys saying).

Nope not a known issue, but these are a huge bunch of particles and it probably is related to the number of particles. That phase is multithreaded, and looking at the code, I’m thinking about ways to break it. Optimizing congestion does two things:
- deleting bubbles entirely inside other bubbles - this is thread safe and should scale perfectly.
- shrinking bubbles that overlap - this can break if you have a lot of overlapping bubbles. Each thread can shrink only one pair of bubbles at a time, so if you have places where there are more overlapping bubbles than you have threads, this will kill the CPU load. You can also force it to break if you make the bubbles larger using a size multiplier or addend, or if you use the count multiplier to make even more particles. Usually the simulation should not produce bubbles that overlap a lot, but it’s not impossible.

I’m using some very noisy emitters to disturb water, so it will look like turbulent river flow. I had 1hour per frame with 500millions of foam particles. 5gb per frame :slight_smile: So, maybe some parameters, to manually limit foam amount, like density per area or smth like that…

159mil of points wasn’t single threaded. Gonna try bubbles.

Still sometimes single threaded

http://joxi.ru/5mdvQq3S38naZA

This is a pretty picture, but without a scene or a log, it can’t really help…

I need boiling fixed first :slight_smile: Then will report single threaded properly!

I don’t see a connection, so it’s up to you.