31 bool ready_to_execute =
true;
32 for (
size_t prelocI = 0; prelocI < num_loc_deps; prelocI++)
34 int locJ = spds.GetLocationDependencies()[prelocI];
37 for (
int m = 0; m < num_mess; m++)
41 int message_available = 0;
48 if (not message_available)
50 ready_to_execute =
false;
61 MPI_Recv(&upstream_psi[block_addr],
62 static_cast<int>(message_size),
71 if (error_code != MPI_SUCCESS)
73 std::stringstream err_stream;
74 err_stream <<
"################# Delayed receive error."
75 <<
" message size=" << message_size
76 <<
" as_num=" << angle_set_num <<
" num_mess=" << num_mess
77 <<
" m=" << m <<
" error="
79 char error_string[BUFSIZ];
80 int length_of_error_string, error_class;
81 MPI_Error_class(error_code, &error_class);
82 MPI_Error_string(error_class, error_string, &length_of_error_string);
83 err_stream << error_string <<
"\n";
84 MPI_Error_string(error_code, error_string, &length_of_error_string);
85 err_stream << error_string <<
"\n";
91 if (!ready_to_execute)
break;
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< bool > > prelocI_message_received
bool upstream_data_initialized
std::vector< std::vector< u_ll_int > > prelocI_message_size
AngleSetStatus ReceiveUpstreamPsi(int angle_set_num)
std::vector< int > prelocI_message_count
std::vector< std::vector< u_ll_int > > prelocI_message_blockpos
const chi::ChiMPICommunicatorSet & comm_set_
virtual void AllocatePrelocIOutgoingPsi(size_t num_grps, size_t num_angles, size_t num_loc_deps)
virtual std::vector< std::vector< double > > & PrelocIOutgoingPsi()=0
const SPDS & GetSPDS() const
const VecInt & GetLocationDependencies() const