19 const auto& delayed_location_dependencies =
21 const size_t num_delayed_loc_deps = delayed_location_dependencies.size();
24 bool all_messages_received =
true;
25 for (
size_t prelocI = 0; prelocI < num_delayed_loc_deps; prelocI++)
27 int locJ = delayed_location_dependencies[prelocI];
30 for (
int m = 0; m < num_mess; m++)
34 int message_available = 0;
41 if (not message_available)
43 all_messages_received =
false;
55 MPI_Recv(&upstream_psi[block_addr],
56 static_cast<int>(message_size),
65 if (error_code != MPI_SUCCESS)
67 std::stringstream err_stream;
68 err_stream <<
"################# Delayed receive error."
69 <<
" message size=" << message_size
70 <<
" as_num=" << angle_set_num <<
" num_mess=" << num_mess
71 <<
" m=" << m <<
" error="
74 char error_string[BUFSIZ];
75 int length_of_error_string, error_class;
76 MPI_Error_class(error_code, &error_class);
77 MPI_Error_string(error_class, error_string, &length_of_error_string);
78 err_stream << error_string <<
"\n";
79 MPI_Error_string(error_code, error_string, &length_of_error_string);
80 err_stream << error_string <<
"\n";
87 if (not all_messages_received)
return false;
unsigned long long int u_ll_int
static chi::MPI_Info & mpi
LogStream LogAllWarning()
MPI_Comm LocICommunicator(int locI) const
int MapIonJ(int locI, int locJ) const
const int & location_id
Current process rank.
std::vector< std::vector< u_ll_int > > delayed_prelocI_message_blockpos
std::vector< std::vector< u_ll_int > > delayed_prelocI_message_size
std::vector< int > delayed_prelocI_message_count
std::vector< std::vector< bool > > delayed_prelocI_message_received
bool ReceiveDelayedData(int angle_set_num)
const chi::ChiMPICommunicatorSet & comm_set_
virtual std::vector< std::vector< double > > & DelayedPrelocIOutgoingPsi()=0
const SPDS & GetSPDS() const
const VecInt & GetDelayedLocationDependencies() const