From 545ac79b3e1dfd48343aa72a87a7269d48d3e137 Mon Sep 17 00:00:00 2001 From: Andrey Alekseenko Date: Tue, 17 Aug 2021 05:26:56 +0000 Subject: [PATCH] Random cosmetic fixes --- admin/iwyu.sh | 4 ++-- api/legacy/include/gromacs/fileio/tpxio.h | 2 +- docs/dev-manual/build-system.rst | 2 +- docs/user-guide/mdp-options.rst | 4 ++-- src/external/clFFT/src/library/plan.cpp | 2 +- src/external/vmd_molfile/molfile_plugin.h | 2 +- src/gromacs/ewald/pme_gpu_calculate_splines.cuh | 2 +- src/gromacs/gmxpreprocess/hackblock.h | 2 +- src/gromacs/hardware/device_information.h | 2 +- src/gromacs/listed_forces/listed_internal.h | 2 +- src/gromacs/mdlib/sim_util.cpp | 2 +- src/gromacs/mdrun/legacymdrunoptions.cpp | 2 +- src/gromacs/mdrun/runner.cpp | 2 +- src/gromacs/mdtypes/forcebuffers.h | 4 ++-- src/gromacs/mdtypes/simulation_workload.h | 2 +- src/gromacs/mdtypes/state_propagator_data_gpu_impl.h | 2 +- .../kernel_file_generator/make_verlet_simd_kernel_files.py | 4 ++-- src/gromacs/tables/forcetable.cpp | 2 +- src/gromacs/taskassignment/decidegpuusage.cpp | 2 +- src/gromacs/utility/futil.cpp | 2 +- src/gromacs/utility/stringutil.h | 4 ++-- src/gromacs/utility/template_mp.h | 3 ++- 22 files changed, 28 insertions(+), 27 deletions(-) diff --git a/admin/iwyu.sh b/admin/iwyu.sh index 3d2fce6653..2962c562ed 100755 --- a/admin/iwyu.sh +++ b/admin/iwyu.sh @@ -2,7 +2,7 @@ # # This file is part of the GROMACS molecular simulation package. # -# Copyright (c) 2014, by the GROMACS development team, led by +# Copyright (c) 2014,2021, 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. @@ -73,7 +73,7 @@ if [ "$filename" == "" ]; then exit 1 fi -# We cannot detect wether it is a C++ or C header. Should be fine to always use C++ +# We cannot detect whether it is a C++ or C header. Should be fine to always use C++ if [ "${filename##*.}" == "h" ]; then cmd="$cmd -x c++" fi diff --git a/api/legacy/include/gromacs/fileio/tpxio.h b/api/legacy/include/gromacs/fileio/tpxio.h index 96ff4f6ca5..d58aaef91e 100644 --- a/api/legacy/include/gromacs/fileio/tpxio.h +++ b/api/legacy/include/gromacs/fileio/tpxio.h @@ -124,7 +124,7 @@ struct PartialDeserializedTprFile /* * These routines handle reading and writing of preprocessed * topology files in any of the following formats: - * TPR : topology in XDR format, portable accross platforms + * TPR : topology in XDR format, portable across platforms * * Files are written in the precision with which the source are compiled, * but double and single precision can be read by either. diff --git a/docs/dev-manual/build-system.rst b/docs/dev-manual/build-system.rst index 9c848a342e..7ad0ba958d 100644 --- a/docs/dev-manual/build-system.rst +++ b/docs/dev-manual/build-system.rst @@ -336,7 +336,7 @@ Variables affecting the ``all`` target Any ``CMAKE_BUILD_TYPE`` which enables asserts (e.g. ASAN) works. Such a configured build will run both the compiler as well as clang-tidy when building. The name of the clang-tidy executable is set with ``-DCLANG_TIDY=...``, and the full path to it can be set with ``-DCLANG_TIDY_EXE=...``. - To apply the automatic fixes to the issue identified clang-tidy should be run seperately (running clang-tidy + To apply the automatic fixes to the issue identified clang-tidy should be run separately (running clang-tidy with ``-fix-errors`` as part of the build can corrupt header files). To fix a specific file run ``clang-tidy -fix-errors -header-filter '.*' {file}``, to fix all files in parallel ``run-clang-tidy.py -fix -header-filter '.*' '(?length[1]; //NON_SQUARE_KERNEL_ORDER currKernelOrder; - // controling the transpose and swap kernel order + // controlling the transpose and swap kernel order // if leading dim is larger than the other dim it makes sense to swap and transpose if (clLengths[0] > clLengths[1]) { diff --git a/src/external/vmd_molfile/molfile_plugin.h b/src/external/vmd_molfile/molfile_plugin.h index 1a251c3778..c81f391798 100644 --- a/src/external/vmd_molfile/molfile_plugin.h +++ b/src/external/vmd_molfile/molfile_plugin.h @@ -343,7 +343,7 @@ typedef struct { int memory; /**< amount of memory used in Mbyte. XXX:? */ int runtype; /**< flag indicating the calculation method. */ int scftype; /**< SCF type: RHF, UHF, ROHF, GVB or MCSCF wfn. */ - int status; /**< indicates wether SCF and geometry optimization + int status; /**< indicates whether SCF and geometry optimization * have converged properly. */ int num_electrons; /**< number of electrons. XXX: can be fractional in some DFT codes */ int totalcharge; /**< total charge of system. XXX: can be fractional in some DFT codes */ diff --git a/src/gromacs/ewald/pme_gpu_calculate_splines.cuh b/src/gromacs/ewald/pme_gpu_calculate_splines.cuh index 6c85fff0ff..6e663175e0 100644 --- a/src/gromacs/ewald/pme_gpu_calculate_splines.cuh +++ b/src/gromacs/ewald/pme_gpu_calculate_splines.cuh @@ -173,7 +173,7 @@ __device__ __forceinline__ void pme_gpu_stage_atom_data(T* __restrict__ sm_desti * \tparam[in] atomsPerBlock Number of atoms processed by a block - should be accounted for * in the sizes of the shared memory arrays. * \tparam[in] atomsPerWarp Number of atoms processed by a warp - * \tparam[in] writeSmDtheta Bool controling if the theta derivative should be written to shared memory. Enables calculation of dtheta if set. + * \tparam[in] writeSmDtheta Bool controlling if the theta derivative should be written to shared memory. Enables calculation of dtheta if set. * \tparam[in] writeGlobal A boolean which tells if the theta values and gridlines should be written to global memory. Enables calculation of dtheta if set. * \param[in] kernelParams Input PME CUDA data in constant memory. * \param[in] atomIndexOffset Starting atom index for the execution block w.r.t. global memory. diff --git a/src/gromacs/gmxpreprocess/hackblock.h b/src/gromacs/gmxpreprocess/hackblock.h index 8e5e9c2722..4469056a99 100644 --- a/src/gromacs/gmxpreprocess/hackblock.h +++ b/src/gromacs/gmxpreprocess/hackblock.h @@ -177,7 +177,7 @@ struct MoleculePatch std::vector atom; //! Chargegroup number. int cgnr = NOTSET; - //! Type of attachement. + //! Type of attachment. int tp = 0; //! Number of control atoms. int nctl = 0; diff --git a/src/gromacs/hardware/device_information.h b/src/gromacs/hardware/device_information.h index d23279e436..079be8be45 100644 --- a/src/gromacs/hardware/device_information.h +++ b/src/gromacs/hardware/device_information.h @@ -80,7 +80,7 @@ enum class DeviceStatus : int IncompatibleClusterSize = 3, //! There are known issues with OpenCL on NVIDIA Volta and newer. IncompatibleNvidiaVolta = 4, - /* \brief The device originates from non-recommended SYCL backend. + /*! \brief The device originates from non-recommended SYCL backend. * The device might work by itself, but to simplify device allocation, it is marked as incompatible. * */ NotPreferredBackend = 5, diff --git a/src/gromacs/listed_forces/listed_internal.h b/src/gromacs/listed_forces/listed_internal.h index 9366efcce1..0689ba1263 100644 --- a/src/gromacs/listed_forces/listed_internal.h +++ b/src/gromacs/listed_forces/listed_internal.h @@ -145,7 +145,7 @@ struct bonded_threading_t int numAtomsForce = 0; /* There are two different ways to distribute the bonded force calculation - * over the threads. We dedice which to use based on the number of threads. + * over the threads. We decide which to use based on the number of threads. */ //! Maximum thread count for uniform distribution of bondeds over threads int max_nthread_uniform = 0; diff --git a/src/gromacs/mdlib/sim_util.cpp b/src/gromacs/mdlib/sim_util.cpp index 6bce5123f0..8c4c86a52d 100644 --- a/src/gromacs/mdlib/sim_util.cpp +++ b/src/gromacs/mdlib/sim_util.cpp @@ -1093,7 +1093,7 @@ static void reduceAndUpdateMuTot(DipoleData* dipoleData, } } -/*! \brief Combines MTS level0 and level1 force buffes into a full and MTS-combined force buffer. +/*! \brief Combines MTS level0 and level1 force buffers into a full and MTS-combined force buffer. * * \param[in] numAtoms The number of atoms to combine forces for * \param[in,out] forceMtsLevel0 Input: F_level0, output: F_level0 + F_level1 diff --git a/src/gromacs/mdrun/legacymdrunoptions.cpp b/src/gromacs/mdrun/legacymdrunoptions.cpp index c78f448792..478339c61e 100644 --- a/src/gromacs/mdrun/legacymdrunoptions.cpp +++ b/src/gromacs/mdrun/legacymdrunoptions.cpp @@ -110,7 +110,7 @@ int LegacyMdrunOptions::updateFromCommandLine(int argc, char** argv, ArrayRef forceMtsCombined_; //! The view to the force buffer ForceBuffersView view_; - //! Wether we use forceMtsCombined_ + //! Whether we use forceMtsCombined_ bool useForceMtsCombined_; }; diff --git a/src/gromacs/mdtypes/simulation_workload.h b/src/gromacs/mdtypes/simulation_workload.h index 66efe112ac..0d7ffe8225 100644 --- a/src/gromacs/mdtypes/simulation_workload.h +++ b/src/gromacs/mdtypes/simulation_workload.h @@ -160,7 +160,7 @@ class SimulationWorkload public: //! Whether to compute nonbonded pair interactions bool computeNonbonded = false; - //! Wether nonbonded pair forces are to be computed at slow MTS steps only + //! Whether nonbonded pair forces are to be computed at slow MTS steps only bool computeNonbondedAtMtsLevel1 = false; //! Whether total dipole needs to be computed bool computeMuTot = false; diff --git a/src/gromacs/mdtypes/state_propagator_data_gpu_impl.h b/src/gromacs/mdtypes/state_propagator_data_gpu_impl.h index ca319810cc..026eff554c 100644 --- a/src/gromacs/mdtypes/state_propagator_data_gpu_impl.h +++ b/src/gromacs/mdtypes/state_propagator_data_gpu_impl.h @@ -318,7 +318,7 @@ private: const DeviceStream* localStream_; //! GPU NBNXM non-local stream. const DeviceStream* nonLocalStream_; - //! GPU Update-constreaints stream. + //! GPU Update-constraints stream. const DeviceStream* updateStream_; // Streams to use for coordinates H2D and D2H copies (one event for each atom locality) diff --git a/src/gromacs/nbnxm/kernel_file_generator/make_verlet_simd_kernel_files.py b/src/gromacs/nbnxm/kernel_file_generator/make_verlet_simd_kernel_files.py index 85fcc5d964..383001f3c3 100755 --- a/src/gromacs/nbnxm/kernel_file_generator/make_verlet_simd_kernel_files.py +++ b/src/gromacs/nbnxm/kernel_file_generator/make_verlet_simd_kernel_files.py @@ -3,7 +3,7 @@ # This file is part of the GROMACS molecular simulation package. # # Copyright (c) 2013,2014,2015,2017,2018 by the GROMACS development team. -# Copyright (c) 2019,2020, by the GROMACS development team, led by +# Copyright (c) 2019,2020,2021, 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. @@ -47,7 +47,7 @@ # # Many C kernel files, each defining a single kernel function. These # functions can take a noticeable time to compile, and should tend -# to be in seperate files to take advantage of make-time +# to be in separate files to take advantage of make-time # parallelism. # # This script should be run from the directory in which it is diff --git a/src/gromacs/tables/forcetable.cpp b/src/gromacs/tables/forcetable.cpp index d8ad10e2cc..8099078baf 100644 --- a/src/gromacs/tables/forcetable.cpp +++ b/src/gromacs/tables/forcetable.cpp @@ -153,7 +153,7 @@ EwaldCorrectionTables generateEwaldCorrectionTables(const int numPoints, double x_r0; /* This function is called using either v_ewald_lr or v_lj_ewald_lr as a function argument - * depending on wether we should create electrostatic or Lennard-Jones Ewald tables. + * depending on whether we should create electrostatic or Lennard-Jones Ewald tables. */ if (numPoints < 2) diff --git a/src/gromacs/taskassignment/decidegpuusage.cpp b/src/gromacs/taskassignment/decidegpuusage.cpp index 25bf5f9bc1..36c4650f06 100644 --- a/src/gromacs/taskassignment/decidegpuusage.cpp +++ b/src/gromacs/taskassignment/decidegpuusage.cpp @@ -527,7 +527,7 @@ bool decideWhetherToUseGpusForBonded(bool useGpuForNonbonded, // is busy, for which we currently only check PME or Ewald. // (It would be better to dynamically assign bondeds based on timings) // Note that here we assume that the auto setting of PME ranks will not - // choose seperate PME ranks when nonBonded are assigned to the GPU. + // choose separate PME ranks when nonBonded are assigned to the GPU. bool usingOurCpuForPmeOrEwald = (EVDW_PME(inputrec.vdwtype) || (EEL_PME_EWALD(inputrec.coulombtype) && !useGpuForPme && numPmeRanksPerSimulation <= 0)); diff --git a/src/gromacs/utility/futil.cpp b/src/gromacs/utility/futil.cpp index befd2d34bb..d1ae16a696 100644 --- a/src/gromacs/utility/futil.cpp +++ b/src/gromacs/utility/futil.cpp @@ -342,7 +342,7 @@ gmx_bool gmx_fexist(const std::string& fname) FILE* test = fopen(fname.c_str(), "r"); if (test == nullptr) { -/*Windows doesn't allow fopen of directory - so we need to check this seperately */ +/*Windows doesn't allow fopen of directory - so we need to check this separately */ #if GMX_NATIVE_WINDOWS DWORD attr = GetFileAttributes(fname.c_str()); return (attr != INVALID_FILE_ATTRIBUTES) && (attr & FILE_ATTRIBUTE_DIRECTORY); diff --git a/src/gromacs/utility/stringutil.h b/src/gromacs/utility/stringutil.h index 5bc06b842b..a1da4501d8 100644 --- a/src/gromacs/utility/stringutil.h +++ b/src/gromacs/utility/stringutil.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2011-2018, The GROMACS development team. - * Copyright (c) 2019, by the GROMACS development team, led by + * Copyright (c) 2019,2021, 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. @@ -394,7 +394,7 @@ std::vector splitAndTrimDelimitedString(const std::string& str, cha * \p input, each match of \p from is replaced with \p to, and the search for * the next match begins after the end of the previous match. * - * Compexity is O(N), where N is length of output. + * Complexity is O(N), where N is length of output. * * \see replaceAllWords() */ diff --git a/src/gromacs/utility/template_mp.h b/src/gromacs/utility/template_mp.h index 8eda416476..acd3744f02 100644 --- a/src/gromacs/utility/template_mp.h +++ b/src/gromacs/utility/template_mp.h @@ -60,7 +60,8 @@ auto dispatchTemplatedFunction(Function&& f) return std::forward(f)(); } -/** \internal \brief Helper function to select appropriate template based on runtime values. +/*! \internal \brief + * Helper function to select appropriate template based on runtime values. * * Can use enums or booleans for template parameters. * These enums must have a member \c Count indicating the total number of valid values. -- 2.22.0