1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00: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) { 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); }); 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) 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); ImportGauge(_Umu);
commtime=0; commtime=0;
jointime=0;
dslashtime=0; dslashtime=0;
} }
template<class Impl> template<class Impl>
@ -237,6 +238,7 @@ void WilsonFermion5D<Impl>::Report(void)
std::cout<<GridLogMessage << "********************"<<std::endl; std::cout<<GridLogMessage << "********************"<<std::endl;
std::cout<<GridLogMessage << "Halo time "<<commtime <<" us"<<std::endl; std::cout<<GridLogMessage << "Halo time "<<commtime <<" us"<<std::endl;
std::cout<<GridLogMessage << "Dslash time "<<dslashtime<<" 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 << "Stencil All time "<<Stencil.halotime<<" us"<<std::endl;
std::cout<<GridLogMessage << "********************"<<std::endl; std::cout<<GridLogMessage << "********************"<<std::endl;
std::cout<<GridLogMessage << "Stencil nosplice time "<<Stencil.nosplicetime<<" us"<<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(); int nwork = U._grid->oSites();
commtime -=usecond(); commtime -=usecond();
st.HaloExchange(in,comm_buf,compressor); std::thread thr = st.HaloExchangeBegin(in,comm_buf,compressor);
commtime +=usecond(); commtime +=usecond();
jointime -=usecond();
thr.join();
jointime +=usecond();
// Dhop takes the 4d grid from U, and makes a 5d index for fermion // Dhop takes the 4d grid from U, and makes a 5d index for fermion
// Not loop ordering and data layout. // Not loop ordering and data layout.
@ -483,9 +489,9 @@ PARALLEL_FOR_LOOP
} }
dslashtime +=usecond(); dslashtime +=usecond();
commtime -=usecond(); jointime -=usecond();
thr.join(); thr.join();
commtime +=usecond(); jointime +=usecond();
local = false; local = false;
nonlocal = true; nonlocal = true;

View File

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