<br><br><div class="gmail_quote">On Wed, Jun 30, 2010 at 7:13 PM,  <span dir="ltr">&lt;<a href="mailto:hess@sbc.su.se">hess@sbc.su.se</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">&gt; On Wed, Jun 30, 2010 at 5:58 PM, Szilárd Páll<br>
&gt; &lt;<a href="mailto:szilard.pall@cbr.su.se">szilard.pall@cbr.su.se</a>&gt;wrote:<br>
&gt;<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; &gt; -Kieee. Does someone know whether this is required for GROMACS? One<br>
&gt;&gt; can<br>
&gt;&gt; also<br>
&gt;&gt; &gt; gain with GCC by adding -ffast-math. Is this safe?<br>
&gt;&gt;<br>
&gt;&gt; When testing/debugging the strange performance hit we experienced a<br>
&gt;&gt; while ago with gcc 4.3.3/4 - which turned out to be a problem with<br>
&gt;&gt; expf - I also tried the -ffast-math flag and as far as I remember I<br>
&gt;&gt; got no relevant performance improvement (tested on x86_64). With some<br>
&gt;&gt; gcc versions it even seemed to produce a small performance hit,<br>
&gt;&gt; overall showing -1-2% &quot;improvement&quot;.<br>
&gt;&gt;<br>
&gt; Yes. I did the same test back then and got 5% improvement for only the<br>
&gt; solve_pme part. So this agrees with your result.<br>
&gt; Of course this is not that much, but since it is no work to activate it, I<br>
&gt; think it is still interested.<br>
&gt;<br>
&gt; The question is whether it is safe. Thus is there some code which requires<br>
&gt; strict accordance of the IEEE rules? My understanding is that fast-math<br>
&gt; usually doesn&#39;t affect the accuracy. Only if bitwise results are important<br>
&gt; or things are unstable it should be important. I&#39;m not aware of any code<br>
&gt; like this, but I&#39;m not sure at all. If we have any code like this we might<br>
&gt; consider to activate fast-math only for the solve_pme function.<br>
&gt;<br>
&gt; Roland<br>
&gt;<br>
<br>
</div>I don&#39;t think we need ieee for anything.<br>
<br>
But do you still get 5% on solve pme after I added the SSE exp?<br>
I also had an SSE 1/x which gave 1 or 2%.<br>
But solve pme is now so little of the total time that such things<br>
become irrelevant.<br></blockquote><div><br></div><div>Just tested it and I get 30% speed improvement in PME solve with the latest HEAD version when using -ffast-math. This is with GCC 4.4.2.</div><div>And I checked that the new SSE exp function is used.</div>

<div>If you are interested I can run it with profiling to see which code lines cause the difference.</div><div><br></div><div>Roland</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


<br>
Berk<br>
<div><div></div><div class="h5"><br>
&gt;&gt;<br>
&gt;&gt; Take these metrics with a grain of salt though as my benchmarking was<br>
&gt;&gt; focused on a 10-20% performance hit on PME. Moreover it was done ~1.5<br>
&gt;&gt; months ago so It might be worth to test again.<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Szilárd<br>
&gt;&gt; --<br>
&gt;&gt; gmx-developers mailing list<br>
&gt;&gt; <a href="mailto:gmx-developers@gromacs.org">gmx-developers@gromacs.org</a><br>
&gt;&gt; <a href="http://lists.gromacs.org/mailman/listinfo/gmx-developers" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-developers</a><br>
&gt;&gt; Please don&#39;t post (un)subscribe requests to the list. Use the<br>
&gt;&gt; www interface or send it to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; ORNL/UT Center for Molecular Biophysics <a href="http://cmb.ornl.gov" target="_blank">cmb.ornl.gov</a><br>
&gt; 865-241-1537, ORNL PO BOX 2008 MS6309<br>
&gt; --<br>
&gt; gmx-developers mailing list<br>
&gt; <a href="mailto:gmx-developers@gromacs.org">gmx-developers@gromacs.org</a><br>
&gt; <a href="http://lists.gromacs.org/mailman/listinfo/gmx-developers" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-developers</a><br>
&gt; Please don&#39;t post (un)subscribe requests to the list. Use the<br>
&gt; www interface or send it to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br>
<br>
--<br>
gmx-developers mailing list<br>
<a href="mailto:gmx-developers@gromacs.org">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<br>
www interface or send it to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>ORNL/UT Center for Molecular Biophysics <a href="http://cmb.ornl.gov">cmb.ornl.gov</a><br>865-241-1537, ORNL PO BOX 2008 MS6309<br>