OpenMP + distopia together #189
Unanswered
PardhavMaradani
asked this question in
Ideas
Replies: 2 comments
-
|
Hey @PardhavMaradani, sorry for the no / slow reply on your PRs and also here. Short on time at the moment but will try and put a coherent response together ASAP. Thanks for getting involved, appreciate the effort, youll hear from me soon. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
PR #196 adds distance array benchmarks. Here is a comparison for
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In the current MDAnalysis support for distance computations, the choice between an
OpenMPordistopiaaccelerated backends is mutually exclusive.Both provide great speedups on their own, but they don't have to be mutually exclusive and when combined, they could provide the best of both worlds (
OpenMPfor outer loops along with explicit SIMD bydistopiawithin). Given that I have a dev setup ready from working on PR #188, I gave this a quick try to explore. I took the two most expensive methods (based on the benchmark results) -DihedralsTriclinicOutBoxandAnglesTriclinicOutBoxto addOpenMPparallelization.Here are the benchmark results:
Just
distopia:distopia+OpenMP:Unsurprisingly, there is a penalty for small sizes (setup cost - we can probably choose to skip parallelization for such cases), but the gains becomes considerable for large sizes (factor of 4 to 5).
Here are the example code changes for the
DihedralsTriclinic<float>case, which shows theOpenMPparallel for during the dispatch:Before
After
There are probably a lot more things to consider, but sharing this data here for any future exploration along these lines as this seems to be one potential way to speed things up even further. Thanks
Beta Was this translation helpful? Give feedback.
All reactions