From 67b9c7ec19ded16ccfac098012343d00e0c954bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Jan=C3=9Fen?= Date: Sat, 31 Aug 2024 10:50:24 +0200 Subject: [PATCH] Use a single ProcessPoolExecutor --- tests/test_evcurve_lammps_function_parallel.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/test_evcurve_lammps_function_parallel.py b/tests/test_evcurve_lammps_function_parallel.py index 8d388268..4db41e2e 100644 --- a/tests/test_evcurve_lammps_function_parallel.py +++ b/tests/test_evcurve_lammps_function_parallel.py @@ -37,14 +37,13 @@ def test_calc_evcurve_functional(self): executor=exe, potential_dataframe=df_pot_selected, ) - structure_dict = generate_structures_helper( - structure=result_dict["structure_with_optimized_positions_and_volume"], - vol_range=0.05, - num_points=11, - strain_lst=None, - axes=("x", "y", "z"), - ) - with ProcessPoolExecutor() as exe: + structure_dict = generate_structures_helper( + structure=result_dict["structure_with_optimized_positions_and_volume"], + vol_range=0.05, + num_points=11, + strain_lst=None, + axes=("x", "y", "z"), + ) result_dict = evaluate_with_parallel_executor( evaluate_function=evaluate_with_lammps, task_dict={"calc_energy": structure_dict},