[gmx-developers] parallel optimizations of inl1130

James Schwarzmeier jads at cray.com
Thu Nov 15 21:49:00 CET 2007


Hi, 

 

This is a question from a non-chemist. In the version of Gromacs I am looking at, routine inl1130 appears to be calculating long range forces on atoms of all water molecules due to atoms of all other water molecules. This is implemented as a doubly nested loop. The outer loop is over three atoms of a fixed water molecule, and I believe the inner loop goes over atoms of all other water molecules. 

 

I have two questions about parallelization opportunities. First, even though there are gathers and scatter going on, isn't the inner loop fully vectorizable? That is, the force on a given atom should be a completely parallel computation, given positions of all other atoms. This implies that all indirect addresses of the 'faction' array have no repeated indices 'j3' as you vary loop index 'k'. Is this correct? 

 

The second question is about the outer loop over do-n, which I believe counts unique water molecules in the system. Isn't this also a fully parallel operation that could be made into an OpenMP loop (with a long list of private variables!)? That is, the force calculation of all atoms should be a completely parallel operation, given positions of all particles. Again this implies indices 'ii3' of faction, 'i3' of fshift, etc, have no repeats as you vary outer loop index 'n'. Is this correct?

 

Thanks for your help on these questions and any related comments.

 

Jim Schwarzmeier

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20071115/8efa9c00/attachment.html>


More information about the gromacs.org_gmx-developers mailing list