1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-15 14:27:06 +01:00

Hadrons: meson field threaded cache copy

This commit is contained in:
2018-08-14 14:02:37 +01:00
parent 89d2fac92e
commit f4878d3a13
5 changed files with 21 additions and 18 deletions

View File

@ -296,7 +296,8 @@ void TA2AMesonField<FImpl>::execute(void)
+ vol * ( 2.0 * sizeof(Complex) *nmom ) * N_iii*N_jjj* ngamma;
startTimer("cache copy");
for(int iii=0;iii< N_iii;iii++)
parallel_for_nest(5)(int iii=0;iii< N_iii;iii++)
for(int jjj=0;jjj< N_jjj;jjj++)
for(int m =0;m< nmom;m++)
for(int g =0;g< ngamma;g++)
@ -310,30 +311,30 @@ void TA2AMesonField<FImpl>::execute(void)
// IO
if (!par().output.empty())
{
double blockSize, ioTime;
double blockSize, ioTime;
LOG(Message) << "Writing block to disk" << std::endl;
ioTime = -getDTimer("IO: write block");
startTimer("IO: total");
for(int m = 0; m < nmom; m++)
for(int g = 0; g < ngamma; g++)
{
if ((i == 0) and (j == 0))
for(int m = 0; m < nmom; m++)
for(int g = 0; g < ngamma; g++)
{
if ((i == 0) and (j == 0))
{
startTimer("IO: file creation");
initFile(m, g);
initFile(m, g);
stopTimer("IO: file creation");
}
}
startTimer("IO: write block");
saveBlock(mfBlock, m, g, i, j);
saveBlock(mfBlock, m, g, i, j);
stopTimer("IO: write block");
}
}
stopTimer("IO: total");
blockSize = static_cast<double>(nmom*ngamma*nt*N_ii*N_jj*sizeof(Complex));
ioTime += getDTimer("IO: write block");
LOG(Message) << "HDF5 IO done " << blockSize/ioTime*1.0e6/1024/1024
<< " MB/s" << std::endl;
}
<< " MB/s" << std::endl;
}
}
double nodes = env().getGrid()->NodeCount();

View File

@ -174,7 +174,7 @@ void makeMesonFieldBlock(MesonField &mat,
if (caller) caller->startTimer("contraction: spin trace");
int pd = grid->_processors[orthogdim];
int pc = grid->_processor_coor[orthogdim];
parallel_for_nest2(int lt=0;lt<ld;lt++)
parallel_for_nest(2)(int lt=0;lt<ld;lt++)
{
for(int pt=0;pt<pd;pt++)
{