Skip to content

Commit

Permalink
Intoduce a sentinel value to allow loading rebalanced files
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdonline committed Oct 29, 2024
1 parent cd7ac7d commit d0f0cfe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/coreneuron/io/nrn_setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ void nrn_read_filesdat(int& ngrp, int*& grp, const char* filesdat) {

nrn_assert(fscanf(fp, "%d\n", &iFile) == 1);
if ((iNum % nrnmpi_numprocs) == nrnmpi_myid) {
if (iFile == -1) {
// Sentinel value, we are done for this rank
break;

Check warning on line 221 in src/coreneuron/io/nrn_setup.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreneuron/io/nrn_setup.cpp#L221

Added line #L221 was not covered by tests
}
grp[ngrp] = iFile;
ngrp++;
}
Expand Down

0 comments on commit d0f0cfe

Please sign in to comment.