Skip to content

Commit 40a5602

Browse files
authored
Merge branch 'openmc-dev:develop' into Sensitivity-Analysis
2 parents 517891b + 8223099 commit 40a5602

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/state_point.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,16 @@ void write_source_point(std::string filename, span<SourceSite> source_bank,
625625
const vector<int64_t>& bank_index, bool use_mcpl)
626626
{
627627
std::string ext = use_mcpl ? "mcpl" : "h5";
628+
629+
int total_surf_particles = source_bank.size();
630+
#ifdef OPENMC_MPI
631+
int num_particles = source_bank.size();
632+
MPI_Allreduce(
633+
&num_particles, &total_surf_particles, 1, MPI_INT, MPI_SUM, mpi::intracomm);
634+
#endif
635+
628636
write_message("Creating source file {}.{} with {} particles ...", filename,
629-
ext, source_bank.size(), 5);
637+
ext, total_surf_particles, 5);
630638

631639
// Dispatch to appropriate function based on file type
632640
if (use_mcpl) {

0 commit comments

Comments
 (0)