1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-04 19:25:56 +01:00

BUg fix, wait till complete.

This commit is contained in:
Peter Boyle 2016-02-14 16:21:21 -06:00
parent 41c2b09184
commit 42a9ac71d2

View File

@ -112,7 +112,24 @@ namespace Grid {
comms_bytes+=2.0*bytes;
Packets.push_back(p);
}
/*
void Communicate(void ) {
// typedef CartesianCommunicator::CommsRequest_t CommsRequest_t;
// std::vector<CommsRequest_t> reqs(0);
commtime-=usecond();
for(int i=0;i<Packets.size();i++){
_grid->SendToRecvFrom(
Packets[i].send_buf,
Packets[i].to_rank,
Packets[i].recv_buf,
Packets[i].from_rank,
Packets[i].bytes);
Packets[i].done = 1;
}
// _grid->SendToRecvFromComplete(reqs);
commtime+=usecond();
}
*/
void Communicate(void ) {
typedef CartesianCommunicator::CommsRequest_t CommsRequest_t;
std::vector<CommsRequest_t> reqs(0);
@ -124,10 +141,12 @@ namespace Grid {
Packets[i].recv_buf,
Packets[i].from_rank,
Packets[i].bytes);
Packets[i].done = 1;
}
_grid->SendToRecvFromComplete(reqs);
commtime+=usecond();
for(int i=0;i<Packets.size();i++){
Packets[i].done = 1;
}
}
///////////////////////////////////////////