1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-09 23:45:36 +00:00

Think I'm getting on top of the reduced cost exterior precomputed list of links

This commit is contained in:
paboyle 2017-04-25 08:50:26 +01:00
parent 56277a11c8
commit ab66bac4e6
4 changed files with 22 additions and 34 deletions

View File

@ -166,7 +166,7 @@ int main (int argc, char ** argv)
std::cout << GridLogMessage<< "*****************************************************************" <<std::endl;
DomainWallFermionR Dw(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
int ncall =1000;
int ncall =100;
if (1) {
FGrid->Barrier();
Dw.ZeroCounters();

View File

@ -261,7 +261,7 @@ public:
// Here we know the distance is 1 for WilsonStencil
for(int point=0;point<this->_npoints;point++){
same_node[point] = this->SameNode(point);
std::cout << " dir " <<point<<" same_node " <<same_node[point]<<std::endl;
// std::cout << " dir " <<point<<" same_node " <<same_node[point]<<std::endl;
}
for(int site = 0 ;site< vol4;site++){
@ -324,23 +324,23 @@ public:
int face_idx=0;
if ( dag ) {
// std::cout << " Optimised Dagger compress " <<std::endl;
same_node[Xp]=this->HaloGatherDir(source,XpCompress,Xp,face_idx);
same_node[Yp]=this->HaloGatherDir(source,YpCompress,Yp,face_idx);
same_node[Zp]=this->HaloGatherDir(source,ZpCompress,Zp,face_idx);
same_node[Tp]=this->HaloGatherDir(source,TpCompress,Tp,face_idx);
same_node[Xm]=this->HaloGatherDir(source,XmCompress,Xm,face_idx);
same_node[Ym]=this->HaloGatherDir(source,YmCompress,Ym,face_idx);
same_node[Zm]=this->HaloGatherDir(source,ZmCompress,Zm,face_idx);
same_node[Tm]=this->HaloGatherDir(source,TmCompress,Tm,face_idx);
assert(same_node[Xp]==this->HaloGatherDir(source,XpCompress,Xp,face_idx));
assert(same_node[Yp]==this->HaloGatherDir(source,YpCompress,Yp,face_idx));
assert(same_node[Zp]==this->HaloGatherDir(source,ZpCompress,Zp,face_idx));
assert(same_node[Tp]==this->HaloGatherDir(source,TpCompress,Tp,face_idx));
assert(same_node[Xm]==this->HaloGatherDir(source,XmCompress,Xm,face_idx));
assert(same_node[Ym]==this->HaloGatherDir(source,YmCompress,Ym,face_idx));
assert(same_node[Zm]==this->HaloGatherDir(source,ZmCompress,Zm,face_idx));
assert(same_node[Tm]==this->HaloGatherDir(source,TmCompress,Tm,face_idx));
} else {
same_node[Xp]=this->HaloGatherDir(source,XmCompress,Xp,face_idx);
same_node[Yp]=this->HaloGatherDir(source,YmCompress,Yp,face_idx);
same_node[Zp]=this->HaloGatherDir(source,ZmCompress,Zp,face_idx);
same_node[Tp]=this->HaloGatherDir(source,TmCompress,Tp,face_idx);
same_node[Xm]=this->HaloGatherDir(source,XpCompress,Xm,face_idx);
same_node[Ym]=this->HaloGatherDir(source,YpCompress,Ym,face_idx);
same_node[Zm]=this->HaloGatherDir(source,ZpCompress,Zm,face_idx);
same_node[Tm]=this->HaloGatherDir(source,TpCompress,Tm,face_idx);
assert(same_node[Xp]==this->HaloGatherDir(source,XmCompress,Xp,face_idx));
assert(same_node[Yp]==this->HaloGatherDir(source,YmCompress,Yp,face_idx));
assert(same_node[Zp]==this->HaloGatherDir(source,ZmCompress,Zp,face_idx));
assert(same_node[Tp]==this->HaloGatherDir(source,TmCompress,Tp,face_idx));
assert(same_node[Xm]==this->HaloGatherDir(source,XpCompress,Xm,face_idx));
assert(same_node[Ym]==this->HaloGatherDir(source,YpCompress,Ym,face_idx));
assert(same_node[Zm]==this->HaloGatherDir(source,ZpCompress,Zm,face_idx));
assert(same_node[Tm]==this->HaloGatherDir(source,TpCompress,Tm,face_idx));
}
this->face_table_computed=1;
assert(this->u_comm_offset==this->_unified_buffer_size);

View File

@ -119,7 +119,7 @@ WilsonFermion5D<Impl>::WilsonFermion5D(GaugeField &_Umu,
ImportGauge(_Umu);
// Build lists of exterior only nodes
int LLs = FourDimGrid._rdimensions[0];
int LLs = FiveDimGrid._rdimensions[0];
int vol4;
vol4=FourDimGrid.oSites();
Stencil.BuildSurfaceList(LLs,vol4);
@ -127,7 +127,7 @@ WilsonFermion5D<Impl>::WilsonFermion5D(GaugeField &_Umu,
StencilEven.BuildSurfaceList(LLs,vol4);
StencilOdd.BuildSurfaceList(LLs,vol4);
std::cout << GridLogMessage << " SurfaceLists "<< Stencil.surface_list.size()
std::cout << GridLogMessage << " SurfaceLists "<< Stencil.surface_list.size()
<<" " << StencilEven.surface_list.size()<<std::endl;
}

View File

@ -95,7 +95,7 @@ void Gather_plane_exchange_table(std::vector<std::pair<int,int> >& table,const L
uint16_t _is_local;
uint16_t _permute;
uint16_t _around_the_world; //256 bits, 32 bytes, 1/2 cacheline
uint16_t _node_local;
uint16_t _pad;
};
////////////////////////////////////////
@ -221,7 +221,7 @@ class CartesianStencil { // Stencil runs along coordinate axes only; NO diagonal
return 1;
}
inline int GetNodeLocal(int osite,int point) {
return _entries[point+_npoints*osite]._node_local;
return _entries[point+_npoints*osite]._is_local;
}
inline StencilEntry * GetEntry(int &ptype,int point,int osite) {
ptype = _permute_type[point]; return & _entries[point+_npoints*osite];
@ -438,18 +438,6 @@ class CartesianStencil { // Stencil runs along coordinate axes only; NO diagonal
_entries[i]._byte_offset = _entries[i]._offset*sizeof(cobj);
}
}
int osites = _grid->oSites();
for(int o=0;o<osites;o++){
int node_local=1;
for(int p=0;p<_npoints;p++){
if (!_entries[p+o*_npoints]._is_local ){
node_local = 0;
}
}
for(int p=0;p<_npoints;p++){
_entries[p+o*_npoints]._node_local = node_local;
}
}
};
CartesianStencil(GridBase *grid,