Re: [AMBER] Bug in cpptraj (AmberTools 13)

From: Daniel Roe <daniel.r.roe.gmail.com>
Date: Mon, 6 May 2013 08:15:12 -0600

Hi,

In this case the nrot variable is actually a vestigial variable (as
you can see it is only ever incremented), so it doesn't actually
matter if it is initialized or not - it should actually be commented
out if anything. There are no adverse effects from leaving it as-is
(other than the extra addition op).

-Dan

On Mon, May 6, 2013 at 12:07 AM, Ake Sandgren <ake.sandgren.hpc2n.umu.se> wrote:
> Hi!
>
> After upgrading to AT 13 i found yet another uninitialized variable.
>
> diff -ru amber12/AmberTools/src/cpptraj/src/Matrix_3x3.cpp
> amber12-p01/AmberTools/src/cpptraj/src/Matrix_3x3.cpp
> --- amber12/AmberTools/src/cpptraj/src/Matrix_3x3.cpp 2013-05-02
> 13:16:15.000000000 +0200
> +++ amber12-p01/AmberTools/src/cpptraj/src/Matrix_3x3.cpp 2013-05-03
> 08:40:42.436891447 +0200
> .. -139,7 +139,7 ..
> vecZ[2] = 0;
> // MAIN LOOP
> double tresh = 0;
> - int nrot;
> + int nrot = 0;
> for (int i = 0; i < MAX_ITERATIONS; ++i) {
> // sm = SUM of UPPER RIGHT TRIANGLE
> double sm = fabs(mat[1]) + fabs(mat[2]) + fabs(mat[5]);
>
>
>
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber



-- 
-------------------------
Daniel R. Roe, PhD
Department of Medicinal Chemistry
University of Utah
30 South 2000 East, Room 201
Salt Lake City, UT 84112-5820
http://home.chpc.utah.edu/~cheatham/
(801) 587-9652
(801) 585-9119 (Fax)
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon May 06 2013 - 07:30:04 PDT
Custom Search