1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-04 19:25:56 +01:00

added testing module for multiple perambulators

This commit is contained in:
ferben 2019-03-11 18:05:39 +00:00
parent 5fb2ee89bb
commit c2a3231cdf
4 changed files with 556 additions and 201 deletions

View File

@ -1,84 +1,85 @@
#include <Hadrons/Modules/MScalarSUN/TrKinetic.hpp>
#include <Hadrons/Modules/MScalarSUN/StochFreeField.hpp>
#include <Hadrons/Modules/MScalarSUN/TwoPointNPR.hpp>
#include <Hadrons/Modules/MScalarSUN/Grad.hpp>
#include <Hadrons/Modules/MScalarSUN/TransProj.hpp>
#include <Hadrons/Modules/MScalarSUN/Div.hpp>
#include <Hadrons/Modules/MScalarSUN/TrMag.hpp>
#include <Hadrons/Modules/MScalarSUN/ShiftProbe.hpp>
#include <Hadrons/Modules/MScalarSUN/Utils.hpp>
#include <Hadrons/Modules/MScalarSUN/EMT.hpp>
#include <Hadrons/Modules/MScalarSUN/TwoPoint.hpp>
#include <Hadrons/Modules/MScalarSUN/TrPhi.hpp>
#include <Hadrons/Modules/MNoise/FullVolumeSpinColorDiagonal.hpp>
#include <Hadrons/Modules/MNoise/TimeDilutedSpinColorDiagonal.hpp>
#include <Hadrons/Modules/MScalar/FreeProp.hpp>
#include <Hadrons/Modules/MScalar/Scalar.hpp>
#include <Hadrons/Modules/MScalar/ScalarVP.hpp>
#include <Hadrons/Modules/MScalar/ChargedProp.hpp>
#include <Hadrons/Modules/MScalar/VPCounterTerms.hpp>
#include <Hadrons/Modules/MLoop/NoiseLoop.hpp>
#include <Hadrons/Modules/MIO/LoadEigenPack.hpp>
#include <Hadrons/Modules/MIO/LoadA2AVectors.hpp>
#include <Hadrons/Modules/MIO/LoadCoarseEigenPack.hpp>
#include <Hadrons/Modules/MIO/LoadCosmHol.hpp>
#include <Hadrons/Modules/MIO/LoadBinary.hpp>
#include <Hadrons/Modules/MIO/LoadNersc.hpp>
#include <Hadrons/Modules/MSink/Smear.hpp>
#include <Hadrons/Modules/MSink/Point.hpp>
#include <Hadrons/Modules/MFermion/FreeProp.hpp>
#include <Hadrons/Modules/MFermion/GaugeProp.hpp>
#include <Hadrons/Modules/MGauge/FundtoHirep.hpp>
#include <Hadrons/Modules/MGauge/Random.hpp>
#include <Hadrons/Modules/MGauge/StoutSmearing.hpp>
#include <Hadrons/Modules/MGauge/Unit.hpp>
#include <Hadrons/Modules/MGauge/GaugeFix.hpp>
#include <Hadrons/Modules/MGauge/StochEm.hpp>
#include <Hadrons/Modules/MGauge/Electrify.hpp>
#include <Hadrons/Modules/MGauge/UnitEm.hpp>
#include <Hadrons/Modules/MUtilities/TestSeqGamma.hpp>
#include <Hadrons/Modules/MUtilities/RandomVectors.hpp>
#include <Hadrons/Modules/MUtilities/TestSeqConserved.hpp>
#include <Hadrons/Modules/MUtilities/TestSeqGamma.hpp>
#include <Hadrons/Modules/MUtilities/PrecisionCast.hpp>
#include <Hadrons/Modules/MDistil/PerambLight.hpp>
#include <Hadrons/Modules/MDistil/Distil.hpp>
#include <Hadrons/Modules/MDistil/BC2.hpp>
#include <Hadrons/Modules/MDistil/g5_multiply.hpp>
#include <Hadrons/Modules/MDistil/PerambFromSolve.hpp>
#include <Hadrons/Modules/MDistil/Baryon2pt.hpp>
#include <Hadrons/Modules/MUtilities/TestSeqConserved.hpp>
#include <Hadrons/Modules/MSolver/MixedPrecisionRBPrecCG.hpp>
#include <Hadrons/Modules/MSolver/A2AAslashVectors.hpp>
#include <Hadrons/Modules/MSolver/Guesser.hpp>
#include <Hadrons/Modules/MSolver/LocalCoherenceLanczos.hpp>
#include <Hadrons/Modules/MSolver/RBPrecCG.hpp>
#include <Hadrons/Modules/MSolver/A2AVectors.hpp>
#include <Hadrons/Modules/MDistil/LapEvec.hpp>
#include <Hadrons/Modules/MDistil/BContraction.hpp>
#include <Hadrons/Modules/MDistil/Distil.hpp>
#include <Hadrons/Modules/MDistil/g5_multiply.hpp>
#include <Hadrons/Modules/MDistil/DistilVectors.hpp>
#include <Hadrons/Modules/MDistil/Baryon2pt.hpp>
#include <Hadrons/Modules/MDistil/BContraction.hpp>
#include <Hadrons/Modules/MDistil/PerambLight.hpp>
#include <Hadrons/Modules/MDistil/DistilSink.hpp>
#include <Hadrons/Modules/MSource/SeqConserved.hpp>
#include <Hadrons/Modules/MSource/Z2.hpp>
#include <Hadrons/Modules/MSource/Wall.hpp>
#include <Hadrons/Modules/MSource/SeqGamma.hpp>
#include <Hadrons/Modules/MSource/Point.hpp>
#include <Hadrons/Modules/MSource/Momentum.hpp>
#include <Hadrons/Modules/MContraction/A2AAslashField.hpp>
#include <Hadrons/Modules/MContraction/WeakHamiltonianEye.hpp>
#include <Hadrons/Modules/MContraction/Baryon.hpp>
#include <Hadrons/Modules/MContraction/Meson.hpp>
#include <Hadrons/Modules/MDistil/PerambFromSolve.hpp>
#include <Hadrons/Modules/MDistil/BC2.hpp>
#include <Hadrons/Modules/MDistil/PerambMultipleSolves.hpp>
#include <Hadrons/Modules/MContraction/WeakHamiltonian.hpp>
#include <Hadrons/Modules/MContraction/WeakNeutral4ptDisc.hpp>
#include <Hadrons/Modules/MContraction/Gamma3pt.hpp>
#include <Hadrons/Modules/MContraction/WeakHamiltonianEye.hpp>
#include <Hadrons/Modules/MContraction/DiscLoop.hpp>
#include <Hadrons/Modules/MContraction/WeakHamiltonianNonEye.hpp>
#include <Hadrons/Modules/MContraction/WardIdentity.hpp>
#include <Hadrons/Modules/MContraction/Baryon.hpp>
#include <Hadrons/Modules/MContraction/Gamma3pt.hpp>
#include <Hadrons/Modules/MContraction/A2AMesonField.hpp>
#include <Hadrons/Modules/MAction/WilsonClover.hpp>
#include <Hadrons/Modules/MAction/ScaledDWF.hpp>
#include <Hadrons/Modules/MAction/MobiusDWF.hpp>
#include <Hadrons/Modules/MContraction/A2AAslashField.hpp>
#include <Hadrons/Modules/MContraction/WeakHamiltonianNonEye.hpp>
#include <Hadrons/Modules/MContraction/Meson.hpp>
#include <Hadrons/Modules/MContraction/WardIdentity.hpp>
#include <Hadrons/Modules/MAction/Wilson.hpp>
#include <Hadrons/Modules/MAction/WilsonClover.hpp>
#include <Hadrons/Modules/MAction/DWF.hpp>
#include <Hadrons/Modules/MAction/ScaledDWF.hpp>
#include <Hadrons/Modules/MAction/ZMobiusDWF.hpp>
#include <Hadrons/Modules/MSolver/RBPrecCG.hpp>
#include <Hadrons/Modules/MSolver/LocalCoherenceLanczos.hpp>
#include <Hadrons/Modules/MSolver/A2AVectors.hpp>
#include <Hadrons/Modules/MSolver/MixedPrecisionRBPrecCG.hpp>
#include <Hadrons/Modules/MSolver/Guesser.hpp>
#include <Hadrons/Modules/MSolver/A2AAslashVectors.hpp>
#include <Hadrons/Modules/MAction/MobiusDWF.hpp>
#include <Hadrons/Modules/MGauge/Random.hpp>
#include <Hadrons/Modules/MGauge/Unit.hpp>
#include <Hadrons/Modules/MGauge/UnitEm.hpp>
#include <Hadrons/Modules/MGauge/StoutSmearing.hpp>
#include <Hadrons/Modules/MGauge/StochEm.hpp>
#include <Hadrons/Modules/MGauge/Electrify.hpp>
#include <Hadrons/Modules/MGauge/FundtoHirep.hpp>
#include <Hadrons/Modules/MGauge/GaugeFix.hpp>
#include <Hadrons/Modules/MNoise/TimeDilutedSpinColorDiagonal.hpp>
#include <Hadrons/Modules/MNoise/FullVolumeSpinColorDiagonal.hpp>
#include <Hadrons/Modules/MIO/LoadBinary.hpp>
#include <Hadrons/Modules/MIO/LoadCosmHol.hpp>
#include <Hadrons/Modules/MIO/LoadNersc.hpp>
#include <Hadrons/Modules/MIO/LoadA2AVectors.hpp>
#include <Hadrons/Modules/MIO/LoadCoarseEigenPack.hpp>
#include <Hadrons/Modules/MIO/LoadEigenPack.hpp>
#include <Hadrons/Modules/MNPR/Amputate.hpp>
#include <Hadrons/Modules/MNPR/FourQuark.hpp>
#include <Hadrons/Modules/MNPR/Bilinear.hpp>
#include <Hadrons/Modules/MNPR/Amputate.hpp>
#include <Hadrons/Modules/MLoop/NoiseLoop.hpp>
#include <Hadrons/Modules/MScalarSUN/TransProj.hpp>
#include <Hadrons/Modules/MScalarSUN/TwoPoint.hpp>
#include <Hadrons/Modules/MScalarSUN/TrMag.hpp>
#include <Hadrons/Modules/MScalarSUN/TrKinetic.hpp>
#include <Hadrons/Modules/MScalarSUN/EMT.hpp>
#include <Hadrons/Modules/MScalarSUN/Grad.hpp>
#include <Hadrons/Modules/MScalarSUN/Utils.hpp>
#include <Hadrons/Modules/MScalarSUN/Div.hpp>
#include <Hadrons/Modules/MScalarSUN/TrPhi.hpp>
#include <Hadrons/Modules/MScalarSUN/TwoPointNPR.hpp>
#include <Hadrons/Modules/MScalarSUN/StochFreeField.hpp>
#include <Hadrons/Modules/MScalarSUN/ShiftProbe.hpp>
#include <Hadrons/Modules/MSink/Smear.hpp>
#include <Hadrons/Modules/MSink/Point.hpp>
#include <Hadrons/Modules/MFermion/GaugeProp.hpp>
#include <Hadrons/Modules/MFermion/FreeProp.hpp>
#include <Hadrons/Modules/MScalar/Scalar.hpp>
#include <Hadrons/Modules/MScalar/ScalarVP.hpp>
#include <Hadrons/Modules/MScalar/FreeProp.hpp>
#include <Hadrons/Modules/MScalar/ChargedProp.hpp>
#include <Hadrons/Modules/MScalar/VPCounterTerms.hpp>
#include <Hadrons/Modules/MSource/Momentum.hpp>
#include <Hadrons/Modules/MSource/SeqGamma.hpp>
#include <Hadrons/Modules/MSource/Point.hpp>
#include <Hadrons/Modules/MSource/Z2.hpp>
#include <Hadrons/Modules/MSource/Wall.hpp>
#include <Hadrons/Modules/MSource/SeqConserved.hpp>

