1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

Small threading change makes a difference on Cori.

This commit is contained in:
paboyle 2015-11-07 00:07:05 -08:00
parent 05a7029600
commit e9ff25b06b

View File

@ -324,45 +324,36 @@ PARALLEL_FOR_LOOP
// } // }
} else if( this->HandOptDslash ) { } else if( this->HandOptDslash ) {
#pragma omp parallel for #pragma omp parallel for schedule(static)
for(int t=0;t<threads;t++){ for(int t=0;t<threads;t++){
int hyperthread = t%HT; int hyperthread = t%HT;
int core = t/HT; int core = t/HT;
int sswork, swork,soff, sU,sF; int sswork, swork,soff,ssoff, sU,sF;
sswork = (nwork + cores-1)/cores; GridThread::GetWork(nwork,core,sswork,ssoff,cores);
GridThread::GetWork(Ls , hyperthread, swork, soff,HT); GridThread::GetWork(Ls , hyperthread, swork, soff,HT);
for(int ss=0;ss<sswork;ss++){ for(int ss=0;ss<sswork;ss++){
sU=ss+core*sswork; // max locality within an L2 slice sU=ss+ ssoff;
if ( LebesgueOrder::UseLebesgueOrder ) { for(int s=soff;s<soff+swork;s++){
sU = lo.Reorder(sU); sF = s+Ls*sU;
} Kernels::DiracOptHandDhopSite(st,U,comm_buf,sF,sU,in,out);
if ( sU < nwork ) {
for(int s=soff;s<soff+swork;s++){
sF = s+Ls*sU;
Kernels::DiracOptHandDhopSite(st,U,comm_buf,sF,sU,in,out);
}
} }
} }
} }
/* /*
#pragma omp parallel for schedule(static) #pragma omp parallel for schedule(static)
for(int ss=0;ss<U._grid->oSites();ss++){ for(int ss=0;ss<U._grid->oSites();ss++){
int sU=ss;
for(int s=0;s<Ls;s++){ for(int s=0;s<Ls;s++){
int sU=ss;
if ( LebesgueOrder::UseLebesgueOrder ) {
sU=lo.Reorder(ss);
}
int sF = s+Ls*sU; int sF = s+Ls*sU;
Kernels::DiracOptHandDhopSite(st,U,comm_buf,sF,sU,in,out); Kernels::DiracOptHandDhopSite(st,U,comm_buf,sF,sU,in,out);
} }
} }
*/ */
} else { } else {
PARALLEL_FOR_LOOP PARALLEL_FOR_LOOP
for(int ss=0;ss<U._grid->oSites();ss++){ for(int ss=0;ss<U._grid->oSites();ss++){