Hi,<br><br>on an email thread started by me on March 11 subject &quot;Bluegene Kernel&quot; (see below) Mathias said that the generic kernel should not be slower than the double hummer so this problem shouldn&#39;t matter. <br>

<br>(Not saying that we shouldn&#39;t fix it just that is might not be important)<br><br>Roland<br><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Erik Lindahl</b> <span dir="ltr">&lt;<a href="mailto:lindahl@cbr.su.se" target="_blank">lindahl@cbr.su.se</a>&gt;</span><br>

Date: Fri, Mar 13, 2009 at 8:58 AM<br>
Subject: Re: Bluegene Kernel<br>To: Mathias PUETZ &lt;<a href="mailto:mpuetz@de.ibm.com" target="_blank">mpuetz@de.ibm.com</a>&gt;<br>Cc: Roland Schulz &lt;<a href="mailto:roland@utk.edu" target="_blank">roland@utk.edu</a>&gt;, &quot;mark.abraham&quot; &lt;<a href="mailto:mark.abraham@anu.edu.au" target="_blank">mark.abraham@anu.edu.au</a>&gt;, roland@rschulz.eu<br>


<br><br>Hi,<br>
<br>
With the new kernel structure in the head branch it will be quite fine to have separate kernel sets for<br>
<br>
power4<br>
power5<br>
power6<br>
power7<br>
...<br>
BG<br>
<br>
As long as you<br>
<br>
1) Tell me exactly what options should we use for each architecture<br>
2) Help test that it works :-)<br>
<br>
<br>
One question - since we now try to avoid generating kernels at build
time (lots of reasons, coding simplicity being one of them), can you
say in general whether xlf or xlc is faster?<br>
<br>
Cheers,<br>
<br>
Erik<div><div><br>
<br>
<br>
On Mar 13, 2009, at 1:28 PM, Mathias PUETZ wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Roland,<br>
<br>
each of the BlueGene &quot;double hummer&quot; kernels shouldn&#39;t be slower than the<br>
generic ones,<br>
so I think it&#39;s a more academic issue for the pair-force kernels. I had<br>
checked the performance<br>
of each kernel. I think the worst case was, that one or two double hummer<br>
kernels ran 5% slower<br>
than the generated ones.<br>
However, enable-ppc-sqrt=1 also affects all other SQRT calculations in the<br>
rest of the code,<br>
that has not been specifically optimized, so you might get a minor<br>
performance hit there,<br>
if you can no longer specify --enable-ppc-sqrt=1.<br>
<br>
I don&#39;t quite understand, why PPC5 would be required regarding the SQRT<br>
calculations.<br>
FRSQRTE instructions is available since PPC4, but only Power6 (or higher)<br>
and BlueGene offer enough<br>
bits of precision to use just a single Newton-Raphson iteration to bring it<br>
up to single precision.<br>
<br>
Viele Grüsse / Best regards,<br>
Dr. Mathias Pütz<br>
<br>
IT Specialist for Application Performance<br>
<br>
Deep Computing - Strategic Growth Business<br>
IBM Systems &amp; Technology Group<br>
<br>
e-mail:  <a href="mailto:mpuetz@de.ibm.com" target="_blank">mpuetz@de.ibm.com</a><br>
mobile: + 49-(0)160-7120602<br>
fax:         + 49-(0)6131-84-6660<br>
<br>
Anschrift:<br>
 IBM Deutschland GmbH<br>
 Department B513<br>
 Hechtsheimer Str. 2 / Building 12<br>
 55131 Mainz<br>
 Germany<br>
<br>
IBM Deutschland GmbH<br>
Vorsitzender des Aufsichtsrats: Erich Clementi<br>
Geschäftsführung: Martin Jetter (Vorsitzender), Reinhard Reschke, Christoph<br>
Grandpierre, Matthias Hartmann, Thomas Fell, Michael Diemer<br>
Sitz der Gesellschaft: Stuttgart<br>
Registergericht: Amtsgericht Stuttgart, HRB 14562 WEEE-Reg.-Nr. DE 99369940<br>
<br>
<br>
<br>
<br>
            Roland Schulz<br>
            &lt;<a href="mailto:roland@utk.edu" target="_blank">roland@utk.edu</a>&gt;<br>
            Sent by:                                                   To<br>
            roland@rschulz.eu         &quot;mark.abraham&quot;<br>
                                      &lt;<a href="mailto:mark.abraham@anu.edu.au" target="_blank">mark.abraham@anu.edu.au</a>&gt;, Mathias<br>
                                      PUETZ/Germany/IBM@IBMDE<br>
            03/11/2009 10:03                                           cc<br>
            PM<br>
                                                                  Subject<br>
                                      Bluegene Kernel<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Hi Mark, Hi Matthias,<br>
