From 3a6549f7744e32ac13542b05ed3791749632afeb Mon Sep 17 00:00:00 2001 From: Leandro Martinez Date: Wed, 25 Sep 2024 09:01:50 -0300 Subject: [PATCH] update interface to ChunkSplitters 3.0 --- Project.toml | 2 +- src/sitepotentials/assembly.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index ce1a6c0..8e4282d 100644 --- a/Project.toml +++ b/Project.toml @@ -24,7 +24,7 @@ UnitfulAtomic = "a7773ee8-282e-5fa2-be4e-bd808c38a91a" AtomsBase = "0.3, 0.4" AtomsCalculators = "0.2" Bumper = "0.6, 0.7" -ChunkSplitters = "2" +ChunkSplitters = "3" DiffResults = "1" Folds = "0.2.10" ForwardDiff = "0.10" diff --git a/src/sitepotentials/assembly.jl b/src/sitepotentials/assembly.jl index 10fb94d..6bbcf55 100644 --- a/src/sitepotentials/assembly.jl +++ b/src/sitepotentials/assembly.jl @@ -63,12 +63,12 @@ function energy_forces_virial( kwargs...) uE = energy_unit(V) fE = force_unit(V) - E_F_V = Folds.sum( collect(chunks(domain, ntasks)), + E_F_V = Folds.sum( collect(index_chunks(domain; n=ntasks)), executor; init=[ zero_energy(sys, V), zero_forces(sys, V), zero_virial(sys, V) ] - ) do (sub_domain, _) + ) do sub_domain E = zero_energy(sys, V) frc = zero_forces(sys, V)