From: Berk Hess Date: Thu, 12 Feb 2015 14:58:11 +0000 (+0100) Subject: Fix div by zero in PP/PME ratio X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=de8c51206e47597a55a6e2b4d069851d5018c95b;p=alexxy%2Fgromacs.git Fix div by zero in PP/PME ratio Since we have floating pointing exceptions by default with debug builds, these no longer ran with separate PME ranks. Change-Id: I8b15a93901495dbde5dff959001c52ada7414008 --- diff --git a/src/gromacs/domdec/domdec.cpp b/src/gromacs/domdec/domdec.cpp index 43a2d6d854..e593445135 100644 --- a/src/gromacs/domdec/domdec.cpp +++ b/src/gromacs/domdec/domdec.cpp @@ -5563,7 +5563,7 @@ static float dd_f_imbal(gmx_domdec_t *dd) float dd_pme_f_ratio(gmx_domdec_t *dd) { - if (dd->comm->cycl_n[ddCyclPME] > 0) + if (dd->comm->load[0].mdf > 0 && dd->comm->cycl_n[ddCyclPME] > 0) { return dd->comm->load[0].pme/dd->comm->load[0].mdf; }