1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

Fixes and better timing

This commit is contained in:
Peter Boyle 2017-04-26 17:24:11 -04:00
parent 2a6d093749
commit 99220f6531
2 changed files with 4 additions and 4 deletions

View File

@ -388,8 +388,12 @@ void WilsonFermion5D<Impl>::DhopInternalOverlappedComms(StencilImpl & st, Lebesg
std::vector<std::vector<CommsRequest_t> > reqs;
// Rely on async comms; start comms before merge of local data
DhopCommTime-=usecond();
st.CommunicateBegin(reqs);
DhopFaceTime-=usecond();
st.CommsMergeSHM(compressor);
DhopFaceTime+=usecond();
// Perhaps use omp task and region
#pragma omp parallel
@ -402,7 +406,6 @@ void WilsonFermion5D<Impl>::DhopInternalOverlappedComms(StencilImpl & st, Lebesg
int sF = LLs * myoff;
if ( me == 0 ) {
DhopCommTime-=usecond();
st.CommunicateComplete(reqs);
DhopCommTime+=usecond();
} else {

View File

@ -261,12 +261,10 @@ class CartesianStencil { // Stencil runs along coordinate axes only; NO diagonal
Packets[i].from_rank,
Packets[i].bytes);
}
commtime+=usecond();
}
void CommunicateComplete(std::vector<std::vector<CommsRequest_t> > &reqs)
{
commtime-=usecond();
for(int i=0;i<Packets.size();i++){
_grid->StencilSendToRecvFromComplete(reqs[i]);
}
@ -821,7 +819,6 @@ class CartesianStencil { // Stencil runs along coordinate axes only; NO diagonal
send_buf = (cobj *)_grid->ShmBufferTranslate(xmit_to_rank,recv_buf);
if ( send_buf==NULL ) {
send_buf = u_send_buf_p;
shm_receive_only = 0;
}
// Find out if we get the direct copy.