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

envCreate problem..

This commit is contained in:
ferben 2019-11-12 12:23:34 +00:00
parent b8f0878981
commit db952993fa
8 changed files with 128 additions and 84 deletions

View File

@ -18,6 +18,7 @@ class DistilParPar: Serializable
{ {
public: public:
GRID_SERIALIZABLE_CLASS_MEMBERS(DistilParPar, GRID_SERIALIZABLE_CLASS_MEMBERS(DistilParPar,
int, nvec,
int, nnoise, int, nnoise,
int, tsrc, int, tsrc,
int, TI, int, TI,
@ -74,7 +75,7 @@ std::vector<std::string> TDistilPar<FImpl>::getOutput(void)
template <typename FImpl> template <typename FImpl>
void TDistilPar<FImpl>::setup(void) void TDistilPar<FImpl>::setup(void)
{ {
// envCreate(Hadrons::MDistil::DistilParameters, getName(), 1); //DOES NOT WORK
} }
// execution /////////////////////////////////////////////////////////////////// // execution ///////////////////////////////////////////////////////////////////
@ -82,11 +83,12 @@ template <typename FImpl>
void TDistilPar<FImpl>::execute(void) void TDistilPar<FImpl>::execute(void)
{ {
Hadrons::MDistil::DistilParameters &out = envGet(Hadrons::MDistil::DistilParameters, getName()); Hadrons::MDistil::DistilParameters &out = envGet(Hadrons::MDistil::DistilParameters, getName());
/* out.nvec=par().nvec;
out.nnoise=par().nnoise; out.nnoise=par().nnoise;
out.tsrc=par().tsrc; out.tsrc=par().tsrc;
out.TI=par().TI; out.TI=par().TI;
out.LI=par().LI; out.LI=par().LI;
out.SI=par().SI; out.SI=par().SI; */
} }
END_MODULE_NAMESPACE END_MODULE_NAMESPACE

View File

@ -49,7 +49,7 @@ public:
std::string, lapevec, std::string, lapevec,
std::string, rho, std::string, rho,
std::string, phi, std::string, phi,
MDistil::DistilParameters, DistilPar); std::string, DistilPar);
}; };
template <typename FImpl> template <typename FImpl>
@ -78,6 +78,7 @@ public:
std::string PerambulatorName; std::string PerambulatorName;
std::string NoiseVectorName; std::string NoiseVectorName;
std::string LapEvecName; std::string LapEvecName;
std::string DParName;
bool bMakeRho; bool bMakeRho;
bool bMakePhi; bool bMakePhi;
std::string RhoName; std::string RhoName;
@ -108,7 +109,8 @@ std::vector<std::string> TDistilVectors<FImpl>::getInput(void)
PerambulatorName = par().perambulator; PerambulatorName = par().perambulator;
NoiseVectorName = par().noise; NoiseVectorName = par().noise;
LapEvecName = par().lapevec; LapEvecName = par().lapevec;
return { PerambulatorName, NoiseVectorName, LapEvecName }; DParName = par().DistilPar;
return { PerambulatorName, NoiseVectorName, LapEvecName, DParName };
} }
template <typename FImpl> template <typename FImpl>
@ -142,16 +144,17 @@ void TDistilVectors<FImpl>::setup(void)
Cleanup(); Cleanup();
auto &noise = envGet(NoiseTensor, NoiseVectorName); auto &noise = envGet(NoiseTensor, NoiseVectorName);
auto &perambulator = envGet(PerambTensor, PerambulatorName); auto &perambulator = envGet(PerambTensor, PerambulatorName);
auto &DPar = envGet(MDistil::DistilParameters, DParName);
// We expect the perambulator to have been created with these indices // We expect the perambulator to have been created with these indices
assert( perambulator.ValidateIndexNames() && "Perambulator index names bad" ); assert( perambulator.ValidateIndexNames() && "Perambulator index names bad" );
const int Nt{env().getDim(Tdir)}; const int Nt{env().getDim(Tdir)};
const int nvec{par().DistilPar.nvec}; const int nvec{DPar.nvec};
const int nnoise{par().DistilPar.nnoise}; const int nnoise{DPar.nnoise};
const int TI{par().DistilPar.TI}; const int TI{DPar.TI};
const int LI{par().DistilPar.LI}; const int LI{DPar.LI};
const int SI{par().DistilPar.SI}; const int SI{DPar.SI};
const bool full_tdil{ TI == Nt }; const bool full_tdil{ TI == Nt };
const int Nt_inv{ full_tdil ? 1 : TI }; const int Nt_inv{ full_tdil ? 1 : TI };
@ -195,6 +198,7 @@ void TDistilVectors<FImpl>::execute(void)
auto &noise = envGet(NoiseTensor, NoiseVectorName); auto &noise = envGet(NoiseTensor, NoiseVectorName);
auto &perambulator = envGet(PerambTensor, PerambulatorName); auto &perambulator = envGet(PerambTensor, PerambulatorName);
auto &epack = envGet(Grid::Hadrons::EigenPack<LatticeColourVector>, LapEvecName); auto &epack = envGet(Grid::Hadrons::EigenPack<LatticeColourVector>, LapEvecName);
auto &DPar = envGet(MDistil::DistilParameters, DParName);
envGetTmp(LatticeSpinColourVector, source4d); envGetTmp(LatticeSpinColourVector, source4d);
envGetTmp(LatticeSpinColourVector, source3d); envGetTmp(LatticeSpinColourVector, source3d);
@ -206,12 +210,12 @@ void TDistilVectors<FImpl>::execute(void)
const int Ntfirst{ grid4d->LocalStarts()[3] }; const int Ntfirst{ grid4d->LocalStarts()[3] };
const int Nt{env().getDim(Tdir)}; const int Nt{env().getDim(Tdir)};
const int nvec{par().DistilPar.nvec}; const int nvec{DPar.nvec};
const int nnoise{par().DistilPar.nnoise}; const int nnoise{DPar.nnoise};
const int tsrc{par().DistilPar.tsrc}; const int tsrc{DPar.tsrc};
const int TI{par().DistilPar.TI}; const int TI{DPar.TI};
const int LI{par().DistilPar.LI}; const int LI{DPar.LI};
const int SI{par().DistilPar.SI}; const int SI{DPar.SI};
const bool full_tdil{ TI == Nt }; const bool full_tdil{ TI == Nt };
const int Nt_inv{ full_tdil ? 1 : TI }; const int Nt_inv{ full_tdil ? 1 : TI };

