25 read(xml, path, prop_type_str);
26 if (prop_type_str ==
"PROPAGATOR")
28 else if (prop_type_str ==
"SOURCE")
30 else if (prop_type_str ==
"SEQSOURCE")
32 else if (prop_type_str ==
"SEQPROP")
36 QDPIO::cerr <<
"Unsupported propagator type" << std::endl;
57 QDP_volfmt_t prop_out_volfmt;
73 XMLReader inputtop(xml, path);
82 if (inputtop.count(
"scidac_prop_type") != 0)
90 XMLReader paramtop(xml, path);
93 read(paramtop,
"version", version);
105 QDPIO::cerr <<
"Input parameter version " << version <<
" unsupported." << std::endl;
117 XMLReader inputtop(xml, path);
130 QDPIO::cerr <<
"Error reading qproptransf data: " << e << std::endl;
143 int main(
int argc,
char *argv[])
157 read(xml_in,
"/qproptransf", input);
163 QDPIO::cout <<
"QPROPTRANSF: propagator transformation utility" << std::endl;
166 push(xml_out,
"qproptransf");
170 write(xml_out,
"input", xml_in);
176 XMLReader prop_in_xml, prop_in_file_xml;
177 LatticePropagator
prop;
183 push(xml_out,
"SZIN_propagator");
189 write(xml_out,
"propagator_info", prop_in_xml);
195 push(xml_out,
"SciDAC_propagator");
202 write(xml_out,
"File_xml", prop_in_file_xml);
203 write(xml_out,
"Record_xml", prop_in_xml);
209 push(xml_out,
"KYU_propagator");
228 multi1d<Double> prop_corr = sumMulti(localNorm2(
prop),
231 push(xml_out,
"Prop_correlator");
232 write(xml_out,
"prop_corr", prop_corr);
246 Real Kappa(3.14159265359);
248 push(xml_out,
"SZIN_propagator");
270 propHeaderTag =
"MakeSource";
271 fileHeaderTag =
"make_source";
277 propHeaderTag =
"Propagator";
278 fileHeaderTag =
"propagator";
284 propHeaderTag =
"SequentialSource";
285 fileHeaderTag =
"seqsource";
291 propHeaderTag =
"SequentialProp";
292 fileHeaderTag =
"seqprop";
297 QDPIO::cerr <<
"Unknown SciDAC prop type" << std::endl;
306 QDPIO::cout <<
"Read " << propHeaderTag << std::endl;
310 XMLReader header_xml(xml_in,
"/qproptransf/" + propHeaderTag);
311 std::ostringstream header_os;
312 header_xml.print(header_os);
313 header = header_os.str();
317 QDPIO::cerr <<
"Error extracting " << propHeaderTag <<
": " << e << std::endl;
321 QDPIO::cout <<
"Header = " << header << std::endl;
324 XMLBufferWriter prop_out_file_xml;
325 push(prop_out_file_xml, fileHeaderTag);
327 write(prop_out_file_xml,
"id",
id);
328 pop(prop_out_file_xml);
330 std::istringstream header_is(header);
331 XMLReader xml_header(header_is);
332 XMLBufferWriter prop_out_record_xml;
335 QDPIO::cout <<
"std::string out header" << std::endl;
336 prop_out_record_xml << xml_header;
337 QDPIO::cout <<
"std::string out header done" << std::endl;
348 QDPIO::cerr <<
"unknown output type = " << input.
prop.
prop_out_type << std::endl;
Primary include file for CHROMA in application codes.
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.
void readSzinQprop(XMLReader &xml, LatticePropagator &q, const std::string &file)
Read a SZIN propagator file. This is a simple memory dump reader.
void writeSzinQprop(const LatticePropagator &q, const std::string &file, const Real kappa)
Write a SZIN propagator file. This is a simple memory dump writer.
void readKYUQprop(LatticePropagator &q, const std::string &file)
Read a Kentucky quark propagator.
std::map< std::string, SinkPropContainer_t > prop
Asqtad Staggered-Dirac operator.
QDP_error_exit("too many BiCG iterations", n_count, rsd_sq, cp, c, re_rvr, im_rvr, re_a, im_a, re_b, im_b)
push(xml_out,"Condensates")
void initialize(int *argc, char ***argv)
Chroma initialisation routine.
void finalize(void)
Chroma finalization routine.
void readQprop(XMLReader &file_xml, XMLReader &record_xml, LatticePropagator &quark_prop, const std::string &file, QDP_serialparallel_t serpar)
Read a Chroma propagator.
void writeQprop(XMLBufferWriter &file_xml, XMLBufferWriter &record_xml, const LatticePropagator &quark_prop, const std::string &file, QDP_volfmt_t volfmt, QDP_serialparallel_t serpar)
Write a Chroma propagator.
std::string getXMLInputFileName()
Get input file name.
XMLFileWriter & getXMLOutputInstance()
Get xml output instance.
int main(int argc, char *argv[])
SciDACPropType
Propagator type.
Parameters for running program.
std::string prop_out_file
QDP_volfmt_t prop_out_volfmt
SciDACPropType scidac_prop_type