View File

@ -0,0 +1,7 @@
#include <Hadrons/Modules/MDistil/PerambMultipleSolves.hpp>
using namespace Grid;
using namespace Hadrons;
using namespace MDistil;
template class Grid::Hadrons::MDistil::TPerambMultipleSolves<FIMPL>;

View File

@ -0,0 +1,345 @@
#ifndef Hadrons_MDistil_PerambMultipleSolves_hpp_
#define Hadrons_MDistil_PerambMultipleSolves_hpp_
#include <Hadrons/Global.hpp>
#include <Hadrons/Module.hpp>
#include <Hadrons/ModuleFactory.hpp>
#include <Hadrons/Solver.hpp>
#include <Hadrons/EigenPack.hpp>
#include <Hadrons/A2AVectors.hpp>
#include <Hadrons/DilutedNoise.hpp>
// These are members of Distillation
#include <Hadrons/Modules/MDistil/Distil.hpp>
BEGIN_HADRONS_NAMESPACE
/******************************************************************************
* PerambMultipleSolves *
******************************************************************************/
BEGIN_MODULE_NAMESPACE(MDistil)
class PerambMultipleSolvesPar: Serializable
{
public:
GRID_SERIALIZABLE_CLASS_MEMBERS(PerambMultipleSolvesPar,
std::string, eigenPack,
std::string, PerambFileName,
std::string, ConfigFileDir,
std::string, ConfigFileName,
std::string, UniqueIdentifier,
int, nsolves,
std::vector<int>, nvecs,
int, nvec,
bool, multiFile,
DistilParameters, Distil,
std::string, solver);
};
template <typename FImpl>
class TPerambMultipleSolves: public Module<PerambMultipleSolvesPar>
{
public:
FERM_TYPE_ALIASES(FImpl,);
SOLVER_TYPE_ALIASES(FImpl,);
// constructor
TPerambMultipleSolves(const std::string name);
// destructor
virtual ~TPerambMultipleSolves(void);
// dependency relation
virtual std::vector<std::string> getInput(void);
virtual std::vector<std::string> getOutput(void);
// setup
virtual void setup(void);
// execution
virtual void execute(void);
protected:
// These variables are created in setup() and freed in Cleanup()
GridCartesian * grid3d; // Owned by me, so I must delete it
GridCartesian * grid4d; // Owned by environment (so I won't delete it)
protected:
virtual void Cleanup(void);
private:
unsigned int Ls_;
};
MODULE_REGISTER_TMP(PerambMultipleSolves, TPerambMultipleSolves<FIMPL>, MDistil);
// constructor /////////////////////////////////////////////////////////////////
template <typename FImpl>
TPerambMultipleSolves<FImpl>::TPerambMultipleSolves(const std::string name)
: grid3d{nullptr}, grid4d{nullptr}, Module<PerambMultipleSolvesPar>(name)
{}
// destructor
template <typename FImpl>
TPerambMultipleSolves<FImpl>::~TPerambMultipleSolves(void)
{
Cleanup();
};
// dependencies/products ///////////////////////////////////////////////////////
template <typename FImpl>
std::vector<std::string> TPerambMultipleSolves<FImpl>::getInput(void)
{
std::vector<std::string> in;
in.push_back(par().eigenPack);
in.push_back(par().solver);
return in;
}
template <typename FImpl>
std::vector<std::string> TPerambMultipleSolves<FImpl>::getOutput(void)
{
std::vector<std::string> out;
const int nsolves{par().nsolves};
std::vector<int> nvecs{par().nvecs};
for(int i=0;i<nsolves;i++){
out.push_back(getName()+ "_solve_" +std::to_string(nvecs[i]));
}
return out;
}
// setup ///////////////////////////////////////////////////////////////////////
template <typename FImpl>
void TPerambMultipleSolves<FImpl>::setup(void)
{
/* Cleanup();
const int nvec{par().nvec};
// auto &noise = envGet(std::vector<std::vector<std::vector<SpinVector>>>, par().noise);
const int nsolves{par().nsolves};
std::vector<int> nvecs{par().nvecs};
const DistilParameters & Distil{par().Distil};
const int LI{Distil.LI};
const int nnoise{Distil.nnoise};
const int Nt_inv{Distil.Nt_inv}; // TODO: PROBABLY BETTER: if (full_tdil) Nt_inv=1; else Nt_inv = TI;
const int Ns{Distil.Ns};
std::array<std::string,6> sIndexNames{"Nt", "nvec", "LI", "nnoise", "Nt_inv", "SI"};
envCreate(std::vector<Complex>, getName() + "_noise", 1,
nvec*Distil.Ns*Distil.Nt*Distil.nnoise);
for(int i=0;i<nsolves;i++){
envCreate(std::vector<FermionField>, getName() + "_solve_"+std::to_string(nvecs[i]), 1,
nnoise*nvecs[i]*Ns*Nt_inv, envGetGrid(FermionField));
}
grid4d = env().getGrid();
grid3d = MakeLowerDimGrid(grid4d);//new GridCartesian(latt_size,simd_layout_3,mpi_layout,*grid4d);
envTmpLat(GaugeField, "Umu");
envTmpLat(LatticeSpinColourVector, "dist_source");
envTmp(std::vector<LatticeSpinColourVector>, "sources",nsolves);
envTmpLat(LatticeSpinColourVector, "tmp2");
envTmpLat(LatticeSpinColourVector, "result");
//envTmpLat(LatticeSpinColourVector, "result_single_component");
envTmpLat(LatticeColourVector, "result_nospin");
//envTmpLat(LatticeColourVector, "tmp_nospin");
//envTmpLat(LatticeSpinVector, "peramb_tmp");
envTmp(LatticeSpinColourVector, "tmp3d",1,LatticeSpinColourVector(grid3d));
envTmp(LatticeColourVector, "tmp3d_nospin",1,LatticeColourVector(grid3d));
envTmp(LatticeColourVector, "result_3d",1,LatticeColourVector(grid3d));
envTmp(LatticeColourVector, "evec3d",1,LatticeColourVector(grid3d));
Ls_ = env().getObjectLs(par().solver);
envTmpLat(FermionField, "v4dtmp");
envTmpLat(FermionField, "v5dtmp", Ls_);
envTmpLat(FermionField, "v5dtmp_sol", Ls_);
*/
}
// clean up any temporaries created by setup (that aren't stored in the environment)
template <typename FImpl>
void TPerambMultipleSolves<FImpl>::Cleanup(void)
{
if( grid3d != nullptr ) {
delete grid3d;
grid3d = nullptr;
}
grid4d = nullptr;
}
// execution ///////////////////////////////////////////////////////////////////
template <typename FImpl>
void TPerambMultipleSolves<FImpl>::execute(void)
{
/* const int nsolves{par().nsolves};
const int nvec{par().nvec};
std::vector<int> nvecs{par().nvecs};
const DistilParameters & Distil{par().Distil};
//const SolverParameters & Solver{par().Solver};
const int LI{Distil.LI};
//const int SI{Distil.SI};
const int TI{Distil.TI};
const int nnoise{Distil.nnoise};
const int Nt{Distil.Nt};
const int Nt_inv{Distil.Nt_inv}; // TODO: PROBABLY BETTER: if (full_tdil) Nt_inv=1; else Nt_inv = TI;
const int tsrc{Distil.tsrc};
const int Ns{Distil.Ns};
auto &solver=envGet(Solver, par().solver);
auto &mat = solver.getFMat();
envGetTmp(FermionField, v4dtmp);
envGetTmp(FermionField, v5dtmp);
envGetTmp(FermionField, v5dtmp_sol);
const bool full_tdil{TI==Nt};
const bool exact_distillation{full_tdil && LI==nvec};
const std::string &ConfigFileDir{par().ConfigFileDir};
const std::string &ConfigFileName{par().ConfigFileName};
const std::string &UniqueIdentifier{par().UniqueIdentifier};
auto &noise = envGet(std::vector<Complex>, getName() + "_noise");
auto &epack = envGet(Grid::Hadrons::EigenPack<LatticeColourVector>, par().eigenPack);
std::vector<std::vector<FermionField>> solves(nsolves);
for(int i=0;i<nsolves;i++){
auto &unsmeared_sink = envGet(std::vector<FermionField>, getName() +"_solve_"+std::to_string(nvecs[i]));
solves[i].resize(nnoise*nvecs[i]*Ns*Nt_inv);
solves[i]=unsmeared_sink;
}
envGetTmp(GaugeField, Umu);
FieldMetaData header;
if((1)){
const std::vector<int> seeds({1, 2, 3, 4, 5});
GridParallelRNG pRNG4d(grid4d);
pRNG4d.SeedFixedIntegers(seeds);
std::cout << GridLogMessage << "now hot config" << std::endl;
SU<Nc>::HotConfiguration(pRNG4d, Umu);
std::cout << GridLogMessage << "hot cfg done." << std::endl;
// Set up the SAME gauge field on every time plane
// int Nt = grid4d->gDimensions()[Tdir];
Grid_unquiesce_nodes();
auto Usft = Umu;
Lattice<iScalar<vInteger> > coor(grid4d);
LatticeCoordinate(coor,Tdir);
for(int t=1;t<Nt;t++){
// t=1
// Umu Usft
// 0,1,2,3,4,5,6,7 -> 7,0,1,2,3,4,5,6 t=1
// 0,0,2,3,4,5,6,7 6,7,0,1,2,3,4,5 t=2
// 0,0,0,3,4,5,6,7 5,6,7,0,1,2,3,4 t=3
//...
Usft = Cshift(Usft,Tdir,-1);
Umu = where(coor==t,Usft,Umu);
}
} else {
//std::string fileName( "/home/dp008/dp008/dc-rich6/Scripts/ConfigsDeflQED/ckpoint_lat.3000" );
std::string fileName(ConfigFileDir + ConfigFileName);
std::cout << GridLogMessage << "Loading NERSC configuration from '" << fileName << "'" << std::endl;
NerscIO::readConfiguration(Umu, header, fileName);
std::cout << GridLogMessage << "reading done." << std::endl;
}
GridSerialRNG sRNG;
sRNG.SeedUniqueString(ConfigFileName + "_" + UniqueIdentifier);
Real rn;
for (int inoise=0;inoise<nnoise;inoise++) {
for (int t=0;t<Nt;t++) {
for (int ivec=0;ivec<nvec;ivec++) {
for (int is=0;is<Ns;is++) {
if (exact_distillation)
noise[inoise + nnoise*(t + Nt*(ivec+nvec*is))] = 1.;
else{
random(sRNG,rn);
// We could use a greater number of complex roots of unity
// ... but this seems to work well
noise[inoise + nnoise*(t + Nt*(ivec+nvec*is))] = (rn > 0.5) ? -1 : 1;
}
}
}
}
}
envGetTmp(LatticeSpinColourVector, dist_source);
envGetTmp(LatticeSpinColourVector, tmp2);
envGetTmp(LatticeSpinColourVector, result);
envGetTmp(LatticeColourVector, result_nospin);
envGetTmp(LatticeSpinColourVector, tmp3d);
envGetTmp(LatticeColourVector, tmp3d_nospin);
envGetTmp(LatticeColourVector, result_3d);
envGetTmp(LatticeColourVector, evec3d);
envGetTmp(std::vector<LatticeSpinColourVector>, sources);
const int Ntlocal{grid4d->LocalDimensions()[3]};
const int Ntfirst{grid4d->LocalStarts()[3]};
std::cout << "init RBG " << std::endl;
GridRedBlackCartesian RBGrid(grid4d);
std::cout << "init RBG done" << std::endl;
{
int t_inv;
for (int inoise = 0; inoise < nnoise; inoise++) {
for (int dk = 0; dk < LI; dk++) {
for (int dt = 0; dt < Nt_inv; dt++) {
for (int ds = 0; ds < Ns; ds++) {
std::cout << "LapH source vector from noise " << inoise << " and dilution component (d_k,d_t,d_alpha) : (" << dk << ","<< dt << "," << ds << ")" << std::endl;
dist_source = zero;
for (int isource = 0; isource < nsolves; isource ++){
if(dk < nvecs[isource])
sources[isource] = zero;
}
tmp3d_nospin = zero;
evec3d = zero;
for (int it = dt; it < Nt; it += TI){
if (full_tdil) t_inv = tsrc; else t_inv = it;
if( t_inv >= Ntfirst && t_inv < Ntfirst + Ntlocal ) {
for (int ik = dk; ik < nvec; ik += LI){
for (int is = ds; is < Ns; is += Ns){ // TODO: Also allow non-full spin dilution (re-define exact_distillation?)
ExtractSliceLocal(evec3d,epack.evec[ik],0,t_inv,3);
tmp3d_nospin = evec3d * noise[inoise + nnoise*(t_inv + Nt*(ik+nvec*is))];
tmp3d=zero;
pokeSpin(tmp3d,tmp3d_nospin,is);
tmp2=zero;
InsertSliceLocal(tmp3d,tmp2,0,t_inv-Ntfirst,Grid::QCD::Tdir);
dist_source += tmp2;
for (int isource = 0; isource < nsolves; isource ++){
if(dk < nvecs[isource])
sources[isource] += tmp2;
}
}
}
}
}
std::cout << "Inversion for noise " << inoise << " and dilution component (d_k,d_t,d_alpha) : (" << dk << ","<< dt << "," << ds << ")" << std::endl;
result=zero;
for (int isource = 0; isource < nsolves; isource ++){
if(dk < nvecs[isource]){
v4dtmp = sources[isource];
if (Ls_ == 1){
solver(result, v4dtmp);
} else {
mat.ImportPhysicalFermionSource(v4dtmp, v5dtmp);
solver(v5dtmp_sol, v5dtmp);
mat.ExportPhysicalFermionSolution(v5dtmp_sol, v4dtmp);
result = v4dtmp;
}
solves[isource][inoise+nnoise*(dk+nvecs[isource]*(dt+Nt_inv*ds))] = result;
}
}
}
}
}
}
}
*/
}
END_MODULE_NAMESPACE
END_HADRONS_NAMESPACE
#endif // Hadrons_MDistil_PerambMultipleSolves_hpp_

