25 XMLReader inputtop(xml, path);
47 namespace InlineSeqPropTestEnv
86 XMLReader paramtop(xml_in, path);
88 if (paramtop.count(
"Frequency") == 1)
100 if (paramtop.count(
"xml_file") != 0)
107 QDPIO::cerr << __func__ <<
": Caught Exception reading XML: " << e << std::endl;
135 push(xml_out,
"SeqPropTest");
136 write(xml_out,
"update_no", update_no);
137 write(xml_out,
"xml_file", xml_file);
140 XMLFileWriter xml(xml_file);
141 func(update_no, xml);
145 func(update_no, xml_out);
161 push(xml_out,
"SeqPropTest");
162 write(xml_out,
"update_no", update_no);
164 QDPIO::cout <<
name <<
": sequential propagator sequential test" << std::endl;
172 XMLBufferWriter gauge_xml;
173 multi1d<LatticeColorMatrix>
u;
180 catch( std::bad_cast )
182 QDPIO::cerr <<
name <<
": caught dynamic cast error"
188 QDPIO::cerr <<
name <<
": error extracting gauge field: " << e
194 write(xml_out,
"Config_info", gauge_xml);
196 push(xml_out,
"Output_version");
197 write(xml_out,
"out_version", 1);
201 MesPlq(xml_out,
"Observables",
u);
206 QDPIO::cerr <<
name <<
": sanity error: " << std::endl;
217 push(xml_out,
"Forward_prop_infos");
220 push(xml_out,
"elem");
224 forward_props[loop] =
228 XMLReader prop_file_xml, prop_record_xml;
237 write(xml_out,
"Propagator_info", prop_record_xml);
239 catch( std::bad_cast )
241 QDPIO::cerr <<
name <<
": caught dynamic cast error"
247 QDPIO::cerr <<
name <<
": error extracting forward props: " << e
255 QDPIO::cout <<
"Forward propagators successfully read and parsed" << std::endl;
261 LatticePropagator seqprop;
270 XMLReader prop_file_xml, prop_record_xml;
275 write(xml_out,
"Seqprop_info", prop_record_xml);
279 read(prop_record_xml,
"/SequentialProp", seqprop_header);
281 catch( std::bad_cast )
283 QDPIO::cerr <<
name <<
": caught dynamic cast error"
289 QDPIO::cerr <<
name <<
": error extracting seqprop: " << e
294 QDPIO::cout <<
"Sequential propagator successfully read and parsed" << std::endl;
304 push(xml_out,
"Forward_prop_correlators");
307 multi1d<Double> forward_prop_corr = sumMulti(localNorm2(forward_props[loop]),
310 push(xml_out,
"elem");
311 write(xml_out,
"forward_prop_corr", forward_prop_corr);
319 multi1d<Double> forward_prop_corr = sumMulti(localNorm2(seqprop),
322 push(xml_out,
"Seqprop_correlator");
323 write(xml_out,
"seqprop_corr", forward_prop_corr);
333 XMLReader sourcetop(xml_s);
343 (*sourceSmearing)(seqprop);
352 XMLReader seqsrctop(xml_seq);
363 Complex source_value = hadSeqSource->tieBack(
u, seqprop_header, seqprop, gamma_insertion);
366 Complex twopt_sink = hadSeqSource->twoPtSink(
u,
forward_headers, forward_props, gamma_insertion);
369 push(xml_out,
"LoopBackTest");
371 write(xml_out,
"gamma_insertion", gamma_insertion);
377 write(xml_out,
"source_value", source_value);
378 write(xml_out,
"twopt_sink", twopt_sink);
379 write(xml_out,
"diff", Complex(source_value - twopt_sink));
380 write(xml_out,
"norm2_source_value", norm2(source_value));
381 write(xml_out,
"norm2_twopt_sink", norm2(twopt_sink));
382 write(xml_out,
"norm2_diff", norm2(source_value - twopt_sink));
388 QDPIO::cerr <<
name <<
": Caught Exception in sink: " << e << std::endl;
396 QDPIO::cout <<
name <<
": total time = "
397 << snoop.getTimeInSeconds()
398 <<
" secs" << std::endl;
400 QDPIO::cout <<
name <<
": ran successfully" << std::endl;
Inline measurement factory.
Class for counted reference semantics.
Inline test of sequential propagators.
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
void func(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
Fourier transform phase factor support.
const Set & getSet() const
The set to be used in sumMulti.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams ¶m)
Read parameters.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams ¶m)
Writer parameters.
void proginfo(XMLWriter &xml)
Print out basic information about this program.
std::string makeXMLFileName(std::string xml_file, unsigned long update_no)
Return a xml file name for inline measurements.
Class for counted reference semantics.
Test sequential propagator.
Named object function std::map.
static bool registered
Local registration flag.
bool registerAll()
Register all the factories.
bool registerAll()
Register all the factories.
bool registerAll()
Register all the factories.
multi1d< ForwardProp_t > & forward_headers
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
Print out basic info about this program.
All sequential source constructors.
Factory for producing quark prop sinks.
Fourier transform phase factor support.
Factory for producing quark smearing objects.
multi1d< std::string > sink_ids
struct Chroma::InlineSeqPropTestEnv::Params::NamedObject_t named_obj
void writeXML(XMLWriter &xml_out, const std::string &path)
PropSourceSmear_t smear_header
Mega structure holding a full sequential prop.
multi1d< ForwardProp_t > forward_props
SeqSource_t seqsource_header