[gmx-developers] Slow PME with git master and gcc 4.3.3 & 4.3.4

Alexey Shvetsov alexxyum at gmail.com
Sat May 15 10:30:02 CEST 2010


Hi all!

I made some tests with current git master and gcc-4.4.3 and gcc-4.5.0
Seems gromacs compiled with gcc-4.5.0 is a little bit faster then gcc-4.4.3
(~2-5%)
I can do this tests with profiling if needed

2010/5/15 Roland Schulz <roland at utk.edu>

> Hi,
>
> it is caused by gcc using expf instead of exp.
>
> By changing pme.c in the two places where exp is called this way:
> -                    tmp1[kx]  = exp(tmp1[kx]);
> +                    double t = tmp1[kx];
> +                    tmp1[kx]  = exp(t);
>
> gcc 4.3.4 is as fast as gcc 4.4.2.
>
> See also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35202
> (The bug is not related to performance but it discusses the replacement
> from exp->expf)
>
> But what I don't understand at all is why expf is so much slower (expf 7-8x
> as slow in pme.c than exp (*)). A small test program which computes exp on
> an array, compiled with gcc 4.3.4 is actually faster than with 4.4.2 (30%).
> Thus for the test-program the expf seams to be faster. Why expf is so slow
> in pme.c is odd.
>
> *) Got that measurement form HPCToolkit. Shows performance line-by-line.
> Thus it was easy to pin-point the cause.
>
> Roland
>
>
> On Fri, May 14, 2010 at 10:43 AM, Berk Hess <hess at cbr.su.se> wrote:
>
>> Hi,
>>
>> The PME code in git master is a lot faster than the current 4.0.7
>> release code.
>> However, there seems to be a bug in gcc version 4.3.3 and 4.3.4 (4.3.2
>> and 4.4.1 are fine)
>> that make the pme_solve part 5 times (!) slower than with proper
>> compiler versions.
>> This is between 10% and 20% of the total mdrun performance.
>> We are currently trying to figure out what triggers this issue and we
>> are sending
>> a bug report to the gcc mailing list.
>>
>> I someone has a hint, please reply.
>>
>> Berk
>>
>> --
>> gmx-developers mailing list
>> gmx-developers at gromacs.org
>> http://lists.gromacs.org/mailman/listinfo/gmx-developers
>> Please don't post (un)subscribe requests to the list. Use the
>> www interface or send it to gmx-developers-request at gromacs.org.
>>
>
>
>
> --
> ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
> 865-241-1537, ORNL PO BOX 2008 MS6309
>
> --
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-developers-request at gromacs.org.
>



-- 
Best Regards,
Alexey 'Alexxy' Shvetsov
Petersburg Nuclear Physics Institute, Russia
Department of Molecular and Radiation Biophysics
Gentoo Team Ru
Gentoo Linux Dev
mailto:alexxyum at gmail.com
mailto:alexxy at gentoo.org
mailto:alexxy at omrb.pnpi.spb.ru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20100515/7c5d0910/attachment.html>


More information about the gromacs.org_gmx-developers mailing list