From ad4cbeec3e2127cadf3de1b99980383f1c5e82bb Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Tue, 7 Jul 2015 14:45:06 +0200 Subject: [PATCH] Stop mdrun printing potentially undefined value Variable pv is only defined with conditions that need not be identical with the presence of pressure coupling. Definitely compilers aren't sure about it. Change-Id: I80670e12b799c7f476caa565ef7ce9c3e38b0686 --- src/gromacs/mdlib/mdebin.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gromacs/mdlib/mdebin.c b/src/gromacs/mdlib/mdebin.c index bb4809174c..17052da774 100644 --- a/src/gromacs/mdlib/mdebin.c +++ b/src/gromacs/mdlib/mdebin.c @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -1248,7 +1248,9 @@ void upd_mdebin(t_mdebin *md, { fprintf(md->fp_dhdl, " %#.8g", md->dE[i]); } - if ((md->epc != epcNO) && + if (md->bDynBox && + md->bDiagPres && + (md->epc != epcNO) && (enerd->n_lambda > 0) && (fep->init_lambda < 0)) { -- 2.22.0