Skip to content

Commit

Permalink
use cpu_affinity to avoid painfully slow MDs when num_workers_per_blo…
Browse files Browse the repository at this point in the history
…ck >> 1
  • Loading branch information
svandenhaute committed Nov 1, 2023
1 parent e159a94 commit acbfa51
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions psiflow/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ def load(
cores_per_worker=definition.cores_per_worker,
max_workers=max_workers,
provider=definition.parsl_provider,
cpu_affinity="block",
)
else:
executor = ThreadPoolExecutor(
Expand Down
15 changes: 12 additions & 3 deletions tests/test_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,9 +541,18 @@ def test_pyscf_timeout(context):
basis = "cc-pvqz"
spin = 0
reference = PySCFReference(routine, basis, spin)
atoms = FlowAtoms(
numbers=np.ones(4),
positions=np.array([[0, 0, 0], [0.74, 0, 0], [0, 3, 0], [0.74, 3, 0]]),
atoms = FlowAtoms( # 3 x H2
numbers=np.ones(6),
positions=np.array(
[
[0, 0, 0],
[0.74, 0, 0],
[0, 3, 0],
[0.74, 3, 0],
[0, 6, 0],
[0.74, 6, 0],
]
),
)
reference.evaluate(atoms).result()
assert not atoms.reference_status

0 comments on commit acbfa51

Please sign in to comment.