<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi, <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>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. <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I have two questions about parallelization opportunities.
First, even though there are gathers and scatter going on, isn&#8217;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 &#8216;faction&#8217; array have <i><span
style='font-style:italic'>no</span></i> repeated indices &#8216;j3&#8217; as
you vary loop index &#8216;k&#8217;. Is this correct? <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>The second question is about the outer loop over do-n, which
I believe counts unique water molecules in the system. Isn&#8217;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 &#8216;ii3&#8217; of faction, &#8216;i3&#8217; of fshift,
etc, have <i><span style='font-style:italic'>no</span></i> repeats as you vary outer
loop index &#8216;n&#8217;. Is this correct?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Thanks for your help on these questions and any related
comments.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Jim Schwarzmeier<o:p></o:p></span></font></p>

</div>

</body>

</html>