Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
abkein committed Jan 15, 2025
1 parent 7aae1a0 commit 77ef868
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/compute_cluster_size_ext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ void ComputeClusterSizeExt::compute_vector()
cluster_data& clstr = clusters[clidx];
clstr.l_size = ns[2 * clidx + 1];
clstr.rearrange();
for (int i = 0; i < clstr.l_size; ++i) { peratom_size[clstr.atoms()[i]] = clstr.g_size; }
auto clatoms = clstr.atoms();
for (int i = 0; i < clstr.l_size; ++i) { peratom_size[clatoms[i]] = clstr.g_size; }
if ((clstr.g_size < size_cutoff) && (clstr.g_size > 1)) { cbs_all[clstr.g_size].push_back(clidx); }
if (clstr.host == comm->me) {
if (clstr.g_size < size_cutoff) { dist_local[clstr.g_size] += 1; }
Expand Down
9 changes: 7 additions & 2 deletions src/fix_cluster_crush_delete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,13 @@ void FixClusterCrushDelete::pre_exchange()
const auto& clstr = clusters[i];
if (clstr.g_size > kmax) {
++clusters2crush_local;
::memcpy(p2m.offset(atoms2move_local), clstr.atoms().data(), clstr.l_size * sizeof(int));
atoms2move_local += clstr.l_size;
// ::memcpy(p2m.offset(atoms2move_local), clstr.atoms().data(), clstr.l_size * sizeof(int));
const auto clatoms = clstr.atoms();
for (int i = 0; i < clstr.l_size; ++i) {
if (clatoms[i] >= atom->nlocal) { error->one(FLERR, "{}/pre_exchange:{}: particle index exceeds nlocal", style, comm->me); }
p2m[atoms2move_local++] = clatoms[i];
}
// atoms2move_local += clstr.l_size;
}
}

Expand Down

0 comments on commit 77ef868

Please sign in to comment.