-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Description
We now restrict the CPU count in vacuum simulations:
openfe/openfe/protocols/openmm_rfe/equil_rfe_methods.py
Lines 972 to 977 in 9626bbf
| restrict_cpu = forcefield_settings.nonbonded_method.lower() == 'nocutoff' | |
| platform = omm_compute.get_openmm_platform( | |
| platform_name=protocol_settings.engine_settings.compute_platform, | |
| gpu_device_index=protocol_settings.engine_settings.gpu_device_index, | |
| restrict_cpu_count=restrict_cpu | |
| ) |
and
openfe/openfe/protocols/openmm_afe/base.py
Lines 196 to 202 in 9626bbf
| # Restrict CPU count if running vacuum simulation | |
| restrict_cpu = settings['forcefield_settings'].nonbonded_method.lower() == 'nocutoff' | |
| platform = omm_compute.get_openmm_platform( | |
| platform_name=settings['engine_settings'].compute_platform, | |
| gpu_device_index=settings['engine_settings'].gpu_device_index, | |
| restrict_cpu_count=restrict_cpu | |
| ) |
We shouldn't have to do this in the tests anymore:
openfe/openfe/tests/protocols/test_openmm_rfe_slow.py
Lines 21 to 34 in 9626bbf
| @pytest.fixture | |
| def set_openmm_threads_1(): | |
| # for vacuum sims, we want to limit threads to one | |
| # this fixture sets OPENMM_CPU_THREADS='1' for a single test, then reverts to previously held value | |
| previous: str | None = os.environ.get('OPENMM_CPU_THREADS') | |
| try: | |
| os.environ['OPENMM_CPU_THREADS'] = '1' | |
| yield | |
| finally: | |
| if previous is None: | |
| del os.environ['OPENMM_CPU_THREADS'] | |
| else: | |
| os.environ['OPENMM_CPU_THREADS'] = previous |
Metadata
Metadata
Assignees
Labels
No labels