<br>
I&#39;m writing you because you have both edited the &quot;Gromacs Bluegene&quot;<br>
wiki page and both recommend to use<br>
              --enable-ppc-sqrt[=1] --enable-fortran --enable-bluegene<br>
<br>
I&#39;m asking because the ppc-sqrt does not work on Bluegene anymore,<br>
because Erik changed the single/double conversion so that it requires<br>
PPC5. Should we add another option to the mknb to be PPC4 backward<br>
compatible? Or is this not necssarry because Matthias&#39; instrinsic<br>
kernel is always faster?<br>
<br>
So my question:<br>
Did you compare the performance of the intrinsic kernel with the<br>
fortran and C kernel on Bluegene? Do you think the C/Fortran kernel<br>
are thus needed on Bluegene? Or should we just change the compile<br>
recommendation to not use -enable-ppc-sqrt so that it compiles again?<br>
If the C/Fortran Kernel are not used anyhow this would not make a<br>
difference, I think.<br>
<br>
Thanks<br>
Roland<br>
<br>
<br>
--<br>
ORNL/UT Center for Molecular Biophysics <a href="http://cmb.ornl.gov/" target="_blank">cmb.ornl.gov</a><br>
865-241-1537, ORNL PO BOX 2008 MS6309<br>
<br>
<br>
</blockquote>
<br></div></div>
------------<br><font color="#888888">
Erik Lindahl   &lt;<a href="mailto:lindahl@cbr.su.se" target="_blank">lindahl@cbr.su.se</a>&gt;  Backup: &lt;<a href="mailto:erik.lindahl@gmail.com" target="_blank">erik.lindahl@gmail.com</a>&gt;<br>
Associate Professor, Computational Structural Biology<br>
Center for Biomembrane Research, Dept. Biochemistry &amp; Biophysics<br>
Stockholm University, SE-106 91 Stockholm, Sweden<br>
Tel: +46(0)8164675  Mobile: +46(0)703844534  Fax: mail a PDF instead<br>
<br>
<br>
<br>
<br>
<br>
<br>
</font></div><br><br clear="all"><br>-- <br>ORNL/UT Center for Molecular Biophysics <a href="http://cmb.ornl.gov/" target="_blank">cmb.ornl.gov</a><br>865-241-1537, ORNL PO BOX 2008 MS6309<br>
<br><br><br><div class="gmail_quote">On Wed, Sep 2, 2009 at 7:24 PM, Mark Abraham <span dir="ltr">&lt;<a href="mailto:Mark.Abraham@anu.edu.au" target="_blank">Mark.Abraham@anu.edu.au</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
After &quot;./configure --enable-ppc-sqrt&quot; on BlueGene, mknb is called with -ppc_sqrt. In ppc_invsqrt(), mknb_innerloop.c generates code to call to __frsqrtes. That might be sound on other PPC architectures, but BlueGene doesn&#39;t do single-precision arithmetic, so this built-in does not exist.<br>



<br>
To work-around, do not specify --enable-ppc-sqrt in single precision on BlueGene.<br>
<br>
To fix, we would still prefer to use the PPC inverse square root in all cases. We need to call a double-precision version on BlueGene, and not on others. That suggests mknb_innerloop.c needs to #include &lt;config.h&gt; (which is on the search path) and use #ifdef GMX_BLUEGENE.<br>



<br>
(If Bugzilla was working, I&#39;d have filed this and various others of my reports on Bugzilla. How do we make sure these get dealt with for any 4.0.6 release?)<br>
<br>
Mark<br>
_______________________________________________<br>
gmx-developers mailing list<br>
<a href="mailto:gmx-developers@gromacs.org" target="_blank">gmx-developers@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-developers" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-developers</a><br>
Please don&#39;t post (un)subscribe requests to the list. Use the www interface or send it to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.<br>
</blockquote></div><br><br clear="all"><br>-- <br>ORNL/UT Center for Molecular Biophysics <a href="http://cmb.ornl.gov" target="_blank">cmb.ornl.gov</a><br>865-241-1537, ORNL PO BOX 2008 MS6309<br>