mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-13 04:37:05 +01:00
1) Only the boss should write the perambulator - possibly was a source of intermittent corruption?
2) Implemented and test a perambulator conversion utility in Test_distil (commented out near the start of main)
This commit is contained in:
@ -215,31 +215,32 @@ void TPerambFromSolve<FImpl>::execute(void)
|
||||
int Ntlocal = grid4d->LocalDimensions()[3];
|
||||
int Ntfirst = grid4d->LocalStarts()[3];
|
||||
|
||||
const std::string &PerambFileName{par().PerambFileName};
|
||||
|
||||
|
||||
for (int inoise = 0; inoise < nnoise; inoise++) {
|
||||
for (int dk = 0; dk < LI_reduced; dk++) {
|
||||
for (int dt = 0; dt < Nt_inv; dt++) {
|
||||
for (int ds = 0; ds < SI; ds++) {
|
||||
for (int is = 0; is < Ns; is++) {
|
||||
result_nospin = peekSpin(solve[inoise+nnoise*(dk+LI*(dt+Nt_inv*ds))],is);
|
||||
for (int t = Ntfirst; t < Ntfirst + Ntlocal; t++) {
|
||||
ExtractSliceLocal(result_3d,result_nospin,0,t-Ntfirst,Grid::QCD::Tdir);
|
||||
for (int ivec = 0; ivec < nvec_reduced; ivec++) {
|
||||
ExtractSliceLocal(evec3d,epack.evec[ivec],0,t,3);
|
||||
pokeSpin(perambulator(t, ivec, dk, inoise,dt,ds),static_cast<Complex>(innerProduct(evec3d, result_3d)),is);
|
||||
std::cout << "perambulator(t, ivec, dk, inoise,dt,ds)(is) = (" << t << "," << ivec << "," << dk << "," << inoise << "," << dt << "," << ds << ")(" << is << ") = " << perambulator(t, ivec, dk, inoise,dt,ds)()(is)() << std::endl;
|
||||
}
|
||||
for (int inoise = 0; inoise < nnoise; inoise++) {
|
||||
for (int dk = 0; dk < LI_reduced; dk++) {
|
||||
for (int dt = 0; dt < Nt_inv; dt++) {
|
||||
for (int ds = 0; ds < SI; ds++) {
|
||||
for (int is = 0; is < Ns; is++) {
|
||||
result_nospin = peekSpin(solve[inoise+nnoise*(dk+LI*(dt+Nt_inv*ds))],is);
|
||||
for (int t = Ntfirst; t < Ntfirst + Ntlocal; t++) {
|
||||
ExtractSliceLocal(result_3d,result_nospin,0,t-Ntfirst,Grid::QCD::Tdir);
|
||||
for (int ivec = 0; ivec < nvec_reduced; ivec++) {
|
||||
ExtractSliceLocal(evec3d,epack.evec[ivec],0,t,3);
|
||||
pokeSpin(perambulator(t, ivec, dk, inoise,dt,ds),static_cast<Complex>(innerProduct(evec3d, result_3d)),is);
|
||||
std::cout << "perambulator(t, ivec, dk, inoise,dt,ds)(is) = (" << t << "," << ivec << "," << dk << "," << inoise << "," << dt << "," << ds << ")(" << is << ") = " << perambulator(t, ivec, dk, inoise,dt,ds)()(is)() << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(PerambFileName.length()) {
|
||||
std::string sPerambName{PerambFileName + "." + std::to_string(vm().getTrajectory())};
|
||||
if(grid4d->IsBoss()) {
|
||||
std::string sPerambName{par().PerambFileName};
|
||||
if( sPerambName.length() == 0 )
|
||||
sPerambName = getName();
|
||||
sPerambName.append( "." );
|
||||
sPerambName.append( std::to_string(vm().getTrajectory()));
|
||||
//perambulator.WriteBinary(sPerambName);
|
||||
perambulator.write(sPerambName.c_str());
|
||||
}
|
||||
|
@ -215,7 +215,6 @@ void TPerambulator<FImpl>::execute(void)
|
||||
// Load perambulator if it exists on disk instead of creating it
|
||||
// Not sure this is how we want it - rather specify an input flag 'read'
|
||||
// and assert that the file is there.
|
||||
const std::string &PerambFileName{par().PerambFileName};
|
||||
|
||||
envGetTmp(LatticeSpinColourVector, dist_source);
|
||||
envGetTmp(LatticeSpinColourVector, tmp2);
|
||||
@ -276,18 +275,22 @@ void TPerambulator<FImpl>::execute(void)
|
||||
ExtractSliceLocal(evec3d,epack.evec[ivec],0,t,3);
|
||||
pokeSpin(perambulator(t, ivec, dk, inoise,dt,ds),static_cast<Complex>(innerProduct(evec3d, result_3d)),is);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
std::cout << "perambulator done" << std::endl;
|
||||
perambulator.SliceShare( grid3d, grid4d );
|
||||
std::cout << "perambulator done" << std::endl;
|
||||
perambulator.SliceShare( grid3d, grid4d );
|
||||
|
||||
if(PerambFileName.length()) {
|
||||
std::string sPerambName{PerambFileName + "." + std::to_string(vm().getTrajectory())};
|
||||
if(grid4d->IsBoss()) {
|
||||
std::string sPerambName{par().PerambFileName};
|
||||
if( sPerambName.length() == 0 )
|
||||
sPerambName = getName();
|
||||
sPerambName.append( "." );
|
||||
sPerambName.append( std::to_string(vm().getTrajectory()));
|
||||
//perambulator.WriteBinary(sPerambName);
|
||||
perambulator.write(sPerambName.c_str());
|
||||
}
|
||||
|
Reference in New Issue
Block a user