1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-09-20 01:05:38 +01:00

Timing reports in benchmarks now reflect the asynch comms thread statistics

This commit is contained in:
paboyle 2016-01-04 14:42:16 +00:00
parent 02452afd36
commit c99d748da6
3 changed files with 10 additions and 5 deletions

View File

@ -465,8 +465,6 @@ namespace Grid {
std::thread HaloExchangeBegin(const Lattice<vobj> &source,std::vector<cobj,alignedAllocator<cobj> > & u_comm_buf,compressor &compress) {
return std::thread([&] { this->HaloExchangeBlocking(source,u_comm_buf,compress); });
// std::thread t(&HaloExchangeBlocking,this,source,u_comm_buf,compress);
// return t;
}
void HaloExchangeBlocking(const Lattice<vobj> &source,std::vector<cobj,alignedAllocator<cobj> > &u_comm_buf,compressor &compress)

View File

@ -102,6 +102,7 @@ WilsonFermion5D<Impl>::WilsonFermion5D(GaugeField &_Umu,
ImportGauge(_Umu);
commtime=0;
jointime=0;
dslashtime=0;
}
template<class Impl>
@ -237,6 +238,7 @@ void WilsonFermion5D<Impl>::Report(void)
std::cout<<GridLogMessage << "********************"<<std::endl;
std::cout<<GridLogMessage << "Halo time "<<commtime <<" us"<<std::endl;
std::cout<<GridLogMessage << "Dslash time "<<dslashtime<<" us"<<std::endl;
std::cout<<GridLogMessage << "join time "<<jointime<<" us"<<std::endl;
std::cout<<GridLogMessage << "Stencil All time "<<Stencil.halotime<<" us"<<std::endl;
std::cout<<GridLogMessage << "********************"<<std::endl;
std::cout<<GridLogMessage << "Stencil nosplice time "<<Stencil.nosplicetime<<" us"<<std::endl;
@ -297,8 +299,12 @@ void WilsonFermion5D<Impl>::DhopInternalCommsThenCompute(StencilImpl & st, Lebes
int nwork = U._grid->oSites();
commtime -=usecond();
st.HaloExchange(in,comm_buf,compressor);
std::thread thr = st.HaloExchangeBegin(in,comm_buf,compressor);
commtime +=usecond();
jointime -=usecond();
thr.join();
jointime +=usecond();
// Dhop takes the 4d grid from U, and makes a 5d index for fermion
// Not loop ordering and data layout.
@ -483,9 +489,9 @@ PARALLEL_FOR_LOOP
}
dslashtime +=usecond();
commtime -=usecond();
jointime -=usecond();
thr.join();
commtime +=usecond();
jointime +=usecond();
local = false;
nonlocal = true;

View File

@ -61,6 +61,7 @@ namespace Grid {
public:
INHERIT_IMPL_TYPES(Impl);
typedef WilsonKernels<Impl> Kernels;
double jointime;
double commtime;
double dslashtime;
///////////////////////////////////////////////////////////////