SPHinXsys icon indicating copy to clipboard operation
SPHinXsys copied to clipboard

Use `tbb::affinity_partitioner` according to documentation

Open FabienPean-Virtonomy opened this issue 1 year ago • 2 comments

Following example https://oneapi-src.github.io/oneTBB/main/tbb_userguide/Bandwidth_and_Cache_Affinity_os.html

FabienPean-Virtonomy avatar Jun 13 '23 15:06 FabienPean-Virtonomy

How about the improvement of this modification?

DrChiZhang avatar Jun 14 '23 20:06 DrChiZhang

I assume close to nil. Previous version was creating an affinity_partitioner for each translation unit which is pretty close to this. This may have had an impact when the affinity partitioner object is used multiple times in different algorithms within the same source file. I just tried to follow the documentation for the recommended use of this feature.

If we trust solely the CI (which is not really representative of actual load because of using 2/3 cores only) then it seemingly gets worse for macOS based on a single sample

FabienPean-Virtonomy avatar Jun 15 '23 08:06 FabienPean-Virtonomy