@@ -63,7 +63,6 @@ void copy_ifp_data_from_fission_banks(
6363}
6464
6565#ifdef OPENMC_MPI
66-
6766void broadcast_ifp_n_generation (int & n_generation,
6867 const vector<vector<int >>& delayed_groups,
6968 const vector<vector<double >>& lifetimes)
@@ -78,61 +77,6 @@ void broadcast_ifp_n_generation(int& n_generation,
7877 MPI_Bcast (&n_generation, 1 , MPI_INT, 0 , mpi::intracomm);
7978}
8079
81- void send_ifp_info (int64_t idx, int64_t n, int n_generation, int neighbor,
82- vector<MPI_Request>& requests, const vector<vector<int >>& delayed_groups,
83- vector<int >& send_delayed_groups, const vector<vector<double >>& lifetimes,
84- vector<double >& send_lifetimes)
85- {
86- // Copy data in send buffers
87- for (int i = idx; i < idx + n; i++) {
88- if (is_beta_effective_or_both ()) {
89- std::copy (delayed_groups[i].begin (), delayed_groups[i].end (),
90- send_delayed_groups.begin () + i * n_generation);
91- }
92- if (is_generation_time_or_both ()) {
93- std::copy (lifetimes[i].begin (), lifetimes[i].end (),
94- send_lifetimes.begin () + i * n_generation);
95- }
96- }
97- // Send delayed groups
98- if (is_beta_effective_or_both ()) {
99- requests.emplace_back ();
100- MPI_Isend (&send_delayed_groups[n_generation * idx],
101- n_generation * static_cast <int >(n), MPI_INT, neighbor, mpi::rank,
102- mpi::intracomm, &requests.back ());
103- }
104- // Send lifetimes
105- if (is_generation_time_or_both ()) {
106- requests.emplace_back ();
107- MPI_Isend (&send_lifetimes[n_generation * idx],
108- n_generation * static_cast <int >(n), MPI_DOUBLE, neighbor, mpi::rank,
109- mpi::intracomm, &requests.back ());
110- }
111- }
112-
113- void receive_ifp_data (int64_t idx, int64_t n, int n_generation, int neighbor,
114- vector<MPI_Request>& requests, vector<int >& delayed_groups,
115- vector<double >& lifetimes, vector<DeserializationInfo>& deserialization)
116- {
117- // Receive delayed groups
118- if (is_beta_effective_or_both ()) {
119- requests.emplace_back ();
120- MPI_Irecv (&delayed_groups[n_generation * idx],
121- n_generation * static_cast <int >(n), MPI_INT, neighbor, neighbor,
122- mpi::intracomm, &requests.back ());
123- }
124- // Receive lifetimes
125- if (is_generation_time_or_both ()) {
126- requests.emplace_back ();
127- MPI_Irecv (&lifetimes[n_generation * idx],
128- n_generation * static_cast <int >(n), MPI_DOUBLE, neighbor, neighbor,
129- mpi::intracomm, &requests.back ());
130- }
131- // Deserialization info to reconstruct data later
132- DeserializationInfo info = {idx, n};
133- deserialization.push_back (info);
134- }
135-
13680void copy_partial_ifp_data_to_source_banks (int64_t idx, int n, int64_t i_bank,
13781 const vector<vector<int >>& delayed_groups,
13882 const vector<vector<double >>& lifetimes)
@@ -146,31 +90,6 @@ void copy_partial_ifp_data_to_source_banks(int64_t idx, int n, int64_t i_bank,
14690 &simulation::ifp_source_lifetime_bank[i_bank]);
14791 }
14892}
149-
150- void deserialize_ifp_info (int n_generation,
151- const vector<DeserializationInfo>& deserialization,
152- const vector<int >& delayed_groups, const vector<double >& lifetimes)
153- {
154- for (auto info : deserialization) {
155- int64_t index_local = info.index_local ;
156- int64_t n = info.n ;
157-
158- for (int i = index_local; i < index_local + n; i++) {
159- if (is_beta_effective_or_both ()) {
160- vector<int > delayed_groups_received (
161- delayed_groups.begin () + n_generation * i,
162- delayed_groups.begin () + n_generation * (i + 1 ));
163- simulation::ifp_source_delayed_group_bank[i] = delayed_groups_received;
164- }
165- if (is_generation_time_or_both ()) {
166- vector<double > lifetimes_received (lifetimes.begin () + n_generation * i,
167- lifetimes.begin () + n_generation * (i + 1 ));
168- simulation::ifp_source_lifetime_bank[i] = lifetimes_received;
169- }
170- }
171- }
172- }
173-
17493#endif
17594
17695void copy_complete_ifp_data_to_source_banks (
0 commit comments