1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-11 22:50:45 +01: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; std::vector<std::vector<CommsRequest_t> > reqs;
// Rely on async comms; start comms before merge of local data // Rely on async comms; start comms before merge of local data
DhopCommTime-=usecond();
st.CommunicateBegin(reqs); st.CommunicateBegin(reqs);
DhopFaceTime-=usecond();
st.CommsMergeSHM(compressor); st.CommsMergeSHM(compressor);
DhopFaceTime+=usecond();
// Perhaps use omp task and region // Perhaps use omp task and region
#pragma omp parallel #pragma omp parallel
@ -402,7 +406,6 @@ void WilsonFermion5D<Impl>::DhopInternalOverlappedComms(StencilImpl & st, Lebesg
int sF = LLs * myoff; int sF = LLs * myoff;
if ( me == 0 ) { if ( me == 0 ) {
DhopCommTime-=usecond();
st.CommunicateComplete(reqs); st.CommunicateComplete(reqs);
DhopCommTime+=usecond(); DhopCommTime+=usecond();
} else { } else {

View File

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