From: Mark Abraham Date: Mon, 7 Jan 2019 01:19:46 +0000 (+0100) Subject: Finish removing group-scheme all-vs-all support X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=8d3da2fb965dbed25458175fb9434a0f91a29644;p=alexxy%2Fgromacs.git Finish removing group-scheme all-vs-all support 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 --- diff --git a/docs/user-guide/environment-variables.rst b/docs/user-guide/environment-variables.rst index a03d2958ad..ebfbe22ffa 100644 --- a/docs/user-guide/environment-variables.rst +++ b/docs/user-guide/environment-variables.rst @@ -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 index 57bd21d9a5..0000000000 --- a/src/gromacs/gmxlib/nonbonded/nb_kernel_c/nb_kernel_allvsall.cpp +++ /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 - -#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(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 index b52347f1a2..0000000000 --- a/src/gromacs/gmxlib/nonbonded/nb_kernel_c/nb_kernel_allvsall.h +++ /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 diff --git a/src/gromacs/gmxlib/nonbonded/nonbonded.cpp b/src/gromacs/gmxlib/nonbonded/nonbonded.cpp index 270f9ecf59..8ca8aa9ef6 100644 --- a/src/gromacs/gmxlib/nonbonded/nonbonded.cpp +++ b/src/gromacs/gmxlib/nonbonded/nonbonded.cpp @@ -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; diff --git a/src/gromacs/gmxlib/nrnb.cpp b/src/gromacs/gmxlib/nrnb.cpp index 55d0695aee..2755e8f238 100644 --- a/src/gromacs/gmxlib/nrnb.cpp +++ b/src/gromacs/gmxlib/nrnb.cpp @@ -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. diff --git a/src/gromacs/gmxlib/nrnb.h b/src/gromacs/gmxlib/nrnb.h index 727297dc5a..dbdcd202ce 100644 --- a/src/gromacs/gmxlib/nrnb.h +++ b/src/gromacs/gmxlib/nrnb.h @@ -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, diff --git a/src/gromacs/mdlib/forcerec.cpp b/src/gromacs/mdlib/forcerec.cpp index 6ad3940728..763aaaa6c1 100644 --- a/src/gromacs/mdlib/forcerec.cpp +++ b/src/gromacs/mdlib/forcerec.cpp @@ -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); diff --git a/src/gromacs/mdlib/forcerec.h b/src/gromacs/mdlib/forcerec.h index 643b8997cf..1316e872ff 100644 --- a/src/gromacs/mdlib/forcerec.h +++ b/src/gromacs/mdlib/forcerec.h @@ -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 diff --git a/src/gromacs/mdlib/sim_util.cpp b/src/gromacs/mdlib/sim_util.cpp index 22b13e8825..9c381d5559 100644 --- a/src/gromacs/mdlib/sim_util.cpp +++ b/src/gromacs/mdlib/sim_util.cpp @@ -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)); diff --git a/src/gromacs/mdrun/runner.cpp b/src/gromacs/mdrun/runner.cpp index 6f2657b02f..f553e9f7bb 100644 --- a/src/gromacs/mdrun/runner.cpp +++ b/src/gromacs/mdrun/runner.cpp @@ -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) diff --git a/src/gromacs/mdtypes/forcerec.h b/src/gromacs/mdtypes/forcerec.h index 8c7e620f56..1d3f9a1a0a 100644 --- a/src/gromacs/mdtypes/forcerec.h +++ b/src/gromacs/mdtypes/forcerec.h @@ -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). */