Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swarm comm debug fix #1217

Merged
merged 9 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- [[PR 1172]](https://github.com/parthenon-hpc-lab/parthenon/pull/1172) Make parthenon manager robust against external MPI init and finalize calls

### Fixed (not changing behavior/API/variables/...)
- [[PR 1217]](https://github.com/parthenon-hpc-lab/parthenon/pull/1217) Swarm comm debug fix
- [[PR 1215]](https://github.com/parthenon-hpc-lab/parthenon/pull/1215) Fix issue with uninitialized input parameter block data
- [[PR 1211]](https://github.com/parthenon-hpc-lab/parthenon/pull/1211) remove inline from WriteTaskGraph
- [[PR 1188]](https://github.com/parthenon-hpc-lab/parthenon/pull/1188) Fix hdf5 output issue for metadata none variables, update test.
Expand Down
24 changes: 13 additions & 11 deletions src/interface/swarm_comms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,18 +250,20 @@ void Swarm::LoadBuffers_() {
auto p_index = buffer_sorted(n).swarm_idx_;
if (swarm_d.IsActive(p_index)) {
const int m = buffer_sorted(n).sort_idx_;
const int bufid = neighbor_buffer_index(m);
if (m >= 0) {
const int bid = n - buffer_start[m];
int buffer_index = bid * particle_size;
swarm_d.MarkParticleForRemoval(p_index);
for (int i = 0; i < realPackDim; i++) {
bdvar.send[bufid](buffer_index) = vreal(i, p_index);
buffer_index++;
}
for (int i = 0; i < intPackDim; i++) {
bdvar.send[bufid](buffer_index) = static_cast<Real>(vint(i, p_index));
buffer_index++;
const int bufid = neighbor_buffer_index(m);
if (m >= 0) {
Yurlungur marked this conversation as resolved.
Show resolved Hide resolved
const int bid = n - buffer_start[m];
int buffer_index = bid * particle_size;
swarm_d.MarkParticleForRemoval(p_index);
for (int i = 0; i < realPackDim; i++) {
bdvar.send[bufid](buffer_index) = vreal(i, p_index);
buffer_index++;
}
for (int i = 0; i < intPackDim; i++) {
bdvar.send[bufid](buffer_index) = static_cast<Real>(vint(i, p_index));
buffer_index++;
}
}
}
}
Expand Down
Loading