Skip to content

Commit

Permalink
allow arbitrary order in hybrid/overlay for #20 and #24
Browse files Browse the repository at this point in the history
  • Loading branch information
anjohan committed Jun 27, 2023
1 parent 0e38b3d commit 4f15c4a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions pair_allegro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ void PairAllegro<precision>::coeff(int narg, char **arg) {
model = torch::jit::freeze(model);
}


// In PyTorch >=1.11, this is now set_fusion_strategy
torch::jit::FusionStrategy strategy;
strategy = {{torch::jit::FusionBehavior::DYNAMIC, 10}};
Expand Down Expand Up @@ -470,9 +470,9 @@ void PairAllegro<precision>::compute(int eflag, int vflag){
for(int ii = 0; ii < ntotal; ii++){
int i = ilist[ii];

f[i][0] = forces[i][0];
f[i][1] = forces[i][1];
f[i][2] = forces[i][2];
f[i][0] += forces[i][0];
f[i][1] += forces[i][1];
f[i][2] += forces[i][2];
if (eflag_atom && ii < inum) eatom[i] = atomic_energies[i][0];
if(ii < inum) eng_vdwl += atomic_energies[i][0];
}
Expand Down
6 changes: 3 additions & 3 deletions pair_allegro_kokkos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,9 @@ void PairAllegroKokkos<precision>::compute(int eflag_in, int vflag_in)
Kokkos::parallel_reduce("Allegro: store forces",
Kokkos::RangePolicy<DeviceType>(0, ignum),
KOKKOS_LAMBDA(const int i, double &eng_vdwl){
f(i,0) = d_forces(i,0);
f(i,1) = d_forces(i,1);
f(i,2) = d_forces(i,2);
f(i,0) += d_forces(i,0);
f(i,1) += d_forces(i,1);
f(i,2) += d_forces(i,2);
if(eflag_atom && i < inum){
d_eatom(i) = d_atomic_energy(i);
}
Expand Down

0 comments on commit 4f15c4a

Please sign in to comment.