View File

@ -43,7 +43,7 @@ class NoisesPar: Serializable
{ {
public: public:
GRID_SERIALIZABLE_CLASS_MEMBERS(NoisesPar, GRID_SERIALIZABLE_CLASS_MEMBERS(NoisesPar,
MDistil::DistilParameters, DistilPar, std::string, DistilPar,
std::string, NoiseFileName) std::string, NoiseFileName)
}; };
@ -62,6 +62,8 @@ public:
virtual void setup(void); virtual void setup(void);
// execution // execution
virtual void execute(void); virtual void execute(void);
protected:
std::string DParName;
}; };
MODULE_REGISTER_TMP(Noises, TNoises<FIMPL>, MDistil); MODULE_REGISTER_TMP(Noises, TNoises<FIMPL>, MDistil);
@ -79,7 +81,8 @@ TNoises<FImpl>::TNoises(const std::string name)
template <typename FImpl> template <typename FImpl>
std::vector<std::string> TNoises<FImpl>::getInput(void) std::vector<std::string> TNoises<FImpl>::getInput(void)
{ {
return {}; DParName = par().DistilPar;
return { DParName };
} }
template <typename FImpl> template <typename FImpl>
@ -93,9 +96,10 @@ std::vector<std::string> TNoises<FImpl>::getOutput(void)
template <typename FImpl> template <typename FImpl>
void TNoises<FImpl>::setup(void) void TNoises<FImpl>::setup(void)
{ {
auto &DPar = envGet(MDistil::DistilParameters, DParName);
const int Nt{env().getDim(Tdir)}; const int Nt{env().getDim(Tdir)};
const int nvec{par().DistilPar.nvec}; const int nvec{DPar.nvec};
const int nnoise{par().DistilPar.nnoise}; const int nnoise{DPar.nnoise};
envCreate(NoiseTensor, getName(), 1, nnoise, Nt, nvec, Ns); envCreate(NoiseTensor, getName(), 1, nnoise, Nt, nvec, Ns);
} }
@ -103,11 +107,12 @@ void TNoises<FImpl>::setup(void)
template <typename FImpl> template <typename FImpl>
void TNoises<FImpl>::execute(void) void TNoises<FImpl>::execute(void)
{ {
auto &DPar = envGet(MDistil::DistilParameters, DParName);
const int Nt{env().getDim(Tdir)}; const int Nt{env().getDim(Tdir)};
const int nnoise{par().DistilPar.nnoise}; const int nnoise{DPar.nnoise};
const int nvec{par().DistilPar.nvec}; const int nvec{DPar.nvec};
const int TI{par().DistilPar.TI}; const int TI{DPar.TI};
const int LI{par().DistilPar.LI}; const int LI{DPar.LI};
const bool full_tdil{ TI == Nt }; const bool full_tdil{ TI == Nt };
const bool exact_distillation{ full_tdil && LI == nvec }; const bool exact_distillation{ full_tdil && LI == nvec };

View File

@ -53,7 +53,7 @@ public:
std::string, solve, std::string, solve,
std::string, nvec_reduced, std::string, nvec_reduced,
std::string, LI_reduced, std::string, LI_reduced,
MDistil::DistilParameters, DistilPar); std::string, DistilPar);
}; };
template <typename FImpl> template <typename FImpl>
@ -75,6 +75,8 @@ public:
protected: protected:
GridCartesian * grid3d; // Owned by me, so I must delete it GridCartesian * grid3d; // Owned by me, so I must delete it
GridCartesian * grid4d; GridCartesian * grid4d;
//other members
std::string DParName;
protected: protected:
virtual void Cleanup(void); virtual void Cleanup(void);
@ -101,7 +103,9 @@ TPerambFromSolve<FImpl>::~TPerambFromSolve(void)
template <typename FImpl> template <typename FImpl>
std::vector<std::string> TPerambFromSolve<FImpl>::getInput(void) std::vector<std::string> TPerambFromSolve<FImpl>::getInput(void)
{ {
return std::vector<std::string>{ par().solve, par().eigenPack }; //return std::vector<std::string>{ par().solve, par().eigenPack };
DParName = par().DistilPar;
return {par().solve, par().eigenPack, DParName };
} }
template <typename FImpl> template <typename FImpl>
@ -115,12 +119,13 @@ template <typename FImpl>
void TPerambFromSolve<FImpl>::setup(void) void TPerambFromSolve<FImpl>::setup(void)
{ {
Cleanup(); Cleanup();
auto &DPar = envGet(MDistil::DistilParameters, DParName);
const int Nt{env().getDim(Tdir)}; const int Nt{env().getDim(Tdir)};
const int nvec{par().DistilPar.nvec}; const int nvec{DPar.nvec};
const int nnoise{par().DistilPar.nnoise}; const int nnoise{DPar.nnoise};
const int LI{par().DistilPar.LI}; const int LI{DPar.LI};
const int TI{par().DistilPar.TI}; const int TI{DPar.TI};
const int SI{par().DistilPar.SI}; const int SI{DPar.SI};
const bool full_tdil{ TI == Nt }; const bool full_tdil{ TI == Nt };
const int Nt_inv{ full_tdil ? 1 : TI }; const int Nt_inv{ full_tdil ? 1 : TI };
const int nvec_reduced{ par().nvec_reduced.empty() ? nvec:std::stoi(par().nvec_reduced)}; const int nvec_reduced{ par().nvec_reduced.empty() ? nvec:std::stoi(par().nvec_reduced)};
@ -152,12 +157,13 @@ void TPerambFromSolve<FImpl>::execute(void)
GridCartesian * grid4d = env().getGrid(); GridCartesian * grid4d = env().getGrid();
const int Ntlocal{grid4d->LocalDimensions()[3]}; const int Ntlocal{grid4d->LocalDimensions()[3]};
const int Ntfirst{grid4d->LocalStarts()[3]}; const int Ntfirst{grid4d->LocalStarts()[3]};
auto &DPar = envGet(MDistil::DistilParameters, DParName);
const int Nt{env().getDim(Tdir)}; const int Nt{env().getDim(Tdir)};
const int nvec{par().DistilPar.nvec}; const int nvec{DPar.nvec};
const int nnoise{par().DistilPar.nnoise}; const int nnoise{DPar.nnoise};
const int TI{par().DistilPar.TI}; const int TI{DPar.TI};
const int LI{par().DistilPar.LI}; const int LI{DPar.LI};
const int SI{par().DistilPar.SI}; const int SI{DPar.SI};
const bool full_tdil{ TI == Nt }; const bool full_tdil{ TI == Nt };
const int Nt_inv{ full_tdil ? 1 : TI }; const int Nt_inv{ full_tdil ? 1 : TI };
const int nvec_reduced{ par().nvec_reduced.empty() ? nvec:std::stoi(par().nvec_reduced)}; const int nvec_reduced{ par().nvec_reduced.empty() ? nvec:std::stoi(par().nvec_reduced)};

View File

@ -49,7 +49,7 @@ public:
std::string, PerambFileName, std::string, PerambFileName,
std::string, UnsmearedSinkFileName, std::string, UnsmearedSinkFileName,
std::string, UnsmearedSinkMultiFile, std::string, UnsmearedSinkMultiFile,
MDistil::DistilParameters, DistilPar); std::string, DistilPar);
}; };
template <typename FImpl> template <typename FImpl>
@ -79,6 +79,7 @@ protected:
unsigned int Ls_; unsigned int Ls_;
std::string sLapEvecName; std::string sLapEvecName;
std::string sNoiseName; std::string sNoiseName;
std::string DParName;
}; };
MODULE_REGISTER_TMP(Perambulator, TPerambulator<FIMPL>, MDistil); MODULE_REGISTER_TMP(Perambulator, TPerambulator<FIMPL>, MDistil);
@ -105,7 +106,8 @@ std::vector<std::string> TPerambulator<FImpl>::getInput(void)
{ {
sLapEvecName = par().lapevec; sLapEvecName = par().lapevec;
sNoiseName = par().noise; sNoiseName = par().noise;
return {sLapEvecName, par().solver, sNoiseName }; DParName = par().DistilPar;
return {sLapEvecName, par().solver, sNoiseName, DParName };
} }
template <typename FImpl> template <typename FImpl>
@ -121,13 +123,14 @@ void TPerambulator<FImpl>::setup(void)
Cleanup(); Cleanup();
grid4d = env().getGrid(); grid4d = env().getGrid();
grid3d = MakeLowerDimGrid(grid4d); grid3d = MakeLowerDimGrid(grid4d);
auto &DPar = envGet(MDistil::DistilParameters, DParName);
const int Nt{env().getDim(Tdir)}; const int Nt{env().getDim(Tdir)};
const int nvec{par().DistilPar.nvec}; const int nvec{DPar.nvec};
const int nnoise{par().DistilPar.nnoise}; const int nnoise{DPar.nnoise};
const int tsrc{par().DistilPar.tsrc}; const int tsrc{DPar.tsrc};
const int TI{par().DistilPar.TI}; const int TI{DPar.TI};
const int LI{par().DistilPar.LI}; const int LI{DPar.LI};
const int SI{par().DistilPar.SI}; const int SI{DPar.SI};
const bool full_tdil{ TI == Nt }; const bool full_tdil{ TI == Nt };
const int Nt_inv{ full_tdil ? 1 : TI }; const int Nt_inv{ full_tdil ? 1 : TI };
const std::string UnsmearedSinkFileName{ par().UnsmearedSinkFileName }; const std::string UnsmearedSinkFileName{ par().UnsmearedSinkFileName };
@ -170,13 +173,14 @@ void TPerambulator<FImpl>::Cleanup(void)
template <typename FImpl> template <typename FImpl>
void TPerambulator<FImpl>::execute(void) void TPerambulator<FImpl>::execute(void)
{ {
auto &DPar = envGet(MDistil::DistilParameters, DParName);
const int Nt{env().getDim(Tdir)}; const int Nt{env().getDim(Tdir)};
const int nvec{par().DistilPar.nvec}; const int nvec{DPar.nvec};
const int nnoise{par().DistilPar.nnoise}; const int nnoise{DPar.nnoise};
const int tsrc{par().DistilPar.tsrc}; const int tsrc{DPar.tsrc};
const int TI{par().DistilPar.TI}; const int TI{DPar.TI};
const int LI{par().DistilPar.LI}; const int LI{DPar.LI};
const int SI{par().DistilPar.SI}; const int SI{DPar.SI};
const bool full_tdil{ TI == Nt }; const bool full_tdil{ TI == Nt };
const int Nt_inv{ full_tdil ? 1 : TI }; const int Nt_inv{ full_tdil ? 1 : TI };

View File

@ -44,7 +44,7 @@ class LoadDistilNoisePar: Serializable
public: public:
GRID_SERIALIZABLE_CLASS_MEMBERS(LoadDistilNoisePar, GRID_SERIALIZABLE_CLASS_MEMBERS(LoadDistilNoisePar,
std::string, NoiseFileName, std::string, NoiseFileName,
MDistil::DistilParameters, DistilPar); std::string, DistilPar);
}; };
template <typename FImpl> template <typename FImpl>
@ -62,6 +62,8 @@ public:
virtual void setup(void); virtual void setup(void);
// execution // execution
virtual void execute(void); virtual void execute(void);
protected:
std::string DParName;
}; };
MODULE_REGISTER_TMP(LoadDistilNoise, TLoadDistilNoise<FIMPL>, MIO); MODULE_REGISTER_TMP(LoadDistilNoise, TLoadDistilNoise<FIMPL>, MIO);
@ -79,9 +81,9 @@ TLoadDistilNoise<FImpl>::TLoadDistilNoise(const std::string name)
template <typename FImpl> template <typename FImpl>
std::vector<std::string> TLoadDistilNoise<FImpl>::getInput(void) std::vector<std::string> TLoadDistilNoise<FImpl>::getInput(void)
{ {
std::vector<std::string> in; DParName = par().DistilPar;
return { par().NoiseFileName, DParName };
return in;
} }
template <typename FImpl> template <typename FImpl>
@ -96,9 +98,10 @@ std::vector<std::string> TLoadDistilNoise<FImpl>::getOutput(void)
template <typename FImpl> template <typename FImpl>
void TLoadDistilNoise<FImpl>::setup(void) void TLoadDistilNoise<FImpl>::setup(void)
{ {
auto &DPar = envGet(MDistil::DistilParameters, DParName);
const int Nt{env().getDim(Tdir)}; const int Nt{env().getDim(Tdir)};
const int nvec{par().DistilPar.nvec}; const int nvec{DPar.nvec};
const int nnoise{par().DistilPar.nnoise}; const int nnoise{DPar.nnoise};
envCreate(MDistil::NoiseTensor, getName(), 1, nnoise, Nt, nvec, Ns); envCreate(MDistil::NoiseTensor, getName(), 1, nnoise, Nt, nvec, Ns);
} }

