• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openmc-dev / openmc / 21533365354

30 Jan 2026 10:48PM UTC coverage: 81.979% (-3.2%) from 85.162%
21533365354

Pull #3453

github

web-flow
Merge de22ee16c into 7b4617aff
Pull Request #3453: Secondary energy filter

17272 of 24046 branches covered (71.83%)

Branch coverage included in aggregate %.

50 of 52 new or added lines in 8 files covered. (96.15%)

4544 existing lines in 133 files now uncovered.

55847 of 65146 relevant lines covered (85.73%)

44003337.54 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

93.33
/src/message_passing.cpp
1
#include "openmc/message_passing.h"
2

3
namespace openmc {
4
namespace mpi {
5

6
int rank {0};
7
int n_procs {1};
8
bool master {true};
9

10
#ifdef OPENMC_MPI
11
MPI_Comm intracomm {MPI_COMM_NULL};
12
MPI_Datatype source_site {MPI_DATATYPE_NULL};
13
MPI_Datatype collision_track_site {MPI_DATATYPE_NULL};
14
#endif
15

16
extern "C" bool openmc_master()
10,230✔
17
{
18
  return mpi::master;
10,230✔
19
}
20

21
vector<int64_t> calculate_parallel_index_vector(int64_t size)
1,162✔
22
{
23
  vector<int64_t> result;
1,162✔
24
  result.resize(n_procs + 1);
1,162✔
25
  result[0] = 0;
1,162✔
26

27
#ifdef OPENMC_MPI
28

29
  // Populate the result with cumulative sum of the number of
30
  // surface source banks per process
31
  int64_t scan_total;
32
  MPI_Scan(&size, &scan_total, 1, MPI_INT64_T, MPI_SUM, intracomm);
552✔
33
  MPI_Allgather(
1,104✔
34
    &scan_total, 1, MPI_INT64_T, result.data() + 1, 1, MPI_INT64_T, intracomm);
552✔
35
#else
36
  result[1] = size;
610✔
37
#endif
38

39
  return result;
1,714✔
UNCOV
40
}
×
41

42
#ifdef OPENMC_MPI
43
// Specializations of the MPITypeMap template struct
44
template<>
45
const MPI_Datatype MPITypeMap<int>::mpi_type = MPI_INT;
46
template<>
47
const MPI_Datatype MPITypeMap<double>::mpi_type = MPI_DOUBLE;
48
#endif
49

50
} // namespace mpi
51

52
} // namespace openmc
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc