From: Andrey Alekseenko Date: Mon, 18 Oct 2021 14:31:36 +0000 (+0200) Subject: Merge release-2021 into master X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?p=alexxy%2Fgromacs.git;a=commitdiff_plain;h=8073360f849809b7ce4fa5b5f14ae16209ca087f Merge release-2021 into master Brings the following fixes from the release branch into master: - #4148 (!1941) - #4167 (!1966) - #4190 (!2050) - !2039 --- 8073360f849809b7ce4fa5b5f14ae16209ca087f diff --cc docs/gmxapi/userguide/install.rst index f0ab2210fb,8588156a48..e1994e9c74 --- a/docs/gmxapi/userguide/install.rst +++ b/docs/gmxapi/userguide/install.rst @@@ -502,22 -496,9 +502,22 @@@ This will first build the *gmxapi* Pyth location in the build tree. Sphinx can then import the package to automatically extract Python docstrings. +Note that this is an entirely CMake-driven installation and Python dependencies +will not be installed automatically. You can update your Python environment +(before configuring with CMake) using the :file:`requirements.txt` files provided +in the :file:`python_packaging/` directory of the repository. Example:: + + pip install -r python_packaging/requirements-docs.txt + +or + +:: + + pip install -r python_packaging/requirements-test.txt + Sometimes the build environment can choose a different Python interpreter than the one you intended. - You can set the ``Python3_ROOT`` or ``CMAKE_PREFIX_PATH`` CMake variable to + You can set the ``Python3_ROOT_DIR`` or ``CMAKE_PREFIX_PATH`` CMake variable to explicitly choose the Python installation or *venv* directory. If you use pyenv or pyenv-virtualenv to dynamically manage your Python version, diff --cc src/gromacs/ewald/pme.cpp index 7438077d0b,b0b59e6eed..e2c87459a0 --- a/src/gromacs/ewald/pme.cpp +++ b/src/gromacs/ewald/pme.cpp @@@ -164,22 -185,38 +164,36 @@@ bool pme_gpu_supports_hardware(const gm bool pme_gpu_supports_input(const t_inputrec& ir, std::string* error) { - std::list errorReasons; - if (!EEL_PME(ir.coulombtype)) - { - errorReasons.emplace_back("systems that do not use PME for electrostatics"); - } - if (ir.pme_order != 4) - { - errorReasons.emplace_back("interpolation orders other than 4"); - } - if (EVDW_PME(ir.vdwtype)) - { - errorReasons.emplace_back("Lennard-Jones PME"); - } - if (!EI_DYNAMICS(ir.eI)) - { - errorReasons.emplace_back( - "Cannot compute PME interactions on a GPU, because PME GPU requires a dynamical " - "integrator (md, sd, etc)."); - } - return addMessageIfNotSupported(errorReasons, error); + gmx::MessageStringCollector errorReasons; + // Before changing the prefix string, make sure that it is not searched for in regression tests. + errorReasons.startContext("PME GPU does not support:"); + errorReasons.appendIf(!EEL_PME(ir.coulombtype), + "Systems that do not use PME for electrostatics."); + errorReasons.appendIf((ir.pme_order != 4), "Interpolation orders other than 4."); + errorReasons.appendIf(EVDW_PME(ir.vdwtype), "Lennard-Jones PME."); + errorReasons.appendIf(!EI_DYNAMICS(ir.eI), "Non-dynamical integrator (use md, sd, etc)."); + errorReasons.finishContext(); + if (error != nullptr) + { + *error = errorReasons.toString(); + } + return errorReasons.isEmpty(); } + bool pme_gpu_mixed_mode_supports_input(const t_inputrec& ir, std::string* error) + { - std::list errorReasons; - if (ir.efep != efepNO) ++ gmx::MessageStringCollector errorReasons; ++ // Before changing the prefix string, make sure that it is not searched for in regression tests. ++ errorReasons.startContext("PME GPU in Mixed mode does not support:"); ++ errorReasons.appendIf(ir.efep != FreeEnergyPerturbationType::No, "Free Energy Perturbation."); ++ errorReasons.finishContext(); ++ if (error != nullptr) + { - errorReasons.emplace_back("Free Energy Perturbation (in PME GPU mixed mode)"); ++ *error = errorReasons.toString(); + } - return addMessageIfNotSupported(errorReasons, error); ++ return errorReasons.isEmpty(); + } + /*! \brief \libinternal * Finds out if PME with given inputs is possible to run on GPU. * This function is an internal final check, validating the whole PME structure on creation, diff --cc src/gromacs/mdrun/runner.cpp index 3bf1d5071c,423a90905c..887e7ba709 --- a/src/gromacs/mdrun/runner.cpp +++ b/src/gromacs/mdrun/runner.cpp @@@ -905,14 -814,9 +905,15 @@@ int Mdrunner::mdrunner( canUseGpuForNonbonded, gpuAccelerationOfNonbondedIsUseful(mdlog, *inputrec, GMX_THREAD_MPI), hw_opt.nthreads_tmpi); - useGpuForPme = decideWhetherToUseGpusForPmeWithThreadMpi( - useGpuForNonbonded, pmeTarget, pmeFftTarget, numDevicesToUse, userGpuTaskAssignment, - *hwinfo_, *inputrec, hw_opt.nthreads_tmpi, domdecOptions.numPmeRanks); + useGpuForPme = decideWhetherToUseGpusForPmeWithThreadMpi(useGpuForNonbonded, + pmeTarget, ++ pmeFftTarget, + numAvailableDevices, + userGpuTaskAssignment, + *hwinfo_, + *inputrec, + hw_opt.nthreads_tmpi, + domdecOptions.numPmeRanks); } GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR @@@ -1004,22 -888,14 +1005,23 @@@ // assignment. auto canUseGpuForNonbonded = buildSupportsNonbondedOnGpu(nullptr); useGpuForNonbonded = decideWhetherToUseGpusForNonbonded( - nonbondedTarget, userGpuTaskAssignment, emulateGpuNonbonded, canUseGpuForNonbonded, - gpuAccelerationOfNonbondedIsUseful(mdlog, *inputrec, !GMX_THREAD_MPI), gpusWereDetected); - useGpuForPme = decideWhetherToUseGpusForPme( - useGpuForNonbonded, pmeTarget, pmeFftTarget, userGpuTaskAssignment, *hwinfo_, - *inputrec, cr->sizeOfDefaultCommunicator, domdecOptions.numPmeRanks, gpusWereDetected); - useGpuForBonded = decideWhetherToUseGpusForBonded(useGpuForNonbonded, useGpuForPme, - bondedTarget, *inputrec, mtop, - domdecOptions.numPmeRanks, gpusWereDetected); + nonbondedTarget, + userGpuTaskAssignment, + emulateGpuNonbonded, + canUseGpuForNonbonded, + gpuAccelerationOfNonbondedIsUseful(mdlog, *inputrec, !GMX_THREAD_MPI), + gpusWereDetected); + useGpuForPme = decideWhetherToUseGpusForPme(useGpuForNonbonded, + pmeTarget, ++ pmeFftTarget, + userGpuTaskAssignment, + *hwinfo_, + *inputrec, + cr->sizeOfDefaultCommunicator, + domdecOptions.numPmeRanks, + gpusWereDetected); + useGpuForBonded = decideWhetherToUseGpusForBonded( + useGpuForNonbonded, useGpuForPme, bondedTarget, *inputrec, mtop, domdecOptions.numPmeRanks, gpusWereDetected); } GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR