Updated to test gcc 9, clang 8, and cmake 3.15.1.
Also fixes for compilation with gcc 9 and clang 9 (still in release
candidate, not yet released)
Added a gmx_source_file_warning_suppression() CMake helper function
(like the recently introduced gmx_target_warning_suppression()) to
manage per-source-file suppressions. This is used to suppress a
warning about the abuse of t_inputrec that is too difficult to fix
without replacing all of the handling of initialization and broadcast
of t_inputrec and subfields.
Refs #2899, #3006
Fixes #3007
Change-Id: I3a31a40c472d420adbb38d11ed5121702d7b3f7d
# Test the mdrun-only build
# Test newest gcc at time of release
# TODO In combination with gmx from another build, arrange to run regressiontests
-gcc-7 mpi no-openmp fftpack mdrun-only
+gcc-9 mpi no-openmp fftpack mdrun-only
# Test MPMD PME with thread-MPI
# Test oldest supported icc
# Test clang + OpenMP
# Test clang in double precision
# Test AVX_128_FMA SIMD + Double (Important for Simd4N=Simd4 and sizeof(SimdInt32)!=4*GMX_SIMD_REAL_WIDTH)
-clang-5 double openmp simd=avx_128_fma npme=1 nranks=2 mpi
+clang-8 double openmp simd=avx_128_fma npme=1 nranks=2 mpi
# Test SSE2 SIMD
# Test CMAKE_BUILD_TYPE=Release
# Test MPMD PME with library MPI
gcc-5 gpuhw=nvidia cuda-9.0 cmake-3.9.6 mpi npme=1 nranks=2 openmp
+# Test newest cmake at time of release
# Test non-default use of mdrun -gpu_id
# Test newest gcc supported by newest CUDA at time of release
# Test thread-MPI with CUDA
# Test SIMD implementation of pair search for GPU code-path
# Test hwloc-2 support
-gcc-8 gpuhw=nvidia gpu_id=1 cuda-10.1 thread-mpi openmp cmake-3.10.0 release-with-assert simd=avx2_256 hwloc libhwloc-2.0.4
+gcc-8 gpuhw=nvidia gpu_id=1 cuda-10.1 thread-mpi openmp cmake-3.15.1 release-with-assert simd=avx2_256 hwloc libhwloc-2.0.4
# Test with libcxx
# Test with ThreadSanitizer + OpenMP + SIMD
# Test newest clang at time of release
# Test with AddressSanitizer (without OpenMP, see below)
-clang-7 no-openmp asan cmake-3.11.4
+clang-8 no-openmp asan cmake-3.11.4
# Test with clang-tidy (without OpenMP)
clang-7 no-openmp cmake-3.12.1 tidy
# Test external clFFT (for build speed)
# Test newest gcc at time of release
# Test hwloc-1 support
-gcc-8 openmp simd=avx2_256 gpuhw=amd opencl-1.2 clFFT-2.14 hwloc libhwloc-1.11.2
+gcc-9 openmp simd=avx2_256 gpuhw=amd opencl-1.2 clFFT-2.14 hwloc libhwloc-1.11.2 cmake-3.14.5
# TODO
-# Test newest cmake at time of release
# Add OpenMP support to ASAN build (but libomp.so in clang-4 reports leaks, so might need a suitable build or suppression)
# Test newest supported LTS Ubuntu
# Test AVX-512 when hardware is available
# Test mpi support
# Test mdrun-only build
-gcc-6 mpi mdrun-only release cmake-3.9.6
+gcc-9 mpi mdrun-only release cmake-3.9.6
# Test static linking with gcc
# Test newest gcc at time of release
-gcc-8 static release
+gcc-9 static release
# Test double precision
# Test with newest supported Intel compiler
# Test static linking with clang
# Test double precision
# Test newest supported clang version
-clang-5 static double release cmake-3.10.0
+clang-8 static double release cmake-3.10.0
# Test oldest supported gcc at time of release
# Test with GPU support
# targets may use the same suppression.
#
# This is generally used to suppress warnings judged not worth fixing
-# in code external to, or generated by, GROMACS.
+# in code external to, or generated by, GROMACS, or code that is
+# more efficient to work around and later replace, rather than fix.
function(gmx_target_warning_suppression TARGET WARNING_FLAG VARNAME)
check_cxx_compiler_flag(${WARNING_FLAG} ${VARNAME})
if(${VARNAME})
endif()
endfunction()
+# Add the WARNING_FLAG to the compile flags for SOURCE_FILE if the
+# compiler supports that flag. VARNAME is used to cache the result of
+# the check whether the compiler supports that flag, as multiple
+# targets may use the same suppression.
+#
+# This is generally used to suppress warnings judged not worth fixing
+# in code external to, or generated by, GROMACS, or code that is
+# more efficient to work around and later replace, rather than fix.
+function(gmx_source_file_warning_suppression SOURCE_FILE WARNING_FLAG VARNAME)
+ check_cxx_compiler_flag(${WARNING_FLAG} ${VARNAME})
+ if(${VARNAME})
+ set_source_files_properties(${SOURCE_FILE} PROPERTIES COMPILE_FLAGS ${WARNING_FLAG})
+ endif()
+endfunction()
+
# This is the actual exported function to be called
macro (gmx_c_flags)
target_compile_definitions(gtest PRIVATE _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
target_compile_definitions(gtest_main PRIVATE _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
endif()
+ gmx_target_warning_suppression(gmock -Wno-deprecated-copy HAVE_NO_DEPRECATED_COPY)
set(GTEST_IS_THREADSAFE "${GTEST_IS_THREADSAFE}" PARENT_SCOPE)
endif()
add_subdirectory(selection)
endif()
+# Suppress a warning about our abuse of t_inputrec
+gmx_source_file_warning_suppression(mdtypes/inputrec.cpp -Wno-class-memaccess HAS_NO_CLASS_MEMACCESS)
+
# Handle the object libraries that contain the source file
# dependencies that need special handling because they are generated
# or external code.
class DensityFittingAmplitudeLookupImpl
{
public:
+ DensityFittingAmplitudeLookupImpl() = default;
+ DensityFittingAmplitudeLookupImpl(const DensityFittingAmplitudeLookupImpl &) = default;
virtual ~DensityFittingAmplitudeLookupImpl() = default;
virtual const std::vector<real> &operator()(const t_mdatoms &atoms,
class UnitAmplitudes final : public DensityFittingAmplitudeLookupImpl
{
public:
- ~UnitAmplitudes() override = default;
+ UnitAmplitudes() = default;
+ UnitAmplitudes(const UnitAmplitudes &) = default;
+ ~UnitAmplitudes() override = default;
std::unique_ptr<DensityFittingAmplitudeLookupImpl> clone() override;
const std::vector<real> &operator()(const t_mdatoms &atoms,
ArrayRef<const int> localIndex) override;
std::unique_ptr<DensityFittingAmplitudeLookupImpl> UnitAmplitudes::clone()
{
- auto clone = std::make_unique<UnitAmplitudes>();
- clone->amplitude_ = amplitude_;
- return std::move(clone);
+ return std::make_unique<UnitAmplitudes>(*this);
};
const std::vector<real> &UnitAmplitudes::operator()(const t_mdatoms & /*atoms*/,
class ChargesAsAmplitudes final : public DensityFittingAmplitudeLookupImpl
{
public:
- ~ChargesAsAmplitudes() override = default;
+ ChargesAsAmplitudes() = default;
+ ChargesAsAmplitudes(const ChargesAsAmplitudes &) = default;
+ ~ChargesAsAmplitudes() override = default;
std::unique_ptr<DensityFittingAmplitudeLookupImpl> clone() override;
const std::vector<real> &operator()(const t_mdatoms &atoms,
ArrayRef<const int> localIndex) override;
std::unique_ptr<DensityFittingAmplitudeLookupImpl> ChargesAsAmplitudes::clone()
{
- auto clone = std::make_unique<ChargesAsAmplitudes>();
- clone->amplitude_ = amplitude_;
- return std::move(clone);
+ return std::make_unique<ChargesAsAmplitudes>(*this);
};
const std::vector<real> &ChargesAsAmplitudes::operator()(const t_mdatoms &atoms,
class MassesAsAmplitudes final : public DensityFittingAmplitudeLookupImpl
{
public:
- ~MassesAsAmplitudes() override = default;
+ MassesAsAmplitudes() = default;
+ MassesAsAmplitudes(const MassesAsAmplitudes &) = default;
+ ~MassesAsAmplitudes() override = default;
std::unique_ptr<DensityFittingAmplitudeLookupImpl> clone() override;
const std::vector<real> &operator()(const t_mdatoms &atoms,
ArrayRef<const int> localIndex) override;
std::unique_ptr<DensityFittingAmplitudeLookupImpl> MassesAsAmplitudes::clone()
{
- auto clone = std::make_unique<MassesAsAmplitudes>();
- clone->amplitude_ = amplitude_;
- return std::move(clone);
+ return std::make_unique<MassesAsAmplitudes>(*this);
};
const std::vector<real> &MassesAsAmplitudes::operator()(const t_mdatoms &atoms,
}
int nzone = (1 << dd->ndim);
+ GMX_ASSERT(dd->ndim < DIM, "Invalid number of dimensions");
int nizone = (1 << std::max(dd->ndim - 1, 0));
assert(nizone >= 1 && nizone <= DD_MAXIZONE);
else
{
int t0_set;
- int thread;
/* Do the constraints, if present, on the first thread.
* Do the settles on all other threads.
t0_set = ((!at2con_mt.empty() && dc->nthread > 1) ? 1 : 0);
#pragma omp parallel for num_threads(dc->nthread) schedule(static)
- for (thread = 0; thread < dc->nthread; thread++)
+ for (int thread = 0; thread < dc->nthread; thread++)
{
try
{
}
/* Combine the generate settles and requested indices */
- for (thread = 1; thread < dc->nthread; thread++)
+ for (int thread = 1; thread < dc->nthread; thread++)
{
t_ilist *ilst;
int ia;
int izone, cg0, cg1;
real rc2;
int nbonded_local;
- int thread;
gmx_reverse_top_t *rt;
if (dd->reverse_top->bInterCGInteractions)
const int numThreads = rt->th_work.size();
#pragma omp parallel for num_threads(numThreads) schedule(static)
- for (thread = 0; thread < numThreads; thread++)
+ for (int thread = 0; thread < numThreads; thread++)
{
try
{
const matrix recipbox,
PmeAtomComm *atc)
{
- int nthread, thread, slab;
-
- nthread = atc->nthread;
+ int nthread = atc->nthread;
#pragma omp parallel for num_threads(nthread) schedule(static)
- for (thread = 0; thread < nthread; thread++)
+ for (int thread = 0; thread < nthread; thread++)
{
try
{
}
/* Non-parallel reduction, since nslab is small */
- for (thread = 1; thread < nthread; thread++)
+ for (int thread = 1; thread < nthread; thread++)
{
- for (slab = 0; slab < atc->nslab; slab++)
+ for (int slab = 0; slab < atc->nslab; slab++)
{
atc->count_thread[0][slab] += atc->count_thread[thread][slab];
}
void pme_init_all_work(struct pme_solve_work_t **work, int nthread, int nkx)
{
- int thread;
/* Use fft5d, order after FFT is y major, z, x minor */
snew(*work, nthread);
/* Allocate the work arrays thread local to optimize memory access */
#pragma omp parallel for num_threads(nthread) schedule(static)
- for (thread = 0; thread < nthread; thread++)
+ for (int thread = 0; thread < nthread; thread++)
{
try
{
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2009,2010,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2012,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.
fft5d_plan fft5d_plan_3d(int NG, int MG, int KG, MPI_Comm comm[2], int flags, t_complex** rlin, t_complex** rlout, t_complex** rlout2, t_complex** rlout3, int nthreads, gmx::PinningPolicy realGridAllocationPinningPolicy)
{
- int P[2], prank[2], i, t;
+ int P[2], prank[2], i;
bool bMaster;
int rNG, rMG, rKG;
int *N0 = nullptr, *N1 = nullptr, *M0 = nullptr, *M1 = nullptr, *K0 = nullptr, *K1 = nullptr, *oN0 = nullptr, *oN1 = nullptr, *oM0 = nullptr, *oM1 = nullptr, *oK0 = nullptr, *oK1 = nullptr;
(later is only important to not confuse valgrind)
*/
#pragma omp parallel for num_threads(nthreads) schedule(static) ordered
- for (t = 0; t < nthreads; t++)
+ for (int t = 0; t < nthreads; t++)
{
#pragma omp ordered
{
{
return FALSE;
}
- if (name == nullptr && lc->names[index] == nullptr)
+ if ((name == nullptr) && (lc->names[index] == nullptr))
{
return TRUE;
}
- if ((name == nullptr) != (lc->names[index] == nullptr))
+ if (((name != nullptr) && (lc->names[index] == nullptr)) ||
+ ((name == nullptr) && (lc->names[index] != nullptr)))
{
return FALSE;
}
matrix box;
real t, ccut, dist = 0.0, ang = 0.0;
double max_nhb, aver_nhb, aver_dist;
- int h = 0, i = 0, j, k = 0, ogrp, nsel;
- int xi, yi, zi, ai;
+ int h = 0, i = 0, j, k = 0, ogrp, nsel;
+ int xi = 0, yi, zi, ai;
int xj, yj, zj, aj, xjj, yjj, zjj;
gmx_bool bSelected, bHBmap, bStop, bTwo, bBox, bTric;
int *adist, *rdist;
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2012,2014,2015,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2012,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.
int nChargePerturbed,
dvec mu, dvec mu_B)
{
- int i, end, m;
+ int end, m;
double mu_x, mu_y, mu_z;
end = start + homenr;
mu_x = mu_y = mu_z = 0.0;
#pragma omp parallel for reduction(+: mu_x, mu_y, mu_z) schedule(static) \
num_threads(gmx_omp_nthreads_get(emntDefault))
- for (i = start; i < end; i++)
+ for (int i = start; i < end; i++)
{
// Trivial OpenMP region that cannot throw
mu_x += q[i]*x[i][XX];
mu_x = mu_y = mu_z = 0.0;
#pragma omp parallel for reduction(+: mu_x, mu_y, mu_z) schedule(static) \
num_threads(gmx_omp_nthreads_get(emntDefault))
- for (i = start; i < end; i++)
+ for (int i = start; i < end; i++)
{
// Trivial OpenMP region that cannot throw
mu_x += qB[i]*x[i][XX];
int nsettle;
t_pbc pbc, *pbc_null;
char buf[22];
- int nth, th;
+ int nth;
wallcycle_start(wcycle, ewcCONSTR);
{
case ConstraintVariable::Positions:
#pragma omp parallel for num_threads(nth) schedule(static)
- for (th = 0; th < nth; th++)
+ for (int th = 0; th < nth; th++)
{
try
{
case ConstraintVariable::Force:
case ConstraintVariable::ForceDispl:
#pragma omp parallel for num_threads(nth) schedule(static)
- for (th = 0; th < nth; th++)
+ for (int th = 0; th < nth; th++)
{
try
{
t_nrnb *nrnb)
{
ivec *nFreeze = ir->opts.nFreeze;
- int n, d;
+ int d;
int nthreads gmx_unused;
#ifndef __clang_analyzer__
/* Scale the positions */
#pragma omp parallel for num_threads(nthreads) schedule(static)
- for (n = start; n < start+nr_atoms; n++)
+ for (int n = start; n < start+nr_atoms; n++)
{
// Trivial OpenMP region that does not throw
int g;
/* Calculate Ewald surface terms, when necessary */
if (haveEwaldSurfaceTerms)
{
- int nthreads, t;
-
wallcycle_sub_start(wcycle, ewcsEWALD_CORRECTION);
if (fr->n_tpi > 0)
gmx_fatal(FARGS, "TPI with PME currently only works in a 3D geometry with tin-foil boundary conditions");
}
- nthreads = fr->nthread_ewc;
+ int nthreads = fr->nthread_ewc;
#pragma omp parallel for num_threads(nthreads) schedule(static)
- for (t = 0; t < nthreads; t++)
+ for (int t = 0; t < nthreads; t++)
{
try
{
gmx_ekindata_t *ekind, real cos_accel)
{
int i;
- int nthread, thread;
/* bNEMD tells if we should remove remove the COM velocity
* from the velocities during velocity scaling in T-coupling.
ekind->tcstat[i].ekinscalef_nhc = 1.0;
}
- nthread = gmx_omp_nthreads_get(emntUpdate);
+ int nthread = gmx_omp_nthreads_get(emntUpdate);
ekind->nthreads = nthread;
snew(ekind->ekin_work_alloc, nthread);
snew(ekind->ekin_work, nthread);
snew(ekind->dekindl_work, nthread);
#pragma omp parallel for num_threads(nthread) schedule(static)
- for (thread = 0; thread < nthread; thread++)
+ for (int thread = 0; thread < nthread; thread++)
{
try
{
int g;
gmx::ArrayRef<t_grp_tcstat> tcstat = ekind->tcstat;
gmx::ArrayRef<t_grp_acc> grpstat = ekind->grpstat;
- int nthread, thread;
/* three main: VV with AveVel, vv with AveEkin, leap with AveEkin. Leap with AveVel is also
an option, but not supported now.
}
}
ekind->dekindl_old = ekind->dekindl;
- nthread = gmx_omp_nthreads_get(emntUpdate);
+ int nthread = gmx_omp_nthreads_get(emntUpdate);
#pragma omp parallel for num_threads(nthread) schedule(static)
- for (thread = 0; thread < nthread; thread++)
+ for (int thread = 0; thread < nthread; thread++)
{
// This OpenMP only loops over arrays and does not call any functions
// or memory allocation. It should not be able to throw, so for now
}
ekind->dekindl = 0;
- for (thread = 0; thread < nthread; thread++)
+ for (int thread = 0; thread < nthread; thread++)
{
for (g = 0; g < opts->ngtc; g++)
{
}
if (inputrec->eI == eiSD1)
{
- int nth, th;
int homenr = md->homenr;
/* Cast delta_t from double to real to make the integrators faster.
wallcycle_start(wcycle, ewcUPDATE);
- nth = gmx_omp_nthreads_get(emntUpdate);
+ int nth = gmx_omp_nthreads_get(emntUpdate);
#pragma omp parallel for num_threads(nth) schedule(static)
- for (th = 0; th < nth; th++)
+ for (int th = 0; th < nth; th++)
{
try
{
t_inputrec::t_inputrec()
{
+ // TODO When this memset is removed, remove the suppression of
+ // gcc -Wno-class-memaccess in a CMakeLists.txt file.
std::memset(this, 0, sizeof(*this)); // NOLINT(bugprone-undefined-memory-manipulation)
snew(fepvals, 1);
snew(expandedvals, 1);
void put_atoms_in_box_omp(int ePBC, const matrix box, gmx::ArrayRef<gmx::RVec> x, gmx_unused int nth)
{
- int t;
-
#pragma omp parallel for num_threads(nth) schedule(static)
- for (t = 0; t < nth; t++)
+ for (int t = 0; t < nth; t++)
{
try
{
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,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.
root->registerSubTopic<SimpleHelpTopic<EvaluationHelpText> >();
root->registerSubTopic<SimpleHelpTopic<LimitationsHelpText> >();
root->registerSubTopic<SimpleHelpTopic<ExamplesHelpText> >();
- return std::move(root);
+ return HelpTopicPointer(root.release());
}
//! \endcond
{nullptr, &sm_permute},
};
- size_t i;
int rc;
bool bOk;
bOk = true;
- for (i = 0; i < asize(smtable_def); ++i)
+ for (int i = 0; i < asize(smtable_def); ++i)
{
gmx_ana_selmethod_t *method = smtable_def[i].method;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2017,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.
"off"
};
- for (size_t i = 0; i < asize(sym_reserved); ++i)
+ for (int i = 0; i < asize(sym_reserved); ++i)
{
SymbolPointer sym(new SelectionParserSymbol(
new SelectionParserSymbol::Impl(
*
* 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.
const int width = 18;
char buf[30];
const int offset = centeringOffset(width, strlen(Contributors[i]));
- GMX_RELEASE_ASSERT(strlen(Contributors[i]) + offset < asize(buf),
+ GMX_RELEASE_ASSERT(static_cast<int>(strlen(Contributors[i])) + offset < asize(buf),
"Formatting buffer is not long enough");
std::fill(buf, buf+width, ' ');
std::strcpy(buf+offset, Contributors[i]);
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2013, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,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.
{ "bonds.dlg", BondsCB }
};
static t_mmb *mi[emNR] = { quit_mb, help_mb, about_mb, ni_mb };
- unsigned int i;
snew(gmx->dlgs, edNR);
- for (i = 0; (i < asize(di)); i++)
+ for (int i = 0; (i < asize(di)); i++)
{
gmx->dlgs[i] = ReadDlg(x11, gmx->wd->self, di[i].dlgfile,
di[i].dlgfile,
gmx->dlgs[edFilter] = select_filter(x11, gmx);
snew(gmx->mboxes, emNR);
- for (i = 0; (i < emNR); i++)
+ for (int i = 0; (i < emNR); i++)
{
gmx->mboxes[i] = mi[i](x11, gmx);
}
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2013, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,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.
"fixed"
};
#define NSF asize(sfname)
- unsigned int i;
+ int i;
unsigned long bg;
char *newcol;
t_logo *logo;
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2013, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,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.
static int search_ac(const char *type)
{
- unsigned int i, nb, mij, best, besti;
+ unsigned int nb, mij, best, besti;
best = 0;
besti = 0;
if (nullptr != type)
{
- for (i = 0; (i < NAC); i++)
+ for (int i = 0; (i < NAC); i++)
{
mij = std::min(static_cast<int>(std::strlen(type)), static_cast<int>(std::strlen(ac[i].tp)));
for (nb = 0; (nb < mij); nb++)