Page MenuHome

Mantaflow [Part 1]: Added preprocessed Mantaflow source files
ClosedPublic

Authored by Sebastián Barschkis (sebbas) on Oct 29 2018, 3:00 PM.

Diff Detail

Repository
rB Blender
Branch
mantaFiles (branched from blender2.8)
Build Status
Buildable 2320
Build 2320: arc lint + arc unit

Event Timeline

Updated pp files include fixes for outflow at domain walls (liquids in general and secondary particles).

Just another Mantaflow source file update.

Not much to say here, besides that we try to get rid of OMP in Blender code, so might be better to default to tbb, unless there is a good reason not to do so?

Also more a topic for @Sergey Sharybin (sergey), but iirc with tbb we should be able to integrate it to our threading management system at some point (to avoid having too much running threads, which is very inefficient), while that would not be possible with OMP?

source/blender/editors/interface/interface.c
737–743 ↗(On Diff #14642)

This looks like unintended diff glitch?

Okay, it's actually very good that we talk about OpenMP & TBB. I made some tests and it appears that TBB generally performs much, much better (e.g. smoke scenes 50% faster with TBB, @Juan Gea (juang3d) had similar results).

I would also say the default should be TBB. In the future we might remove OpenMP altogether. @Nils Thuerey (n_t) or would you say that some development will only take place in OpenMP, i.e. any drawbacks using just TBB?

@Sebastián Barschkis (sebbas) yes, good idea - we're using TBB with mantaflow for a long time now, and it works very nicely. We also saw performance gains in the past, less than 50%, but gains nonetheless. So I don't see a reason not to focus on TBB. That way we could also get rid of the somewhat redundant code for OpenMP.

Updated diff with latest changes from fluid-mantaflow branch

source/blender/editors/interface/interface.c
737–743 ↗(On Diff #14642)

Please fix this, that change is most likely not wanted, and has definitively nothing to do here!

source/blender/editors/interface/interface.c
737–743 ↗(On Diff #14642)

eeeeeh sorry, did not saw I was on old diff, stupid phab...

Would be nice if we could strip out the OMP part then if we do not use it, also not critical point imho, would help reduce size of the lib...

This revision is now accepted and ready to land.Nov 18 2019, 3:31 PM

Yes, there is no need to have the OMP source files lying around. The updated diff now only has TBB files.

I also moved the files to extern/ which is much more suitable as we discussed.

Just an additional minor fix for this diff.

Sergey Sharybin (sergey) requested changes to this revision.Dec 10 2019, 2:26 PM

The following files have their own main() so they can not be used by Blender and i suggest to simply remove them:

  • extern/mantaflow/dependencies/cnpy/example1.cpp
  • extern/mantaflow/helper/pwrapper/pymain.cpp

Do we need *.reg files?

Also, make sure all files have native EOL. dos2unix for the help! :)

This revision now requires changes to proceed.Dec 10 2019, 2:26 PM

Yes, the 2 files with main() are not needed and can be removed. Same is true for all the *.reg files.

The manta update script (extern/mantaflow/UPDATE.sh) now also makes a call to dos2unix before copying over the source files. So they'll always be formatted correctly after updating them.

I'll first commit everyting into fluid-mantaflow and then update the patches.

fc557cdd138c has the updates for this diff.

This + update looks good to me.

This revision is now accepted and ready to land.Dec 10 2019, 4:22 PM

Updated diff with latest changes from fluid-mantaflow branch

Updated diff with latest changes from fluid-mantaflow branch