disorderedmaterials / dissolve

Structure refinement software for total scattering data
GNU General Public License v3.0
9 stars 16 forks source link

perf: Combinable histograms for angle module parallel execution #1937

Open RobBuchananCompPhys opened 3 months ago

RobBuchananCompPhys commented 3 months ago

I've worked on parallelising the module using a similar approach to the previous multithreading work on #1882 (SiteRDF). Running into a snag where Angle tests are failing only when execution_policy is par (but passing when running sequentially!). I'm guessing this is due to a part of the histogram binning process being non-thread safe, and I believe I have narrowed it down to the Histogram3D, since the output from the 1D and 2d histograms looks correct in gdb. Surprising, as the histogram classes seem to all effectively be wrappers to a linear array, so I am still trying to figure out where this is going wrong in parallel 3D binning.

trisyoungs commented 3 months ago

Regarding this the updated module runs really slowly in parallel, so there's something bad happening somewhere. I have taken a bit of a diversion and decided to handle #1927 and then add one for your module so we can do a before/after comparison too. This is something we should commit do doing for every module we convert in this way.