CHROMA
proginfo.cc
Go to the documentation of this file.
1 // $Id: proginfo.cc,v 3.2 2008-05-30 18:53:11 edwards Exp $
2 /*! \file
3  * \brief Print out basic info about this program
4  */
5 
6 #include "chroma_config.h"
7 #include "chromabase.h"
8 #include "util/info/printgeom.h"
9 #include "util/info/proginfo.h"
10 #include <ctime>
11 
12 
13 namespace Chroma
14 {
15 
16  //! Print out basic information about this program
17  /*!
18  * \ingroup info
19  *
20  *
21  * \param xml The XML stream to which to write the information.
22  */
23 
24  void proginfo(XMLWriter& xml)
25  {
26  START_CODE();
27 
28  push(xml,"ProgramInfo");
29 
30  push(xml,"code_version");
31  write(xml, "chroma", CHROMA_PACKAGE_VERSION);
32  write(xml, "qdp", QDP_PACKAGE_VERSION);
33  write(xml, "basePrecision", BASE_PRECISION);
34  pop(xml);
35 
36  std::time_t now;
37 
38  if(std::time(&now)==-1)
39  {
40  QDPIO::cerr<<"proginfo: Cannot get the time.\n";
41  return;
42  }
43  std::tm *tp = std::localtime(&now);
44 
45  char date[64];
46  std::strftime(date, 63, "%d %b %y %X %Z", tp);
47  write(xml,"run_date", date);
48 
49  printgeom(xml);
50  pop(xml);
51 
52  END_CODE();
53  }
54 
55 } // end namespace Chroma
static const char *const CHROMA_PACKAGE_VERSION(PACKAGE_VERSION)
Primary include file for CHROMA library code.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
void printgeom(XMLWriter &xml)
Print out machine geometry and problem size info.
Definition: printgeom.cc:20
void proginfo(XMLWriter &xml)
Print out basic information about this program.
Definition: proginfo.cc:24
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
push(xml_out,"Condensates")
pop(xml_out)
START_CODE()
Print out machine geometry and problem size info.
Print out basic info about this program.