View File

@ -1,167 +1,169 @@
modules_cc =\
Modules/MScalarSUN/ShiftProbe.cc \
Modules/MScalarSUN/Grad.cc \
Modules/MScalarSUN/TwoPointNPR.cc \
Modules/MScalarSUN/Div.cc \
Modules/MScalarSUN/TrMag.cc \
Modules/MScalarSUN/TransProj.cc \
Modules/MScalarSUN/TwoPoint.cc \
Modules/MScalarSUN/TrKinetic.cc \
Modules/MScalarSUN/TrPhi.cc \
Modules/MScalarSUN/EMT.cc \
Modules/MScalarSUN/StochFreeField.cc \
Modules/MNoise/FullVolumeSpinColorDiagonal.cc \
Modules/MNoise/TimeDilutedSpinColorDiagonal.cc \
Modules/MScalar/FreeProp.cc \
Modules/MScalar/VPCounterTerms.cc \
Modules/MScalar/ChargedProp.cc \
Modules/MScalar/ScalarVP.cc \
Modules/MLoop/NoiseLoop.cc \
Modules/MIO/LoadBinary.cc \
Modules/MIO/LoadCosmHol.cc \
Modules/MIO/LoadCoarseEigenPack.cc \
Modules/MIO/LoadNersc.cc \
Modules/MIO/LoadEigenPack.cc \
Modules/MIO/LoadA2AVectors.cc \
Modules/MSink/Smear.cc \
Modules/MSink/Point.cc \
Modules/MFermion/FreeProp.cc \
Modules/MFermion/GaugeProp.cc \
Modules/MGauge/Random.cc \
Modules/MGauge/StochEm.cc \
Modules/MGauge/StoutSmearing.cc \
Modules/MGauge/Unit.cc \
Modules/MGauge/Electrify.cc \
Modules/MGauge/UnitEm.cc \
Modules/MGauge/FundtoHirep.cc \
Modules/MGauge/GaugeFix.cc \
Modules/MUtilities/TestSeqGamma.cc \
Modules/MUtilities/TestSeqConserved.cc \
Modules/MUtilities/RandomVectors.cc \
Modules/MUtilities/TestSeqGamma.cc \
Modules/MUtilities/PrecisionCast.cc \
Modules/MDistil/PerambFromSolve.cc \
Modules/MSolver/MixedPrecisionRBPrecCG.cc \
Modules/MSolver/A2AVectors.cc \
Modules/MSolver/A2AAslashVectors.cc \
Modules/MSolver/LocalCoherenceLanczos.cc \
Modules/MSolver/RBPrecCG.cc \
Modules/MDistil/g5_multiply.cc \
Modules/MDistil/LapEvec.cc \
Modules/MDistil/DistilVectors.cc \
Modules/MDistil/BContraction.cc \
Modules/MDistil/Baryon2pt.cc \
Modules/MDistil/BC2.cc \
Modules/MDistil/LapEvec.cc \
Modules/MDistil/PerambFromSolve.cc \
Modules/MDistil/Baryon2pt.cc \
Modules/MDistil/PerambLight.cc \
Modules/MDistil/DistilSink.cc \
Modules/MSource/Momentum.cc \
Modules/MSource/Z2.cc \
Modules/MSource/Point.cc \
Modules/MSource/SeqGamma.cc \
Modules/MSource/Wall.cc \
Modules/MSource/SeqConserved.cc \
Modules/MDistil/DistilVectors.cc \
Modules/MDistil/PerambMultipleSolves.cc \
Modules/MContraction/WeakHamiltonianEye.cc \
Modules/MContraction/Gamma3pt.cc \
Modules/MContraction/DiscLoop.cc \
Modules/MContraction/Meson.cc \
Modules/MContraction/A2AAslashField.cc \
Modules/MContraction/WeakNeutral4ptDisc.cc \
Modules/MContraction/WardIdentity.cc \
Modules/MContraction/A2AMesonField.cc \
Modules/MContraction/WeakHamiltonianNonEye.cc \
Modules/MContraction/Baryon.cc \
Modules/MContraction/DiscLoop.cc \
Modules/MContraction/WeakHamiltonianEye.cc \
Modules/MContraction/A2AMesonField.cc \
Modules/MContraction/WeakNeutral4ptDisc.cc \
Modules/MContraction/Gamma3pt.cc \
Modules/MAction/MobiusDWF.cc \
Modules/MContraction/A2AAslashField.cc \
Modules/MAction/ZMobiusDWF.cc \
Modules/MAction/WilsonClover.cc \
Modules/MAction/Wilson.cc \
Modules/MAction/DWF.cc \
Modules/MAction/MobiusDWF.cc \
Modules/MAction/ScaledDWF.cc \
Modules/MAction/ZMobiusDWF.cc \
Modules/MSolver/A2AVectors.cc \
Modules/MSolver/RBPrecCG.cc \
Modules/MSolver/LocalCoherenceLanczos.cc \
Modules/MSolver/MixedPrecisionRBPrecCG.cc \
Modules/MSolver/A2AAslashVectors.cc \
Modules/MGauge/FundtoHirep.cc \
Modules/MGauge/Random.cc \
Modules/MGauge/UnitEm.cc \
Modules/MGauge/StochEm.cc \
Modules/MGauge/GaugeFix.cc \
Modules/MGauge/Unit.cc \
Modules/MGauge/StoutSmearing.cc \
Modules/MGauge/Electrify.cc \
Modules/MNoise/TimeDilutedSpinColorDiagonal.cc \
Modules/MNoise/FullVolumeSpinColorDiagonal.cc \
Modules/MIO/LoadNersc.cc \
Modules/MIO/LoadA2AVectors.cc \
Modules/MIO/LoadCoarseEigenPack.cc \
Modules/MIO/LoadEigenPack.cc \
Modules/MIO/LoadBinary.cc \
Modules/MIO/LoadCosmHol.cc \
Modules/MNPR/Amputate.cc \
Modules/MNPR/Bilinear.cc \
Modules/MNPR/FourQuark.cc \
Modules/MNPR/Amputate.cc
Modules/MLoop/NoiseLoop.cc \
Modules/MScalarSUN/TwoPoint.cc \
Modules/MScalarSUN/Div.cc \
Modules/MScalarSUN/TwoPointNPR.cc \
Modules/MScalarSUN/ShiftProbe.cc \
Modules/MScalarSUN/TrPhi.cc \
Modules/MScalarSUN/TrMag.cc \
Modules/MScalarSUN/TransProj.cc \
Modules/MScalarSUN/TrKinetic.cc \
Modules/MScalarSUN/StochFreeField.cc \
Modules/MScalarSUN/EMT.cc \
Modules/MScalarSUN/Grad.cc \
Modules/MSink/Smear.cc \
Modules/MSink/Point.cc \
Modules/MFermion/GaugeProp.cc \
Modules/MFermion/FreeProp.cc \
Modules/MScalar/FreeProp.cc \
Modules/MScalar/ScalarVP.cc \
Modules/MScalar/VPCounterTerms.cc \
Modules/MScalar/ChargedProp.cc \
Modules/MSource/SeqConserved.cc \
Modules/MSource/SeqGamma.cc \
Modules/MSource/Wall.cc \
Modules/MSource/Z2.cc \
Modules/MSource/Point.cc \
Modules/MSource/Momentum.cc
modules_hpp =\
Modules/MScalarSUN/TrKinetic.hpp \
Modules/MScalarSUN/StochFreeField.hpp \
Modules/MScalarSUN/TwoPointNPR.hpp \
Modules/MScalarSUN/Grad.hpp \
Modules/MScalarSUN/TransProj.hpp \
Modules/MScalarSUN/Div.hpp \
Modules/MScalarSUN/TrMag.hpp \
Modules/MScalarSUN/ShiftProbe.hpp \
Modules/MScalarSUN/Utils.hpp \
Modules/MScalarSUN/EMT.hpp \
Modules/MScalarSUN/TwoPoint.hpp \
Modules/MScalarSUN/TrPhi.hpp \
Modules/MNoise/FullVolumeSpinColorDiagonal.hpp \
Modules/MNoise/TimeDilutedSpinColorDiagonal.hpp \
Modules/MScalar/FreeProp.hpp \
Modules/MScalar/Scalar.hpp \
Modules/MScalar/ScalarVP.hpp \
Modules/MScalar/ChargedProp.hpp \
Modules/MScalar/VPCounterTerms.hpp \
Modules/MLoop/NoiseLoop.hpp \
Modules/MIO/LoadEigenPack.hpp \
Modules/MIO/LoadA2AVectors.hpp \
Modules/MIO/LoadCoarseEigenPack.hpp \
Modules/MIO/LoadCosmHol.hpp \
Modules/MIO/LoadBinary.hpp \
Modules/MIO/LoadNersc.hpp \
Modules/MSink/Smear.hpp \
Modules/MSink/Point.hpp \
Modules/MFermion/FreeProp.hpp \
Modules/MFermion/GaugeProp.hpp \
Modules/MGauge/FundtoHirep.hpp \
Modules/MGauge/Random.hpp \
Modules/MGauge/StoutSmearing.hpp \
Modules/MGauge/Unit.hpp \
Modules/MGauge/GaugeFix.hpp \
Modules/MGauge/StochEm.hpp \
Modules/MGauge/Electrify.hpp \
Modules/MGauge/UnitEm.hpp \
Modules/MUtilities/TestSeqGamma.hpp \
Modules/MUtilities/RandomVectors.hpp \
Modules/MUtilities/TestSeqConserved.hpp \
Modules/MUtilities/TestSeqGamma.hpp \
Modules/MUtilities/PrecisionCast.hpp \
Modules/MDistil/PerambLight.hpp \
Modules/MDistil/Distil.hpp \
Modules/MDistil/BC2.hpp \
Modules/MDistil/g5_multiply.hpp \
Modules/MDistil/PerambFromSolve.hpp \
Modules/MDistil/Baryon2pt.hpp \
Modules/MUtilities/TestSeqConserved.hpp \
Modules/MSolver/MixedPrecisionRBPrecCG.hpp \
Modules/MSolver/A2AAslashVectors.hpp \
Modules/MSolver/Guesser.hpp \
Modules/MSolver/LocalCoherenceLanczos.hpp \
Modules/MSolver/RBPrecCG.hpp \
Modules/MSolver/A2AVectors.hpp \
Modules/MDistil/LapEvec.hpp \
Modules/MDistil/BContraction.hpp \
Modules/MDistil/Distil.hpp \
Modules/MDistil/g5_multiply.hpp \
Modules/MDistil/DistilVectors.hpp \
Modules/MDistil/Baryon2pt.hpp \
Modules/MDistil/BContraction.hpp \
Modules/MDistil/PerambLight.hpp \
Modules/MDistil/DistilSink.hpp \
Modules/MSource/SeqConserved.hpp \
Modules/MSource/Z2.hpp \
Modules/MSource/Wall.hpp \
Modules/MSource/SeqGamma.hpp \
Modules/MSource/Point.hpp \
Modules/MSource/Momentum.hpp \
Modules/MContraction/A2AAslashField.hpp \
Modules/MContraction/WeakHamiltonianEye.hpp \
Modules/MContraction/Baryon.hpp \
Modules/MContraction/Meson.hpp \
Modules/MDistil/PerambFromSolve.hpp \
Modules/MDistil/BC2.hpp \
Modules/MDistil/PerambMultipleSolves.hpp \
Modules/MContraction/WeakHamiltonian.hpp \
Modules/MContraction/WeakNeutral4ptDisc.hpp \
Modules/MContraction/Gamma3pt.hpp \
Modules/MContraction/WeakHamiltonianEye.hpp \
Modules/MContraction/DiscLoop.hpp \
Modules/MContraction/WeakHamiltonianNonEye.hpp \
Modules/MContraction/WardIdentity.hpp \
Modules/MContraction/Baryon.hpp \
Modules/MContraction/Gamma3pt.hpp \
Modules/MContraction/A2AMesonField.hpp \
Modules/MAction/WilsonClover.hpp \
Modules/MAction/ScaledDWF.hpp \
Modules/MAction/MobiusDWF.hpp \
Modules/MContraction/A2AAslashField.hpp \
Modules/MContraction/WeakHamiltonianNonEye.hpp \
Modules/MContraction/Meson.hpp \
Modules/MContraction/WardIdentity.hpp \
Modules/MAction/Wilson.hpp \
Modules/MAction/WilsonClover.hpp \
Modules/MAction/DWF.hpp \
Modules/MAction/ScaledDWF.hpp \
Modules/MAction/ZMobiusDWF.hpp \
Modules/MSolver/RBPrecCG.hpp \
Modules/MSolver/LocalCoherenceLanczos.hpp \
Modules/MSolver/A2AVectors.hpp \
Modules/MSolver/MixedPrecisionRBPrecCG.hpp \
Modules/MSolver/Guesser.hpp \
Modules/MSolver/A2AAslashVectors.hpp \
Modules/MAction/MobiusDWF.hpp \
Modules/MGauge/Random.hpp \
Modules/MGauge/Unit.hpp \
Modules/MGauge/UnitEm.hpp \
Modules/MGauge/StoutSmearing.hpp \
Modules/MGauge/StochEm.hpp \
Modules/MGauge/Electrify.hpp \
Modules/MGauge/FundtoHirep.hpp \
Modules/MGauge/GaugeFix.hpp \
Modules/MNoise/TimeDilutedSpinColorDiagonal.hpp \
Modules/MNoise/FullVolumeSpinColorDiagonal.hpp \
Modules/MIO/LoadBinary.hpp \
Modules/MIO/LoadCosmHol.hpp \
Modules/MIO/LoadNersc.hpp \
Modules/MIO/LoadA2AVectors.hpp \
Modules/MIO/LoadCoarseEigenPack.hpp \
Modules/MIO/LoadEigenPack.hpp \
Modules/MNPR/Amputate.hpp \
Modules/MNPR/FourQuark.hpp \
Modules/MNPR/Bilinear.hpp \
Modules/MNPR/Amputate.hpp
Modules/MLoop/NoiseLoop.hpp \
Modules/MScalarSUN/TransProj.hpp \
Modules/MScalarSUN/TwoPoint.hpp \
Modules/MScalarSUN/TrMag.hpp \
Modules/MScalarSUN/TrKinetic.hpp \
Modules/MScalarSUN/EMT.hpp \
Modules/MScalarSUN/Grad.hpp \
Modules/MScalarSUN/Utils.hpp \
Modules/MScalarSUN/Div.hpp \
Modules/MScalarSUN/TrPhi.hpp \
Modules/MScalarSUN/TwoPointNPR.hpp \
Modules/MScalarSUN/StochFreeField.hpp \
Modules/MScalarSUN/ShiftProbe.hpp \
Modules/MSink/Smear.hpp \
Modules/MSink/Point.hpp \
Modules/MFermion/GaugeProp.hpp \
Modules/MFermion/FreeProp.hpp \
Modules/MScalar/Scalar.hpp \
Modules/MScalar/ScalarVP.hpp \
Modules/MScalar/FreeProp.hpp \
Modules/MScalar/ChargedProp.hpp \
Modules/MScalar/VPCounterTerms.hpp \
Modules/MSource/Momentum.hpp \
Modules/MSource/SeqGamma.hpp \
Modules/MSource/Point.hpp \
Modules/MSource/Z2.hpp \
Modules/MSource/Wall.hpp \
Modules/MSource/SeqConserved.hpp