Skip to content

Commit

Permalink
Update hiphive.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hrushikesh-s committed Oct 27, 2023
1 parent 9f61b69 commit 2a4c89c
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions src/atomate2/vasp/jobs/hiphive.py
Original file line number Diff line number Diff line change
Expand Up @@ -996,27 +996,27 @@ def fit_force_constants(
logger.info("We are starting Joblib_s parallellized jobs")

# With Joblib's parallellization
cutoff_results = Parallel(n_jobs=-1, backend="multiprocessing")
(delayed(_run_cutoffs)(i, cutoffs, n_cutoffs, parent_structure, structures,
supercell_matrix, fit_method,disp_cut, imaginary_tol, fit_kwargs) for
i, cutoffs in enumerate(all_cutoffs))
# cutoff_results = Parallel(
# n_jobs=min(os.cpu_count(), len(all_cutoffs)), backend="multiprocessing"
# )(
# delayed(_run_cutoffs)(
# i,
# cutoffs,
# n_cutoffs,
# parent_structure,
# structures,
# supercell_matrix,
# fit_method,
# disp_cut,
# imaginary_tol,
# fit_kwargs,
# )
# for i, cutoffs in enumerate(all_cutoffs)
# )
# cutoff_results = Parallel(n_jobs=-1, backend="multiprocessing")
# (delayed(_run_cutoffs)(i, cutoffs, n_cutoffs, parent_structure, structures,
# supercell_matrix, fit_method,disp_cut, imaginary_tol, fit_kwargs) for
# i, cutoffs in enumerate(all_cutoffs))
cutoff_results = Parallel(
n_jobs=min(os.cpu_count(), len(all_cutoffs)), backend="multiprocessing"
)(
delayed(_run_cutoffs)(
i,
cutoffs,
n_cutoffs,
parent_structure,
structures,
supercell_matrix,
fit_method,
disp_cut,
imaginary_tol,
fit_kwargs,
)
for i, cutoffs in enumerate(all_cutoffs)
)

logger.info(f"CUTOFF RESULTS \n {cutoff_results}")

Expand Down

0 comments on commit 2a4c89c

Please sign in to comment.