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,
bool pme_gpu_supports_input(const t_inputrec& ir, std::string* error)
{
- std::list<std::string> 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();
}
- std::list<std::string> errorReasons;
- if (ir.efep != efepNO)
+ bool pme_gpu_mixed_mode_supports_input(const t_inputrec& ir, std::string* error)
+ {
- errorReasons.emplace_back("Free Energy Perturbation (in PME GPU mixed mode)");
++ 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)
+ {
- return addMessageIfNotSupported(errorReasons, error);
++ *error = errorReasons.toString();
+ }
++ 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,
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
// 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