View File

@ -44,7 +44,7 @@ class LoadPerambulatorPar: Serializable
public: public:
GRID_SERIALIZABLE_CLASS_MEMBERS(LoadPerambulatorPar, GRID_SERIALIZABLE_CLASS_MEMBERS(LoadPerambulatorPar,
std::string, PerambFileName, std::string, PerambFileName,
MDistil::DistilParameters, DistilPar); std::string, DistilPar);
}; };
template <typename FImpl> template <typename FImpl>
@ -62,6 +62,8 @@ public:
virtual void setup(void); virtual void setup(void);
// execution // execution
virtual void execute(void); virtual void execute(void);
protected:
std::string DParName;
}; };
MODULE_REGISTER_TMP(LoadPerambulator, TLoadPerambulator<FIMPL>, MIO); MODULE_REGISTER_TMP(LoadPerambulator, TLoadPerambulator<FIMPL>, MIO);
@ -79,9 +81,8 @@ TLoadPerambulator<FImpl>::TLoadPerambulator(const std::string name)
template <typename FImpl> template <typename FImpl>
std::vector<std::string> TLoadPerambulator<FImpl>::getInput(void) std::vector<std::string> TLoadPerambulator<FImpl>::getInput(void)
{ {
std::vector<std::string> in; DParName = par().DistilPar;
return { par().PerambFileName, DParName };
return in;
} }
template <typename FImpl> template <typename FImpl>
@ -96,13 +97,14 @@ std::vector<std::string> TLoadPerambulator<FImpl>::getOutput(void)
template <typename FImpl> template <typename FImpl>
void TLoadPerambulator<FImpl>::setup(void) void TLoadPerambulator<FImpl>::setup(void)
{ {
auto &DPar = envGet(MDistil::DistilParameters, DParName);
const int Nt{env().getDim(Tdir)}; const int Nt{env().getDim(Tdir)};
const int nvec{par().DistilPar.nvec}; const int nvec{DPar.nvec};
const int nnoise{par().DistilPar.nnoise}; const int nnoise{DPar.nnoise};
const int tsrc{par().DistilPar.tsrc}; const int tsrc{DPar.tsrc};
const int TI{par().DistilPar.TI}; const int TI{DPar.TI};
const int LI{par().DistilPar.LI}; const int LI{DPar.LI};
const int SI{par().DistilPar.SI}; const int SI{DPar.SI};
const bool full_tdil{ TI == Nt }; const bool full_tdil{ TI == Nt };
const bool exact_distillation{ full_tdil && LI == nvec }; const bool exact_distillation{ full_tdil && LI == nvec };
const int Nt_inv{ full_tdil ? 1 : TI }; const int Nt_inv{ full_tdil ? 1 : TI };

View File

@ -58,6 +58,10 @@ void test_Global(Application &application)
globalPar.trajCounter.end = 1120; globalPar.trajCounter.end = 1120;
globalPar.trajCounter.step = 20; globalPar.trajCounter.step = 20;
globalPar.runId = "test"; globalPar.runId = "test";
globalPar.graphFile = "";
globalPar.scheduleFile = "";
globalPar.saveSchedule = "false";
globalPar.parallelWriteMaxRetry = -1;
application.setPar(globalPar); application.setPar(globalPar);
} }
@ -65,10 +69,9 @@ void test_Global(Application &application)
// Create a random gauge with the correct name // Create a random gauge with the correct name
///////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////
std::string test_Gauge(Application &application, const char * pszBaseName ) std::string test_Gauge(Application &application )
{ {
std::string sGaugeName{ pszBaseName }; std::string sGaugeName{ "gauge" };
sGaugeName.append( "_gauge" );
application.createModule<MGauge::Random>( sGaugeName ); application.createModule<MGauge::Random>( sGaugeName );
return sGaugeName; return sGaugeName;
} }
@ -80,8 +83,9 @@ std::string test_Gauge(Application &application, const char * pszBaseName )
void test_LapEvec(Application &application) void test_LapEvec(Application &application)
{ {
const char szModuleName[] = "LapEvec"; const char szModuleName[] = "LapEvec";
test_Gauge( application, szModuleName ); test_Gauge( application );
MDistil::LapEvecPar p; MDistil::LapEvecPar p;
p.gauge = "gauge";
p.Stout.steps = 3; p.Stout.steps = 3;
p.Stout.rho = 0.2; p.Stout.rho = 0.2;
p.Cheby.PolyOrder = 11; p.Cheby.PolyOrder = 11;
@ -117,7 +121,7 @@ std::string test_Solver(Application &application, const char * pSuffix = nullptr
sActionName.append( pSuffix ); sActionName.append( pSuffix );
} }
MAction::DWF::Par actionPar; MAction::DWF::Par actionPar;
actionPar.gauge = "LapEvec_gauge"; actionPar.gauge = "gauge";
actionPar.Ls = 16; actionPar.Ls = 16;
actionPar.M5 = 1.8; actionPar.M5 = 1.8;
actionPar.mass = 0.005; actionPar.mass = 0.005;
@ -133,6 +137,23 @@ std::string test_Solver(Application &application, const char * pSuffix = nullptr
return sSolverName; return sSolverName;
} }
/////////////////////////////////////////////////////////////
// DistilParameters
/////////////////////////////////////////////////////////////
std::string test_DPar(Application &application) {
// DistilVectors parameters
MDistil::DistilParPar DistilPar;
DistilPar.nvec = 5;
DistilPar.nnoise = 1;
DistilPar.tsrc = 0;
DistilPar.LI = 5;
DistilPar.TI = 8;
DistilPar.SI = 4;
std::string sDParName{"DPar_l"};
application.createModule<MDistil::DistilPar>(sDParName,DistilPar);
return sDParName;
}
///////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////
// Noises // Noises
///////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////
@ -140,8 +161,7 @@ std::string test_Solver(Application &application, const char * pSuffix = nullptr
std::string test_Noises(Application &application, const std::string &sNoiseBaseName ) { std::string test_Noises(Application &application, const std::string &sNoiseBaseName ) {
// DistilVectors parameters // DistilVectors parameters
MDistil::NoisesPar NoisePar; MDistil::NoisesPar NoisePar;
NoisePar.nnoise = 1; NoisePar.DistilPar = "DPar_l";
NoisePar.nvec = 5;
std::string sNoiseName{sNoiseBaseName + "_noise"}; std::string sNoiseName{sNoiseBaseName + "_noise"};
application.createModule<MDistil::Noises>(sNoiseName,NoisePar); application.createModule<MDistil::Noises>(sNoiseName,NoisePar);
return sNoiseName; return sNoiseName;
@ -164,9 +184,7 @@ void test_LoadPerambulators( Application &application, const char * pszSuffix =
std::string sModuleName{ PerambulatorName( pszSuffix ) }; std::string sModuleName{ PerambulatorName( pszSuffix ) };
MIO::LoadPerambulator::Par PerambPar; MIO::LoadPerambulator::Par PerambPar;
PerambPar.PerambFileName = sModuleName; PerambPar.PerambFileName = sModuleName;
PerambPar.Distil.tsrc = 0; PerambPar.DistilPar = "DPar_l";
PerambPar.Distil.nnoise = 1;
PerambPar.nvec = 5;
test_Noises(application, sModuleName); // I want these written after solver stuff test_Noises(application, sModuleName); // I want these written after solver stuff
application.createModule<MIO::LoadPerambulator>( sModuleName, PerambPar ); application.createModule<MIO::LoadPerambulator>( sModuleName, PerambPar );
} }
@ -179,9 +197,7 @@ void test_Perambulators( Application &application, const char * pszSuffix = null
PerambPar.lapevec = "LapEvec"; PerambPar.lapevec = "LapEvec";
PerambPar.PerambFileName = sModuleName; PerambPar.PerambFileName = sModuleName;
PerambPar.solver = test_Solver( application, pszSuffix ); PerambPar.solver = test_Solver( application, pszSuffix );
PerambPar.Distil.tsrc = 0; PerambPar.DistilPar = "DPar_l";
PerambPar.Distil.nnoise = 1;
PerambPar.nvec = 5;
test_Noises(application, sModuleName); // I want these written after solver stuff test_Noises(application, sModuleName); // I want these written after solver stuff
application.createModule<MDistil::Perambulator>( sModuleName, PerambPar ); application.createModule<MDistil::Perambulator>( sModuleName, PerambPar );
} }
@ -202,9 +218,7 @@ void test_DistilVectors(Application &application, const char * pszSuffix = nullp
DistilVecPar.noise = sPerambName + "_noise"; DistilVecPar.noise = sPerambName + "_noise";
DistilVecPar.perambulator = sPerambName; DistilVecPar.perambulator = sPerambName;
DistilVecPar.lapevec = "LapEvec"; DistilVecPar.lapevec = "LapEvec";
DistilVecPar.tsrc = 0; DistilVecPar.DistilPar = "DPar_l";
if( pszNvec )
DistilVecPar.nvec = pszNvec;
application.createModule<MDistil::DistilVectors>(sModuleName,DistilVecPar); application.createModule<MDistil::DistilVectors>(sModuleName,DistilVecPar);
} }
@ -331,15 +345,17 @@ int main(int argc, char *argv[])
LOG(Message) << "Computing Meson 2pt-function" << std::endl; LOG(Message) << "Computing Meson 2pt-function" << std::endl;
test_Global( application ); test_Global( application );
test_LapEvec( application ); test_LapEvec( application );
test_Perambulators( application ); test_DPar( application );
test_DistilVectors( application ); //test_Perambulators( application );
test_MesonField( application, "Phi", "_phi" ); //test_DistilVectors( application );
test_MesonField( application, "Rho", "_rho" ); //test_MesonField( application, "Phi", "_phi" );
//test_MesonField( application, "Rho", "_rho" );
break; break;
case 1: case 1:
LOG(Message) << "Computing Meson 2pt-function by loading perambulators" << std::endl; LOG(Message) << "Computing Meson 2pt-function by loading perambulators" << std::endl;
test_Global( application ); test_Global( application );
test_LapEvec( application ); test_LapEvec( application );
test_DPar( application );
test_LoadPerambulators( application ); test_LoadPerambulators( application );
test_DistilVectors( application ); test_DistilVectors( application );
test_MesonField( application, "Phi", "_phi" ); test_MesonField( application, "Phi", "_phi" );
@ -349,6 +365,7 @@ int main(int argc, char *argv[])
LOG(Message) << "Computing Meson 2pt-function for two quark flavours" << std::endl; LOG(Message) << "Computing Meson 2pt-function for two quark flavours" << std::endl;
test_Global( application ); test_Global( application );
test_LapEvec( application ); test_LapEvec( application );
test_DPar( application );
test_Perambulators( application ); test_Perambulators( application );
test_DistilVectors( application ); test_DistilVectors( application );
test_Perambulators( application, "S" ); test_Perambulators( application, "S" );
@ -360,6 +377,7 @@ int main(int argc, char *argv[])
LOG(Message) << "Computing Meson 2pt-function with current insertion" << std::endl; LOG(Message) << "Computing Meson 2pt-function with current insertion" << std::endl;
test_Global( application ); test_Global( application );
test_LapEvec( application ); test_LapEvec( application );
test_DPar( application );
test_Perambulators( application ); test_Perambulators( application );
test_MesonSink( application ); test_MesonSink( application );
break; break;