Re: [AMBER-Developers] pmemd cuda MPI nmropt crashes

From: Ross Walker <ross.rosswalker.co.uk>
Date: Fri, 09 Nov 2012 08:00:23 -0800

Awesome work Scott!

Thanks for the detailed detective work. We need you back on AMBER full
time. :-)



On 11/9/12 2:34 AM, "Scott Brozell" <sbrozell.rci.rutgers.edu> wrote:

>Hi,
>
>I second the motion for code reviews especially if conducted collegially.
>Such code reviews have not only quality control but also pedagogical
>aspects.
>
>Consider this case where the bugs were due to uninitialized pointers.
>A golden rule of programming is not to reinvent the wheel.
>(A corollary of this is my golden rule of style - follow the existing
>style.)
>An application of the golden rule when adding new members to a data
>structure
>is to determine where and how existing members are used.
>
>So when pbNMRDistanceK4 was added to pmemd cuda, one could have grepped
>for
>pbNMRDistanceR1R2 and found
>./gputypes.cpp:702:pbNMRDistanceR1R2(NULL),
>which could have led to understanding the need for initialization.
>
>This golden rule application works in reverse. Starting from the stack
>trace
>pmemd.cuda_DPDP.M 000000000054B607 gpu_nmr_setup_ 1575
>gpu.cpp
>1575: delete gpu->pbNMRDistanceK4;
>and grepping for pbNMRDistanceK4 and then for pbNMRDistanceR1R2 led to
>the diagnosis of nine uninitialized pointers.
>
>scott
>
>
>_______________________________________________
>AMBER-Developers mailing list
>AMBER-Developers.ambermd.org
>http://lists.ambermd.org/mailman/listinfo/amber-developers



_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Fri Nov 09 2012 - 08:30:02 PST
Custom Search