Finish removing group-scheme all-vs-all support
authorMark Abraham <mark.j.abraham@gmail.com>
Mon, 7 Jan 2019 01:19:46 +0000 (02:19 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Mon, 7 Jan 2019 01:26:37 +0000 (02:26 +0100)
These kernels haven't been callable since before GROMACS 4.6

No release notes entry as no functionality is actually changed with
this commit.

Fixes #1095

Change-Id: I3de3b9bbabaafae70fee4e9845880c973e8dc352

docs/user-guide/environment-variables.rst
src/gromacs/gmxlib/nonbonded/nb_kernel_c/nb_kernel_allvsall.cpp [deleted file]
src/gromacs/gmxlib/nonbonded/nb_kernel_c/nb_kernel_allvsall.h [deleted file]
src/gromacs/gmxlib/nonbonded/nonbonded.cpp
src/gromacs/gmxlib/nrnb.cpp
src/gromacs/gmxlib/nrnb.h
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdlib/forcerec.h
src/gromacs/mdlib/sim_util.cpp
src/gromacs/mdrun/runner.cpp
src/gromacs/mdtypes/forcerec.h

index a03d2958ad0a1ed69a59a9809c40b09ca0fc5778..ebfbe22ffa8875a48539908382af154b19812325 100644 (file)
@@ -282,9 +282,6 @@ Performance and Run Control
 ``GMX_NOOPTIMIZEDKERNELS``
         deprecated, use ``GMX_DISABLE_SIMD_KERNELS`` instead.
 
-``GMX_NO_ALLVSALL``
-        disables optimized all-vs-all kernels.
-
 ``GMX_NO_CART_REORDER``
         used in initializing domain decomposition communicators. Rank reordering
         is default, but can be switched off with this environment variable.
diff --git a/src/gromacs/gmxlib/nonbonded/nb_kernel_c/nb_kernel_allvsall.cpp b/src/gromacs/gmxlib/nonbonded/nb_kernel_c/nb_kernel_allvsall.cpp
deleted file mode 100644 (file)
index 57bd21d..0000000
+++ /dev/null
@@ -1,451 +0,0 @@
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2009, The GROMACS Development Team.
- * Copyright (c) 2013,2014,2015,2017,2018, 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.
- *
- * GROMACS is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * GROMACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with GROMACS; if not, see
- * http://www.gnu.org/licenses, or write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
- *
- * If you want to redistribute modifications to GROMACS, please
- * consider that scientific software is very special. Version
- * control is crucial - bugs must be traceable. We will be happy to
- * consider code for inclusion in the official distribution, but
- * derived work must not be called official GROMACS. Details are found
- * in the README & COPYING files - if they are missing, get the
- * official version at http://www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the research papers on the package. Check out http://www.gromacs.org.
- */
-#include "gmxpre.h"
-
-#include "nb_kernel_allvsall.h"
-
-#include "config.h"
-
-#include <cmath>
-
-#include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/math/functions.h"
-#include "gromacs/topology/block.h"
-#include "gromacs/utility/real.h"
-#include "gromacs/utility/smalloc.h"
-
-typedef struct
-{
-    real **    pvdwparam;
-    int *      jindex;
-    int **     exclusion_mask;
-}
-gmx_allvsall_data_t;
-
-static int
-calc_maxoffset(int i, int natoms)
-{
-    int maxoffset;
-
-    if ((natoms % 2) == 1)
-    {
-        /* Odd number of atoms, easy */
-        maxoffset = natoms/2;
-    }
-    else if ((natoms % 4) == 0)
-    {
-        /* Multiple of four is hard */
-        if (i < natoms/2)
-        {
-            if ((i % 2) == 0)
-            {
-                maxoffset = natoms/2;
-            }
-            else
-            {
-                maxoffset = natoms/2-1;
-            }
-        }
-        else
-        {
-            if ((i % 2) == 1)
-            {
-                maxoffset = natoms/2;
-            }
-            else
-            {
-                maxoffset = natoms/2-1;
-            }
-        }
-    }
-    else
-    {
-        /* natoms/2 = odd */
-        if ((i % 2) == 0)
-        {
-            maxoffset = natoms/2;
-        }
-        else
-        {
-            maxoffset = natoms/2-1;
-        }
-    }
-
-    return maxoffset;
-}
-
-
-static void
-setup_exclusions_and_indices(gmx_allvsall_data_t *   aadata,
-                             const t_blocka *        excl,
-                             int                     natoms)
-{
-    int i, j, k, iexcl;
-    int nj0, nj1;
-    int max_offset;
-    int max_excl_offset;
-
-    /* This routine can appear to be a bit complex, but it is mostly book-keeping.
-     * To enable the fast all-vs-all kernel we need to be able to stream through all coordinates
-     * whether they should interact or not.
-     *
-     * To avoid looping over the exclusions, we create a simple mask that is 1 if the interaction
-     * should be present, otherwise 0. Since exclusions typically only occur when i & j are close,
-     * we create a jindex array with three elements per i atom: the starting point, the point to
-     * which we need to check exclusions, and the end point.
-     * This way we only have to allocate a short exclusion mask per i atom.
-     */
-
-    /* Allocate memory for our modified jindex array */
-    snew(aadata->jindex, 3*natoms);
-
-    /* Pointer to lists with exclusion masks */
-    snew(aadata->exclusion_mask, natoms);
-
-    for (i = 0; i < natoms; i++)
-    {
-        /* Start */
-        aadata->jindex[3*i]   = i+1;
-        max_offset            = calc_maxoffset(i, natoms);
-
-        /* Exclusions */
-        nj0   = excl->index[i];
-        nj1   = excl->index[i+1];
-
-        /* first check the max range */
-        max_excl_offset = -1;
-
-        for (j = nj0; j < nj1; j++)
-        {
-            iexcl = excl->a[j];
-
-            k = iexcl - i;
-
-            if (k+natoms <= max_offset)
-            {
-                k += natoms;
-            }
-
-            max_excl_offset = (k > max_excl_offset) ? k : max_excl_offset;
-        }
-
-        max_excl_offset = (max_offset < max_excl_offset) ? max_offset : max_excl_offset;
-
-        aadata->jindex[3*i+1] = i+1+max_excl_offset;
-
-
-        snew(aadata->exclusion_mask[i], max_excl_offset);
-        /* Include everything by default */
-        for (j = 0; j < max_excl_offset; j++)
-        {
-            /* Use all-ones to mark interactions that should be present, compatible with SSE */
-            aadata->exclusion_mask[i][j] = 0xFFFFFFFF;
-        }
-
-        /* Go through exclusions again */
-        for (j = nj0; j < nj1; j++)
-        {
-            iexcl = excl->a[j];
-
-            k = iexcl - i;
-
-            if (k+natoms <= max_offset)
-            {
-                k += natoms;
-            }
-
-            if (k > 0 && k <= max_excl_offset)
-            {
-                /* Excluded, kill it! */
-                aadata->exclusion_mask[i][k-1] = 0;
-            }
-        }
-
-        /* End */
-        aadata->jindex[3*i+2] = i+1+max_offset;
-    }
-}
-
-static void
-setup_aadata(gmx_allvsall_data_t       **  p_aadata,
-             const t_blocka       *        excl,
-             int                           natoms,
-             const int *                   type,
-             int                           ntype,
-             const real *                  pvdwparam)
-{
-    int                  i, j, idx;
-    gmx_allvsall_data_t *aadata;
-    real                *p;
-
-    snew(aadata, 1);
-    *p_aadata = aadata;
-
-    /* Generate vdw params */
-    snew(aadata->pvdwparam, ntype);
-
-    for (i = 0; i < ntype; i++)
-    {
-        snew(aadata->pvdwparam[i], 2*natoms);
-        p = aadata->pvdwparam[i];
-
-        /* Lets keep it simple and use multiple steps - first create temp. c6/c12 arrays */
-        for (j = 0; j < natoms; j++)
-        {
-            idx             = i*ntype+type[j];
-            p[2*j]          = pvdwparam[2*idx];
-            p[2*j+1]        = pvdwparam[2*idx+1];
-        }
-    }
-
-    setup_exclusions_and_indices(aadata, excl, natoms);
-}
-
-
-
-void
-nb_kernel_allvsall(t_nblist gmx_unused *     nlist,
-                   rvec *                    xx,
-                   rvec *                    ff,
-                   struct t_forcerec *       fr,
-                   t_mdatoms *               mdatoms,
-                   nb_kernel_data_t *        kernel_data,
-                   t_nrnb *                  nrnb)
-{
-    gmx_allvsall_data_t *aadata;
-    int                  natoms;
-    int                  ni0, ni1;
-    int                  nj0, nj1, nj2;
-    int                  i, j, k;
-    real           *     charge;
-    int           *      type;
-    real                 facel;
-    real           *     pvdw;
-    int                  ggid;
-    int           *      mask;
-
-    real                 ix, iy, iz, iq;
-    real                 fix, fiy, fiz;
-    real                 jx, jy, jz, qq;
-    real                 dx, dy, dz;
-    real                 tx, ty, tz;
-    real                 rsq, rinv, rinvsq, rinvsix;
-    real                 vcoul, vctot;
-    real                 c6, c12, Vvdw6, Vvdw12, Vvdwtot;
-    real                 fscal;
-    const t_blocka      *excl;
-    real           *     f;
-    real           *     x;
-    real           *     Vvdw;
-    real           *     Vc;
-
-    x                   = xx[0];
-    f                   = ff[0];
-    charge              = mdatoms->chargeA;
-    type                = mdatoms->typeA;
-    facel               = fr->ic->epsfac;
-    natoms              = mdatoms->nr;
-    ni0                 = 0;
-    ni1                 = mdatoms->homenr;
-    aadata              = reinterpret_cast<gmx_allvsall_data_t *>(fr->AllvsAll_work);
-    excl                = kernel_data->exclusions;
-
-    Vc                  = kernel_data->energygrp_elec;
-    Vvdw                = kernel_data->energygrp_vdw;
-
-    if (aadata == nullptr)
-    {
-        setup_aadata(&aadata, excl, natoms, type, fr->ntype, fr->nbfp);
-        fr->AllvsAll_work  = aadata;
-    }
-
-    for (i = ni0; i < ni1; i++)
-    {
-        /* We assume shifts are NOT used for all-vs-all interactions */
-
-        /* Load i atom data */
-        ix                = x[3*i];
-        iy                = x[3*i+1];
-        iz                = x[3*i+2];
-        iq                = facel*charge[i];
-
-        pvdw              = aadata->pvdwparam[type[i]];
-
-        /* Zero the potential energy for this list */
-        Vvdwtot           = 0.0;
-        vctot             = 0.0;
-
-        /* Clear i atom forces */
-        fix               = 0.0;
-        fiy               = 0.0;
-        fiz               = 0.0;
-
-        /* Load limits for loop over neighbors */
-        nj0              = aadata->jindex[3*i];
-        nj1              = aadata->jindex[3*i+1];
-        nj2              = aadata->jindex[3*i+2];
-
-        mask             = aadata->exclusion_mask[i];
-
-        /* Prologue part, including exclusion mask */
-        for (j = nj0; j < nj1; j++, mask++)
-        {
-            if (*mask != 0)
-            {
-                k = j%natoms;
-
-                /* load j atom coordinates */
-                jx                = x[3*k];
-                jy                = x[3*k+1];
-                jz                = x[3*k+2];
-
-                /* Calculate distance */
-                dx                = ix - jx;
-                dy                = iy - jy;
-                dz                = iz - jz;
-                rsq               = dx*dx+dy*dy+dz*dz;
-
-                /* Calculate 1/r and 1/r2 */
-                rinv              = 1.0/sqrt(rsq);
-                rinvsq            = rinv*rinv;
-
-                /* Load parameters for j atom */
-                qq                = iq*charge[k];
-                c6                = pvdw[2*k];
-                c12               = pvdw[2*k+1];
-
-                /* Coulomb interaction */
-                vcoul             = qq*rinv;
-                vctot             = vctot+vcoul;
-
-                /* Lennard-Jones interaction */
-                rinvsix           = rinvsq*rinvsq*rinvsq;
-                Vvdw6             = c6*rinvsix;
-                Vvdw12            = c12*rinvsix*rinvsix;
-                Vvdwtot           = Vvdwtot+Vvdw12-Vvdw6;
-                fscal             = (vcoul+12.0*Vvdw12-6.0*Vvdw6)*rinvsq;
-
-                /* Calculate temporary vectorial force */
-                tx                = fscal*dx;
-                ty                = fscal*dy;
-                tz                = fscal*dz;
-
-                /* Increment i atom force */
-                fix               = fix + tx;
-                fiy               = fiy + ty;
-                fiz               = fiz + tz;
-
-                /* Decrement j atom force */
-                f[3*k]            = f[3*k]   - tx;
-                f[3*k+1]          = f[3*k+1] - ty;
-                f[3*k+2]          = f[3*k+2] - tz;
-            }
-            /* Inner loop uses 38 flops/iteration */
-        }
-
-        /* Main part, no exclusions */
-        for (j = nj1; j < nj2; j++)
-        {
-            k = j%natoms;
-
-            /* load j atom coordinates */
-            jx                = x[3*k];
-            jy                = x[3*k+1];
-            jz                = x[3*k+2];
-
-            /* Calculate distance */
-            dx                = ix - jx;
-            dy                = iy - jy;
-            dz                = iz - jz;
-            rsq               = dx*dx+dy*dy+dz*dz;
-
-            /* Calculate 1/r and 1/r2 */
-            rinv              = 1.0/sqrt(rsq);
-            rinvsq            = rinv*rinv;
-
-            /* Load parameters for j atom */
-            qq                = iq*charge[k];
-            c6                = pvdw[2*k];
-            c12               = pvdw[2*k+1];
-
-            /* Coulomb interaction */
-            vcoul             = qq*rinv;
-            vctot             = vctot+vcoul;
-
-            /* Lennard-Jones interaction */
-            rinvsix           = rinvsq*rinvsq*rinvsq;
-            Vvdw6             = c6*rinvsix;
-            Vvdw12            = c12*rinvsix*rinvsix;
-            Vvdwtot           = Vvdwtot+Vvdw12-Vvdw6;
-            fscal             = (vcoul+12.0*Vvdw12-6.0*Vvdw6)*rinvsq;
-
-            /* Calculate temporary vectorial force */
-            tx                = fscal*dx;
-            ty                = fscal*dy;
-            tz                = fscal*dz;
-
-            /* Increment i atom force */
-            fix               = fix + tx;
-            fiy               = fiy + ty;
-            fiz               = fiz + tz;
-
-            /* Decrement j atom force */
-            f[3*k]            = f[3*k]   - tx;
-            f[3*k+1]          = f[3*k+1] - ty;
-            f[3*k+2]          = f[3*k+2] - tz;
-
-            /* Inner loop uses 38 flops/iteration */
-        }
-
-        f[3*i]   += fix;
-        f[3*i+1] += fiy;
-        f[3*i+2] += fiz;
-
-        /* Add potential energies to the group for this list */
-        ggid             = 0;
-
-        Vc[ggid]         = Vc[ggid] + vctot;
-        Vvdw[ggid]       = Vvdw[ggid] + Vvdwtot;
-
-        /* Outer loop uses 6 flops/iteration */
-    }
-
-    /* 12 flops per outer iteration
-     * 19 flops per inner iteration
-     */
-    inc_nrnb(nrnb, eNR_NBKERNEL_ELEC_VDW_VF, (ni1-ni0)*12 + gmx::exactDiv(natoms*(natoms-1), 2)*19);
-}
diff --git a/src/gromacs/gmxlib/nonbonded/nb_kernel_c/nb_kernel_allvsall.h b/src/gromacs/gmxlib/nonbonded/nb_kernel_c/nb_kernel_allvsall.h
deleted file mode 100644 (file)
index b52347f..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * Copyright (c) 2012,2014,2015,2017,2018, 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.
- *
- * GROMACS is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * GROMACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with GROMACS; if not, see
- * http://www.gnu.org/licenses, or write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
- *
- * If you want to redistribute modifications to GROMACS, please
- * consider that scientific software is very special. Version
- * control is crucial - bugs must be traceable. We will be happy to
- * consider code for inclusion in the official distribution, but
- * derived work must not be called official GROMACS. Details are found
- * in the README & COPYING files - if they are missing, get the
- * official version at http://www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the research papers on the package. Check out http://www.gromacs.org.
- */
-#ifndef _NB_KERNEL_ALLVSALL_H
-#define _NB_KERNEL_ALLVSALL_H
-
-#include "config.h"
-
-#include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/gmxlib/nonbonded/nb_kernel.h"
-#include "gromacs/math/vectypes.h"
-#include "gromacs/mdtypes/mdatom.h"
-#include "gromacs/mdtypes/nblist.h"
-
-void
-nb_kernel_allvsall(t_nblist *                nlist,
-                   rvec *                    x,
-                   rvec *                    f,
-                   struct t_forcerec *       fr,
-                   t_mdatoms *               mdatoms,
-                   nb_kernel_data_t *        kernel_data,
-                   t_nrnb *                  nrnb);
-
-#endif
index 270f9ecf5977a1bf2d6b3871078f3fe2c9b9ec78..8ca8aa9ef65c606b9af335c3eeb2fb067cb8d663 100644 (file)
@@ -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,2015,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018,2019, 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.
@@ -334,11 +334,6 @@ void do_nonbonded(const t_forcerec  *fr,
     kernel_data.lambda                  = lambda;
     kernel_data.dvdl                    = dvdl;
 
-    if (fr->bAllvsAll)
-    {
-        gmx_incons("All-vs-all kernels have not been implemented in version 4.6");
-    }
-
     if (eNL >= 0)
     {
         i0 = eNL;
index 55d0695aee68a48ab5ca27b6fb14314c2077fb15..2755e8f23892fae77d9e31d471a5748e00dbd8c8 100644 (file)
@@ -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,2015,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018,2019, 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.
@@ -84,7 +84,6 @@ static const t_nrnb_data nbdata[eNRNB] = {
     { "NB Generic kernel",               1 },
     { "NB Generic charge grp kernel",    1 },
     { "NB Free energy kernel",           1 },
-    { "NB All-vs-all",                   1 },
 
     { "Pair Search distance check",      9 }, /* nbnxn pair dist. check */
     /* nbnxn kernel flops are based on inner-loops without exclusion checks.
index 727297dc5afb7446c68b208d2f1239b1aa3c1b53..dbdcd202ce9679bd8519adab7f21d91caf69b5e5 100644 (file)
@@ -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,2015,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018,2019, 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.
@@ -76,9 +76,8 @@ enum
     eNR_NBKERNEL_FREE_ENERGY,               /* Add other generic kernels _before_ the free energy one */
 
     eNR_NBKERNEL_TOTAL_NR,
-    eNR_NBKERNEL_ALLVSALL = eNR_NBKERNEL_TOTAL_NR, // Reuse the symbolic constant that indicates the last kernel
 
-    eNR_NBNXN_DIST2,
+    eNR_NBNXN_DIST2 = eNR_NBKERNEL_TOTAL_NR, // Reuse the symbolic constant that indicates the last kernel
     eNR_NBNXN_LJ_RF,          eNR_NBNXN_LJ_RF_E,
     eNR_NBNXN_LJ_TAB,         eNR_NBNXN_LJ_TAB_E,
     eNR_NBNXN_LJ_EWALD,       eNR_NBNXN_LJ_EWALD_E,
index 6ad3940728610c6721371311ab322daea376708f..763aaaa6c10095c3d115844305e386e55dde5711 100644 (file)
@@ -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,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, 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.
@@ -1516,45 +1516,6 @@ static real cutoff_inf(real cutoff)
     return cutoff;
 }
 
-gmx_bool can_use_allvsall(const t_inputrec *ir, gmx_bool bPrintNote, const t_commrec *cr, FILE *fp)
-{
-    gmx_bool bAllvsAll;
-
-    bAllvsAll =
-        (
-            ir->rlist == 0            &&
-            ir->rcoulomb == 0         &&
-            ir->rvdw == 0             &&
-            ir->ePBC == epbcNONE      &&
-            ir->vdwtype == evdwCUT    &&
-            ir->coulombtype == eelCUT &&
-            ir->efep == efepNO        &&
-            getenv("GMX_NO_ALLVSALL") == nullptr
-        );
-
-    if (bAllvsAll && ir->opts.ngener > 1)
-    {
-        const char *note = "NOTE: Can not use all-vs-all force loops, because there are multiple energy monitor groups; you might get significantly higher performance when using only a single energy monitor group.\n";
-
-        if (bPrintNote)
-        {
-            if (fp != nullptr)
-            {
-                fprintf(fp, "\n%s\n", note);
-            }
-        }
-        bAllvsAll = FALSE;
-    }
-
-    if (bAllvsAll && fp && MASTER(cr))
-    {
-        fprintf(fp, "\nUsing SIMD all-vs-all kernels.\n\n");
-    }
-
-    return bAllvsAll;
-}
-
-
 gmx_bool nbnxn_simd_supported(const gmx::MDLogger &mdlog,
                               const t_inputrec    *ir)
 {
@@ -2461,25 +2422,6 @@ void init_forcerec(FILE                             *fp,
 
     fr->bBHAM = (mtop->ffparams.functype[0] == F_BHAM);
 
-    /* Check if we can/should do all-vs-all kernels */
-    fr->bAllvsAll       = can_use_allvsall(ir, FALSE, nullptr, nullptr);
-    fr->AllvsAll_work   = nullptr;
-
-    /* All-vs-all kernels have not been implemented in 4.6 and later.
-     * See Redmine #1249. */
-    if (fr->bAllvsAll)
-    {
-        fr->bAllvsAll            = FALSE;
-        if (fp != nullptr)
-        {
-            fprintf(fp,
-                    "\nYour simulation settings would have triggered the efficient all-vs-all\n"
-                    "kernels in GROMACS 4.5, but these have not been implemented in GROMACS\n"
-                    "4.6 and 5.x. If performance is important, please use GROMACS 4.5.7\n"
-                    "or try cutoff-scheme = Verlet.\n\n");
-        }
-    }
-
     /* Neighbour searching stuff */
     fr->cutoff_scheme = ir->cutoff_scheme;
     fr->bGrid         = (ir->ns_type == ensGRID);
index 643b8997cfc5507d914c135e6089d29829c9d54f..1316e872ff3f23f5f13c63334b9e536887e696fa 100644 (file)
@@ -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,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, 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.
@@ -160,13 +160,6 @@ gmx_bool uses_simple_tables(int                 cutoff_scheme,
  * with the type of kernel indicated.
  */
 
-gmx_bool can_use_allvsall(const t_inputrec *ir,
-                          gmx_bool bPrintNote, const t_commrec *cr, FILE *fp);
-/* Returns if we can use all-vs-all loops.
- * If bPrintNote==TRUE, prints a note, if necessary, to stderr
- * and fp (if !=NULL) on the master node.
- */
-
 gmx_bool nbnxn_simd_supported(const gmx::MDLogger &mdlog,
                               const t_inputrec    *ir);
 /* Return if CPU SIMD support exists for the given inputrec
index 22b13e8825e22fd287f953bdb614ac901b9a8879..9c381d555932002f634af6a17c96457b9395cd67 100644 (file)
@@ -1049,7 +1049,7 @@ static void do_force_cutsVERLET(FILE *fplog,
     nonbonded_verlet_t *nbv = fr->nbv;
 
     bStateChanged = ((flags & GMX_FORCE_STATECHANGED) != 0);
-    bNS           = ((flags & GMX_FORCE_NS) != 0) && (!fr->bAllvsAll);
+    bNS           = ((flags & GMX_FORCE_NS) != 0);
     bFillGrid     = (bNS && bStateChanged);
     bCalcCGCM     = (bFillGrid && !DOMAINDECOMP(cr));
     bDoForces     = ((flags & GMX_FORCE_FORCES) != 0);
@@ -1836,7 +1836,7 @@ static void do_force_cutsGROUP(FILE *fplog,
     }
 
     bStateChanged  = ((flags & GMX_FORCE_STATECHANGED) != 0);
-    bNS            = ((flags & GMX_FORCE_NS) != 0) && (!fr->bAllvsAll);
+    bNS            = ((flags & GMX_FORCE_NS) != 0);
     /* Should we perform the long-range nonbonded evaluation inside the neighborsearching? */
     bFillGrid      = (bNS && bStateChanged);
     bCalcCGCM      = (bFillGrid && !DOMAINDECOMP(cr));
index 6f2657b02f3f6c2ccab52eec797b154dc164972d..f553e9f7bb125564accf86404b1ead4fed1800a9 100644 (file)
@@ -785,11 +785,6 @@ int Mdrunner::mdrunner()
         gmx_fatal(FARGS, "The .mdp file specified an energy mininization or normal mode algorithm, and these are not compatible with mdrun -rerun");
     }
 
-    if (can_use_allvsall(inputrec, TRUE, cr, fplog) && DOMAINDECOMP(cr))
-    {
-        gmx_fatal(FARGS, "All-vs-all loops do not work with domain decomposition, use a single MPI rank");
-    }
-
     if (!(EEL_PME(inputrec->coulombtype) || EVDW_PME(inputrec->vdwtype)))
     {
         if (domdecOptions.numPmeRanks > 0)
index 8c7e620f565e9b57930ec313e6b34b5179c38a8f..1d3f9a1a0a8f529e5e9e48349aacfc1714951c7b 100644 (file)
@@ -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,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, 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.
@@ -151,11 +151,6 @@ struct t_forcerec { // NOLINT (clang-analyzer-optin.performance.Padding)
     int nbkernel_elec_modifier;
     int nbkernel_vdw_modifier;
 
-    /* Use special N*N kernels? */
-    gmx_bool bAllvsAll;
-    /* Private work data */
-    void    *AllvsAll_work;
-
     /* Cut-Off stuff.
      * Infinite cut-off's will be GMX_CUTOFF_INF (unlike in t_inputrec: 0).
      */