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:
parent
02452afd36
commit
c99d748da6
@ -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)
|
||||
|
@ -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,9 +299,13 @@ 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.
|
||||
// Designed to create
|
||||
@ -483,9 +489,9 @@ PARALLEL_FOR_LOOP
|
||||
}
|
||||
dslashtime +=usecond();
|
||||
|
||||
commtime -=usecond();
|
||||
jointime -=usecond();
|
||||
thr.join();
|
||||
commtime +=usecond();
|
||||
jointime +=usecond();
|
||||
|
||||
local = false;
|
||||
nonlocal = true;
|
||||
|
@ -61,6 +61,7 @@ namespace Grid {
|
||||
public:
|
||||
INHERIT_IMPL_TYPES(Impl);
|
||||
typedef WilsonKernels<Impl> Kernels;
|
||||
double jointime;
|
||||
double commtime;
|
||||
double dslashtime;
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user