print("Testing plugin potential with input file {}".format(os.path.abspath(tpr_filename)))
assert gmx.version.api_is_at_least(0, 0, 5)
- md = from_tpr([tpr_filename], append_output=False)
+ # Note that *threads* argument causes errors for MPI-enabled GROMACS.
+ # Ref #3563 and #3573
+ md = from_tpr([tpr_filename], append_output=False, threads=2)
# Create a WorkElement for the potential
params = {'sites': [1, 4],
logger.info("Testing plugin potential with input file {}".format(os.path.abspath(tpr_filename)))
assert gmx_version.api_is_at_least(0, 0, 5)
- md = from_tpr([tpr_filename, tpr_filename], append_output=False)
+ # Note that *threads* argument causes errors for MPI-enabled GROMACS.
+ # Ref #3563 and #3573
+ md = from_tpr([tpr_filename, tpr_filename], append_output=False, threads=2)
# Create a WorkElement for the potential
params = {'sites': [1, 4],
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2019, by the GROMACS development team, led by
+# Copyright (c) 2019,2020, 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.
ensemble_rank,
self.workdir
))
- # TODO: We have not exposed the ability to pass any run time parameters to mdrun.
- work = workflow.from_tpr(tpr_filenames)
+ # TODO: Normalize the way we pass run time parameters to mdrun.
+ # See also #3573
+ kwargs = getattr(resource_manager, 'mdrun_kwargs', {})
+ for key, value in kwargs.items():
+ logger.debug('Adding mdrun run time argument: {}'.format(key + '=' + str(value)))
+ work = workflow.from_tpr(tpr_filenames, **kwargs)
self.workspec = work.workspec
context = LegacyContext(work=self.workspec, workdir_list=workdir_list, communicator=ensemble_comm)
self.simulation_module_context = context
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2019, by the GROMACS development team, led by
+# Copyright (c) 2019,2020, 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.
import gmxapi as gmx
+# TODO: (#3573) Normalize the handling of run-time arguments.
+from gmxapi.simulation.mdrun import ResourceManager as _ResourceManager
+# Note that *threads* argument causes errors for MPI-enabled GROMACS.
+# Ref #3563 and #3573
+_ResourceManager.mdrun_kwargs = {'threads': 2}
+
# Configure the `logging` module before proceeding any further.
gmx.logger.setLevel(logging.WARNING)
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2019, by the GROMACS development team, led by
+# Copyright (c) 2019,2020, 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.
import pytest
+# TODO: (#3573) Normalize the handling of run-time arguments.
+from gmxapi.simulation.mdrun import ResourceManager as _ResourceManager
+# Note that *threads* argument causes errors for MPI-enabled GROMACS.
+# Ref #3563 and #3573
+_ResourceManager.mdrun_kwargs = {'threads': 2}
+
withmpi_only = None
try: