22 namespace InlinePropagatorEnv
56 XMLReader inputtop(xml, path);
83 XMLReader paramtop(xml_in, path);
85 if (paramtop.count(
"Frequency") == 1)
97 if (paramtop.count(
"xml_file") != 0)
104 QDPIO::cerr << __func__ <<
": Caught Exception reading XML: " << e << std::endl;
132 push(xml_out,
"propagator");
133 write(xml_out,
"update_no", update_no);
134 write(xml_out,
"xml_file", xml_file);
137 XMLFileWriter xml(xml_file);
138 func(update_no, xml);
142 func(update_no, xml_out);
161 XMLBufferWriter gauge_xml;
167 catch( std::bad_cast )
179 const multi1d<LatticeColorMatrix>&
u =
182 push(xml_out,
"propagator");
183 write(xml_out,
"update_no", update_no);
191 write(xml_out,
"Config_info", gauge_xml);
193 push(xml_out,
"Output_version");
194 write(xml_out,
"out_version", 1);
198 MesPlq(xml_out,
"Observables",
u);
203 XMLReader source_file_xml, source_record_xml;
212 bool make_sourceP =
false;
213 bool seqsourceP =
false;
215 QDPIO::cout <<
"Snarf the source from a named buffer" << std::endl;
219 LatticePropagator& source_tmp =
228 if (source_record_xml.count(
"/MakeSource") != 0)
232 read(source_record_xml,
"/MakeSource", orig_header);
237 else if (source_record_xml.count(
"/SequentialSource") != 0)
241 read(source_record_xml,
"/SequentialSource", orig_header);
252 write(xml_out,
"Source_file_info", source_file_xml);
253 write(xml_out,
"Source_record_info", source_record_xml);
255 catch (std::bad_cast)
268 const LatticePropagator& quark_prop_source =
271 QDPIO::cout <<
"Source successfully read and parsed" << std::endl;
279 multi1d<Double> source_corr = sumMulti(localNorm2(quark_prop_source),
282 push(xml_out,
"Source_correlator");
283 write(xml_out,
"source_corr", source_corr);
297 catch (std::bad_cast)
310 LatticePropagator& quark_propagator =
318 XMLReader fermacttop(xml_s);
325 bool success =
false;
333 QDPIO::cout <<
"Try the various factories" << std::endl;
336 typedef LatticeFermion
T;
337 typedef multi1d<LatticeColorMatrix>
P;
338 typedef multi1d<LatticeColorMatrix>
Q;
348 QDPIO::cout <<
"Suitable factory found: compute the quark prop" << std::endl;
351 QDPIO::cout <<
"Calling quarkProp" << std::endl;
352 S_f->quarkProp(quark_propagator,
362 QDPIO::cout <<
"Propagator computed: time= "
363 << swatch.getTimeInSeconds()
364 <<
" secs" << std::endl;
377 QDPIO::cerr <<
"Error: no fermact found" << std::endl;
382 push(xml_out,
"Relaxation_Iterations");
383 write(xml_out,
"ncg_had", ncg_had);
391 multi1d<Double> prop_corr = sumMulti(localNorm2(quark_propagator),
394 push(xml_out,
"Prop_correlator");
395 write(xml_out,
"prop_corr", prop_corr);
403 QDPIO::cout <<
"Start writing propagator info" << std::endl;
405 XMLBufferWriter file_xml;
406 push(file_xml,
"propagator");
410 XMLBufferWriter record_xml;
414 read(source_record_xml,
"/MakeSource", orig_header);
420 write(record_xml,
"Propagator", new_header);
425 read(source_record_xml,
"/SequentialSource", orig_header);
433 write(record_xml,
"SequentialProp", new_header);
440 QDPIO::cout <<
"Propagator successfully updated" << std::endl;
442 catch (std::bad_cast)
458 << snoop.getTimeInSeconds()
459 <<
" secs" << std::endl;
Inline measurement factory.
Class for counted reference semantics.
Inline propagator calculation.
void func(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
InlinePropagatorParams params
Fourier transform phase factor support.
const Set & getSet() const
The set to be used in sumMulti.
Class structure for fermion actions.
Fermion action factories.
All Wilson-type fermion actions.
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.
std::string uniqueId()
Return a unique id.
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.
Inline construction of propagator.
Named object function std::map.
static bool registered
Local registration flag.
multi1d< LatticeColorMatrix > P
bool registerAll()
Register all the factories.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
LinOpSysSolverMGProtoClover::Q Q
push(xml_out,"Condensates")
LinOpSysSolverMGProtoClover::T T
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
const WilsonTypeFermAct< multi1d< LatticeFermion > > & S_f
Print out basic info about this program.
Fourier transform phase factor support.
QuarkSpinType quarkSpinType
void writeXML(XMLWriter &xml_out, const std::string &path)
struct Chroma::InlinePropagatorParams::NamedObject_t named_obj
Mega structure holding a propagator source.
PropSourceConst_t source_header
Mega structure holding a full forward prop (not sink smeared)
PropSourceConst_t source_header
Mega structure holding a full sequential prop.
ChromaProp_t seqprop_header
PropSinkSmear_t sink_header
multi1d< ForwardProp_t > forward_props
SeqSource_t seqsource_header
Mega structure holding a full sequential source.
PropSinkSmear_t sink_header
multi1d< ForwardProp_t > forward_props
SeqSource_t seqsource_header