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

openmc-dev / openmc / 14515233533

17 Apr 2025 12:06PM UTC coverage: 83.16% (-2.3%) from 85.414%
14515233533

Pull #3087

github

web-flow
Merge 6ed397e9d into 47ca2916a
Pull Request #3087: wheel building with scikit build core

140769 of 169274 relevant lines covered (83.16%)

11830168.1 hits per line

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

75.0
/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
#endif
14

15
extern "C" bool openmc_master()
×
16
{
17
  return mpi::master;
×
18
}
19

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

26
#ifdef OPENMC_MPI
27

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

38
  return result;
565✔
39
}
×
40

41
} // namespace mpi
42

43
} // 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

© 2025 Coveralls, Inc