Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
abkein committed Feb 9, 2025
1 parent 2c72fff commit dcd4039
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/compute_cluster_size_ext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,11 @@ void ComputeClusterSizeExt::compute_vector()
}
// possible segfault if actual cluster size exceeds LMP_NUCC_CLUSTER_MAX_SIZE + LMP_NUCC_CLUSTER_MAX_GHOST
const int clidx = cmap[clid];
clusters[clidx].atoms<false>()[ns[clidx].sz++] = i;
if (ns[clidx].sz < LMP_NUCC_CLUSTER_MAX_SIZE) {
clusters[clidx].atoms<false>()[ns[clidx].sz++] = i;
} else {
error->warning(FLERR, "{}: Cluster size exceeds max size", style);
}
}
}
for (const auto& [clid, clidx] : cmap) {
Expand Down

0 comments on commit dcd4039

Please sign in to comment.