From d889cebc608129f2cf8ab1199990269491b814b8 Mon Sep 17 00:00:00 2001 From: ferben Date: Mon, 11 Feb 2019 17:39:42 +0000 Subject: [PATCH] unique string is now used --- Hadrons/Modules/MDistil/PerambLight.hpp | 20 +++++++++++++++----- tests/hadrons/Test_hadrons_distil.cc | 6 ++++++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Hadrons/Modules/MDistil/PerambLight.hpp b/Hadrons/Modules/MDistil/PerambLight.hpp index 742c25a3..00ac74cc 100644 --- a/Hadrons/Modules/MDistil/PerambLight.hpp +++ b/Hadrons/Modules/MDistil/PerambLight.hpp @@ -50,6 +50,9 @@ public: GRID_SERIALIZABLE_CLASS_MEMBERS(PerambLightPar, std::string, eigenPack, std::string, PerambFileName, + std::string, ConfigFileDir, + std::string, ConfigFileName, + std::string, UniqueIdentifier, bool, multiFile, int, nvec, int, Ls, // For makeFiveDimGrid @@ -189,10 +192,17 @@ void TPerambLight::execute(void) 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}; - + + const Real mass{Solver.mass}; + const Real M5 {Solver.M5}; + 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>>, par().noise); auto &noise = envGet(std::vector, getName() + "_noise"); auto &perambulator = envGet(Perambulator, @@ -229,7 +239,8 @@ void TPerambLight::execute(void) Umu = where(coor==t,Usft,Umu); } } else { - std::string fileName( "/home/dp008/dp008/dc-rich6/Scripts/ConfigsDeflQED/ckpoint_lat.3000" ); + //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; @@ -238,7 +249,8 @@ void TPerambLight::execute(void) //Create Noises //std::cout << pszGaugeConfigFile << std::endl; //GridSerialRNG sRNG; sRNG.SeedUniqueString(std::string(pszGaugeConfigFile)); - GridSerialRNG sRNG; sRNG.SeedUniqueString("unique_string"); // TODO: Proper unique string. Include quark mass, gauge field? Maybe also nvec, but in a way that more nvec would only add noises, not change all of them??? + GridSerialRNG sRNG; + sRNG.SeedUniqueString(ConfigFileName + "_" + std::to_string(mass) + "_" + UniqueIdentifier); Real rn; for (int inoise=0;inoise::execute(void) const int Ntlocal{grid4d->LocalDimensions()[3]}; const int Ntfirst{grid4d->LocalStarts()[3]}; - const Real mass{Solver.mass}; - const Real M5 {Solver.M5}; std::cout << "init RBG " << std::endl; GridRedBlackCartesian RBGrid(grid4d); std::cout << "init RBG done" << std::endl; diff --git a/tests/hadrons/Test_hadrons_distil.cc b/tests/hadrons/Test_hadrons_distil.cc index db4ae273..1e2378fa 100644 --- a/tests/hadrons/Test_hadrons_distil.cc +++ b/tests/hadrons/Test_hadrons_distil.cc @@ -89,6 +89,9 @@ void test_Perambulators(Application &application) MDistil::PerambLight::Par PerambPar; PerambPar.eigenPack="LapEvec"; PerambPar.PerambFileName="peramb.bin"; + PerambPar.ConfigFileDir="/home/dp008/dp008/dc-rich6/Scripts/ConfigsDeflQED/"; + PerambPar.ConfigFileName="ckpoint_lat.3000"; + PerambPar.UniqueIdentifier="full_dilution"; PerambPar.Distil.tsrc = 0; PerambPar.Distil.nnoise = 1; PerambPar.Distil.LI=5; @@ -133,6 +136,9 @@ void test_PerambulatorsS(Application &application) MDistil::PerambLight::Par PerambPar; PerambPar.eigenPack="LapEvec"; PerambPar.PerambFileName="perambS.bin"; + PerambPar.ConfigFileDir="/home/dp008/dp008/dc-rich6/Scripts/ConfigsDeflQED/"; + PerambPar.ConfigFileName="ckpoint_lat.3000"; + PerambPar.UniqueIdentifier="full_dilution"; PerambPar.Distil.tsrc = 0; PerambPar.Distil.nnoise = 1; PerambPar.Distil.LI=3;