CHROMA
t_ovlap_double_pass.cc
Go to the documentation of this file.
1 
2 #include <iostream>
3 #include <sstream>
4 #include <iomanip>
5 #include <string>
6 
7 #include <cstdio>
8 
9 #include <stdlib.h>
10 #include <sys/time.h>
11 #include <math.h>
12 
13 #include "chroma.h"
14 //#include "state.h"
15 //#include "actions/ferm/linop/lovlapms_w.h"
16 //#include "actions/ferm/fermacts/zolotarev_state.h"
17 //#include "actions/ferm/fermacts/zolotarev4d_fermact_bj_w.h"
18 //#include "actions/ferm/linop/lovlapms_w.h"
19 //#include "meas/eig/eig_w.h"
20 //#include "meas/hadron/srcfil.h"
21 //#include "actions/ferm/invert/invcg1.h"
22 //#include "util/ft/sftmom.h"
23 
24 using namespace Chroma;
25 
28 
29 
30 
31 // Struct for test parameters
32 //
33 typedef struct {
34  multi1d<int> nrow;
35  multi1d<int> boundary;
36  multi1d<int> rng_seed;
37  multi1d<Real> lambda;
38  Real lambda_max;
39  bool szin_eig;
40  int gauge_start_type;
41  int gauge_file_format;
42  std::string gauge_filename;
43 
44  Real wilson_mass;
45  Real quark_mass;
46  int approx_order;
47  double approx_min;
48  double approx_max;
49  Real rsd_cg;
50  Real rsd_cg_inner;
51 
52  int max_cg;
53  int max_cg_inner;
54  multi1d<Real> szin_pion;
55 
56 } Param_t;
57 
58 
59 // Declare routine to read the parameters
60 void readParams(const std::string& filename, Param_t& params)
61 {
62  XMLReader reader(filename);
63 
64  try {
65  // Read Params
66  read(reader, "/params/lattice/nrow", params.nrow);
67  read(reader, "/params/lattice/boundary", params.boundary);
68  read(reader, "/params/RNG/seed", params.rng_seed);
69  read(reader, "/params/zolotarev/wilsonMass", params.wilson_mass);
70 
71  // Read EigenValues:
72  //
73 
74  if ( reader.count("/params/SZINEValues") > 0 ) {
75 
76  // SZIN EValues
77  read(reader, "/params/SZINEValues/lambda", params.lambda);
78  read(reader, "/params/SZINEValues/lambdaMax", params.lambda_max);
79  for(int i=0; i < params.lambda.size(); i++) {
80  params.lambda[i] *= Real(Nd) + params.wilson_mass;
81  }
82  params.lambda_max *= Real(Nd) + params.wilson_mass;
83  params.szin_eig = true;
84  }
85  else if ( reader.count("/params/eValues") > 0 ) {
86 
87  // Chroma EValues
88  read(reader, "/params/eValues/lambda", params.lambda);
89  read(reader, "/params/eValues/lambdaMax", params.lambda_max);
90  params.szin_eig = false;
91  }
92  else {
93 
94  // No EValues
95  params.lambda.resize(0);
96  params.szin_eig = false;
97  }
98 
99  read(reader, "/params/Cfg/startType", params.gauge_start_type);
100  if( params.gauge_start_type == FILE_START ) {
101  read(reader, "/params/Cfg/gaugeFilename", params.gauge_filename);
102  read(reader, "/params/Cfg/gaugeFileFormat", params.gauge_file_format);
103  }
104 
105 
106  read(reader, "/params/zolotarev/approxOrder", params.approx_order);
107 
108  if( reader.count("/params/zolotarev/approxMin") == 1 ) {
109  read(reader, "/params/zolotarev/approxMin", params.approx_min);
110  }
111  else {
112  params.approx_min = -1;
113  }
114 
115  if( reader.count("/params/zolotarev/approxMax") == 1 ) {
116  read(reader, "/params/zolotarev/approxMax", params.approx_max);
117  } else {
118  params.approx_max = -1;
119  }
120 
121 
122  read(reader, "/params/zolotarev/quarkMass", params.quark_mass);
123  read(reader, "/params/zolotarev/RsdCG", params.rsd_cg_inner);
124  read(reader, "/params/zolotarev/MaxCG", params.max_cg_inner);
125 
126  read(reader, "/params/qprop/RsdCG", params.rsd_cg);
127  read(reader, "/params/qprop/MaxCG", params.max_cg);
128 
129 
130  if( reader.count("/params/checking/szinPion") == 1 ) {
131  read(reader, "/params/checking/szinPion", params.szin_pion);
132  if( params.szin_pion.size() != params.nrow[3] ) {
133  QDP_error_exit("Comparison pion has wrong no of timeslices. Nrow[3] = %d szin_pion.size() = %d", params.nrow[3], params.szin_pion.size());
134  }
135 
136  }
137  else {
138  params.szin_pion.resize(0);
139  }
140 
141  }
142  catch(const std::string& e) {
143  throw e;
144  }
145 }
146 
147 void dumpParams(XMLWriter& writer, Param_t& params)
148 {
149  push(writer, "params");
150  push(writer, "lattice");
151  write(writer, "nrow", params.nrow);
152  write(writer, "boundary", params.boundary);
153  pop(writer); // lattice
154  push(writer, "RNG");
155  write(writer, "seed", params.rng_seed);
156  pop(writer); // RNG
157 
158  if( params.lambda.size() > 0 ) {
159  if ( params.szin_eig ) {
160 
161  push(writer, "eValues");
162  write(writer, "lambda", params.lambda);
163  write(writer, "lambdaMax", params.lambda_max);
164  pop(writer); // eValues
165 
166  push(writer, "SZINEValues");
167  multi1d<Real> szin_lambda(params.lambda);
168  Real szin_lambda_max = params.lambda_max;
169 
170  for(int i = 0; i < params.lambda.size(); i++) {
171  szin_lambda[i] /= (Real(Nd) + params.wilson_mass);
172  }
173  szin_lambda_max /= (Real(Nd) + params.wilson_mass);
174 
175  write(writer, "lambda", szin_lambda);
176  write(writer, "lambdaMax", szin_lambda_max);
177  pop(writer); // SZINEValues
178  }
179  else {
180  push(writer, "eValues");
181  write(writer, "lambda", params.lambda);
182  write(writer, "lambdaMax", params.lambda_max);
183  pop(writer); // eValues
184  }
185  }
186  push(writer, "Cfg");
187  write(writer, "startType", params.gauge_start_type);
188  if( params.gauge_start_type == FILE_START ) {
189  write(writer, "gaugeFileFormat", params.gauge_file_format);
190  write(writer, "gaugeFilename", params.gauge_filename);
191  }
192  pop(writer); // Cfg
193 
194  push(writer, "zolotarev");
195  write(writer, "approxOrder", params.approx_order);
196  if( params.approx_min > 0 ) {
197  write(writer, "approxMin", params.approx_min);
198  }
199 
200  if( params.approx_max > 0 ) {
201  write(writer, "approxMax", params.approx_max);
202  }
203 
204  write(writer, "wilsonMass", params.wilson_mass);
205  write(writer, "quarkMass", params.quark_mass);
206  write(writer, "RsdCG", params.rsd_cg_inner);
207  write(writer, "MaxCG", params.max_cg_inner);
208  pop(writer); // zolotarev
209 
210  push(writer, "qprop");
211  write(writer, "RsdCG", params.rsd_cg);
212  write(writer, "MaxCG", params.max_cg);
213  pop(writer);
214 
215  if( params.szin_pion.size() > 0 ) {
216  push(writer, "checking");
217  write(writer, "szinPion", params.szin_pion);
218  pop(writer);
219  }
220 
221  pop(writer); // params
222 }
223 
224 //! Read in the old SZIN eigenvectors.
225 // Not only do we read the eigenvectors but we also check them
226 // by computing the norm:
227 //
228 // || gamma_5 D_wils e_i - lambda_i e_i ||
229 //
230 // Since D_wils = (Nd + m_wils) D_wils_szin, we expect this
231 // norm to be
232 //
233 // (Nd + m_wils) || gamma_5 D_wils_szin e_i - lambda_i e_i ||
234 //
235 // We also compute the old SZIN norm:
236 //
237 // || gamma_5 D_wils_szin e_i - lambda_i e_i ||
238 //
239 // by dividing our original eigen nom by (Nd + m_wils)
240 //
241 // This latter norm can be checked against SZIN NMLDAT files.
242 //
243 void readEigenVecs(const multi1d<LatticeColorMatrix>& u,
244  const UnprecWilsonFermAct& S_aux,
245  const multi1d<Real>& lambda_lo,
246  multi1d<LatticeFermion>& eigen_vec,
247  const Real wilson_mass,
248  const bool szin_eig,
249  XMLWriter& xml_out,
250  const std::string& root_prefix)
251 {
252 
253 
254  // Create a connect State
255  // This is where the boundary conditions are applied.
256 
259 
260 
261  // Create Space for the eigen vecs
262  eigen_vec.resize(lambda_lo.size());
263 
264  // Create Space for the eigenstd::vector norms
265  multi1d<Real> e_norms(lambda_lo.size());
266  multi1d<Real> evec_norms(lambda_lo.size());
267 
268  for(int i = 0; i < lambda_lo.size(); i++) {
269 
270  // Make up the filename
271  std::ostringstream filename;
272 
273  // this will produce eigenvector_XXX
274  // where XXX is a 0 padded integer -- eg 001, 002, 010 etc
275  filename << root_prefix << "eigenvector_" << std::setw(3) << std::setfill('0') << i;
276 
277 
278  std::cout << "Reading eigenstd::vector: " << filename.str() << std::endl;
279  readSzinFerm(eigen_vec[i], filename.str());
280 
281  // Check e-vectors are normalized
282  evec_norms[i] = (Real)sqrt(norm2(eigen_vec[i]));
283 
284  // Check the norm || Gamma_5 D e_v - lambda
285  LatticeFermion D_ev, tmp_ev, lambda_e;
286 
287  // D_ew = D ev(i)
288  (*D_w)(tmp_ev, eigen_vec[i], PLUS);
289 
290  D_ev = Gamma(15)*tmp_ev;
291 
292  // Lambda_e
293  lambda_e = lambda_lo[i]*eigen_vec[i];
294 
295  D_ev -= lambda_e;
296 
297  e_norms[i] = (Real)sqrt(norm2(D_ev));
298  }
299  push(xml_out, "Eigenstd::vectorTest");
300  push(xml_out, "EigenVecNorms");
301  write(xml_out, "evec_norms", evec_norms);
302  pop(xml_out);
303  push(xml_out, "EigenTestNorms");
304  write(xml_out, "e_norms", e_norms);
305  pop(xml_out);
306 
307  if( szin_eig ) {
308  multi1d<Real> szin_enorms(e_norms);
309  for(int i=0; i < lambda_lo.size(); i++) {
310  szin_enorms[i] /= (Real(Nd)+wilson_mass);
311  }
312  push(xml_out, "SZINEigenTestNorms");
313  write(xml_out, "szin_enorms",szin_enorms);
314  pop(xml_out);
315  }
316  pop(xml_out); // eigenstd::vector test
317 }
318 
319 int main(int argc, char **argv)
320 {
321  // Put the machine into a known state
322  Chroma::initialize(&argc, &argv);
323 
324  std::string root_prefix="";
325 
326  if( argc == 2 ) {
327  root_prefix += argv[1];
328  root_prefix += "/";
329  }
330 
331  // Read the parameters
332  Param_t params;
333 
334  try {
335  readParams(root_prefix+"DATA", params);
336  }
337  catch(const std::string& s) {
338  QDPIO::cerr << "Caught exception " << s << std::endl;
339  exit(1);
340  }
341 
342 
343  // Setup the lattice
344  Layout::setLattSize(params.nrow);
345  Layout::create();
346 
347  // Write out the params
348  XMLFileWriter xml_out(root_prefix+"t_ovlap_double_pass.xml");
349  push(xml_out, "overlapTest");
350 
351  dumpParams(xml_out, params);
352 
353 
354  // Create a FermBC
356 
357  // The Gauge Field
358  multi1d<LatticeColorMatrix> u(Nd);
359 
360  switch ((GaugeStartType)params.gauge_start_type) {
361  case COLD_START:
362  for(int j = 0; j < Nd; j++) {
363  u(j) = Real(1);
364  }
365  break;
366  case HOT_START:
367  // Hot (disordered) start
368  for(int j=0; j < Nd; j++) {
369  random(u(j));
370  reunit(u(j));
371  }
372  break;
373  case FILE_START:
374 
375  // Start from File
376  switch( (GaugeFormat)params.gauge_file_format) {
377  case SZIN_GAUGE_FORMAT:
378  {
379  XMLReader szin_xml;
380  readSzin(szin_xml, u, params.gauge_filename);
381  try {
382  push(xml_out, "GaugeInfo");
383  xml_out << szin_xml;
384  pop(xml_out);
385 
386  }
387  catch(const std::string& e) {
388  std::cerr << "Error: " << e << std::endl;
389  }
390 
391  }
392  break;
393 
394  case NERSC_GAUGE_FORMAT:
395  {
396  XMLReader nersc_xml;
397  readArchiv(nersc_xml, u, params.gauge_filename);
398 
399  try {
400  push(xml_out, "GaugeInfo");
401  xml_out << nersc_xml;
402  pop(xml_out);
403 
404  }
405  catch(const std::string& e) {
406  std::cerr << "Error: " << e << std::endl;
407  }
408  }
409  break;
410 
411  default:
412  std::ostringstream file_read_error;
413  file_read_error << "Unknown gauge file format" << params.gauge_file_format ;
414  throw file_read_error.str();
415  }
416  break;
417  default:
418  std::ostringstream startup_error;
419  startup_error << "Unknown start type " << params.gauge_start_type <<std::endl;
420  throw startup_error.str();
421  }
422 
423 
424  // Measure the plaquette on the gauge
425  MesPlq(xml_out, "Observables", u);
426  xml_out.flush();
427 
428  //! Wilsoniums;
429  // Put this puppy into a handle to allow Zolo to copy it around as a **BASE** class
430  // WARNING: the handle now owns the data. The use of a bare S_w below is legal,
431  // but just don't delete it.
433 
434 
435  XMLBufferWriter my_writer;
436 
437  //! N order Zolo approx, with wilson action.
438  Zolotarev4DFermAct S(fbc, S_w,
439  params.quark_mass,
440  params.approx_order,
441  params.rsd_cg_inner,
442  params.max_cg_inner,
443  my_writer,
444  10,
446 
447 
448  const ConnectState* connect_state_ptr;
449  multi1d<LatticeFermion> eigen_vecs;
450 
451 
452  // Flick on BC's - do not do this. Now let it be down in createState
453 // phfctr(u);
454 
455  if( params.lambda.size() == 0 ) {
456 
457  // Connect State with no eigenvectors
458  connect_state_ptr = S.createState(u,
459  Real(params.approx_min),
460  Real(params.approx_max));
461  }
462  else {
463 
464  // Connect State with eigenvectors
465  if( params.szin_eig ) {
466  readEigenVecs(u,
467  dynamic_cast<UnprecWilsonFermAct&>(*S_w),
468  params.lambda,
469  eigen_vecs,
470  params.wilson_mass,
471  params.szin_eig,
472  xml_out,
473  root_prefix);
474  }
475  else {
476  QDP_error_exit("Non SZIN e-values not yet implmeneted");
477  }
478 
479  connect_state_ptr = S.createState(u,
480  params.lambda,
481  eigen_vecs,
482  params.lambda_max);
483  }
484 
485 
486  // Stuff the pointer into a handle. Now, the handle owns the data.
487  Handle<const ConnectState> connect_state(connect_state_ptr);
488 
489 
490  // Make me a linop (this callls the initialise function)
491  Handle<const LinearOperator<LatticeFermion> > D_op(S.linOp(connect_state));
492 
493 
494  // Check GW Relation.
495  //
496  // In massless case GWR is: D^{dag}(0) + D(0) = 2 D^{dag}(0) D(0)
497  //
498  // To derive for arbitrary mass case, use D(m) = m + (1-m)D(0)
499  // => D(0) = (1/m)[ D(m) - m ]
500  //
501  //
502  // LHS is: (1/(1-m)) [ D(m) + D^{dag}(m) - 2m ]
503  // = (1/(1-m)) [ D(m) + D^{dag}(m) ] - 2m/(1-m)
504  //
505  // RHS is: (2/(1-m)^2) [ D^{dag}(m)D(m) - mD(m) - mD^{dag}(m) + m^2 ]
506  // =(1/(1-m)^2) [ 2D^{dag}(m)D(m) -2m(D(m) + D^{dag}(m)) + 2 m^2 ]
507  //
508  // Multiply both sides by (1-m)^2
509  //
510  // LHS is: (1 - m)[D(m) + D^{dag}(m) ] - 2m(1-m)
511  // = (1 - m)[D(m) + D^{dag}(m} ] - 2m + 2m^2
512  //
513  // RHS is: 2D^{dag}(m)D(m) - 2m(D(m) + D^{dag}(m)) + 2 m^2
514  //
515  // Add 2m( D(m) + D^{dag}(m) - 2m^2 to both sides:
516  //
517  // LHS is: (1 + m)[ D(m) + D^{dag}(m) ] - 2m
518  // RHS is: 2D^{dag}(m) D(m)
519  //
520  //
521  // Divide both sides by 2 to get a massive version of the GWR:
522  //
523  // ***********************************************************
524  //
525  // ((1 + m)/2) [ D(m) + D^{dag}(m) ] - m = D^{dag}(m)D(m)
526  //
527  // ***********************************************************
528  //
529  // This is what we check.
530 
531  LatticeFermion psi;
532 
533  // Create some source with unit norm
534  gaussian(psi);
535  Double n2 = sqrt(norm2(psi));
536  psi /= n2;
537 
538 
539  LatticeFermion s1, s2, s3, tmp2;
540  s1 = s2 = s3 = tmp2 = zero;
541 
542 #if 0
543  (*D_op)(s1,psi,PLUS); // s1 = D(m) psi
544  (*D_op)(s2,psi,MINUS); // s2 = D^{dag}(m) psi
545 
546  (*D_op)(tmp2, psi, PLUS); // s3 = D^{dag}(m) D(m) psi
547  (*D_op)(s3, tmp2, MINUS); // = RHS psi
548 
549  tmp2 = s1 + s2; // tmp2 = [ D(m) + D^{dag}(m) ] psi
550 
551 
552  // tmp2 = (1 + m) [ D(m) + D^{dag}(m) ] psi
553  tmp2 *= ( Real(1) + params.quark_mass )/Real(2);
554 
555  // tmp2 = (1 + m ) [ D(m) + D^{dag}(m) - m ] psi = LHS psi
556  tmp2 -= params.quark_mass * psi;
557 
558  // RHS - LHS
559  s3 -= tmp2;
560 
561  // Should be zero
562  Double gwr_norm = sqrt(norm2(s3));
563  std::cout << "GWR Norm: " << gwr_norm << std::endl;
564  write(xml_out, "gwr_norm", gwr_norm);
565 
566 #endif
567 
568  //! N order Zolo approx, with wilson action.
569  Zolotarev4DFermAct S_dp(fbc, S_w,
570  params.quark_mass,
571  params.approx_order,
572  params.rsd_cg_inner,
573  params.max_cg_inner,
574  my_writer,
575  10,
577 
578  // Make me a linop (this callls the initialise function)
579  Handle<const LinearOperator<LatticeFermion> > D_dp(S_dp.linOp(connect_state));
580 
581  LatticeFermion psi_dp;
582 
583  QDP::StopWatch swatch;
584 
585  swatch.reset();
586  swatch.start();
587  // Apply single pass
588  (*D_op)(s1, psi, PLUS);
589  swatch.stop();
590  Double t1 = swatch.getTimeInSeconds();
591  QDPIO::cout << "Single Pass algorithm took " << t1 << " seconds" << std::endl;
592  // Apply double pass
593 
594  swatch.reset();
595  swatch.start();
596  (*D_dp)(s2, psi, PLUS);
597  swatch.stop();
598  t1 = swatch.getTimeInSeconds();
599  QDPIO::cout << "Double Pass algorithm took " << t1 << " seconds" << std::endl;
600  // Get the difference
601  s3 = s2 - s1;
602 
603  Double diff = norm2(s3);
604 
605  QDPIO::cout << "Diff between single and double passes = " << sqrt(diff) << std::endl;
606 
607 
608  // Now do a chiral D^{dag} D
609  int G5=Ns*Ns-1;
610  gaussian(psi);
611 
612  // Project onto positive chirality
613  // psi <- (1/2) ( 1 + gamma_5 ) psi
614  psi_dp = Gamma(G5)*psi;
615  psi += psi_dp;
616  psi *= 0.5;
617 
618  // Normalise
619  Double norm_psi=sqrt(norm2(psi));
620  psi /= Real(norm_psi);
621 
622 
624  MdagM_ch( S.lMdagM(connect_state, isChiralVector(psi)) );
625 
627  MdagM_ch_dp( S_dp.lMdagM(connect_state, isChiralVector(psi)) );
628 
629  swatch.reset();
630  swatch.start();
631  (*MdagM_ch)(s1, psi, PLUS);
632  swatch.stop();
633  t1 = swatch.getTimeInSeconds();
634  QDPIO::cout << "Single Pass algorithm took " << t1 << " seconds" << std::endl;
635 
636 
637  swatch.reset();
638  swatch.start();
639  (*MdagM_ch_dp)(s2, psi, PLUS);
640  swatch.stop();
641  t1 = swatch.getTimeInSeconds();
642  QDPIO::cout << "Double Pass algorithm took " << t1 << " seconds" << std::endl;
643 
644  s3 = s1 - s2;
645 
646  diff = norm2(s3);
647 
648  QDPIO::cout << "Diff between single and double passes = " << sqrt(diff) << std::endl;
649 
650 
651  gaussian(psi);
652 
653  // Project onto positive chirality
654  // psi <- (1/2) ( 1 + gamma_5 ) psi
655  psi_dp = Gamma(G5)*psi;
656  psi -= psi_dp;
657  psi *= 0.5;
658 
659  // Normalise
660  norm_psi=sqrt(norm2(psi));
661  psi /= Real(norm_psi);
662 
664  MdagM_ch2( S.lMdagM(connect_state, isChiralVector(psi)) );
665 
667  MdagM_ch2_dp( S_dp.lMdagM(connect_state, isChiralVector(psi)) );
668 
669  swatch.reset();
670  swatch.start();
671  (*MdagM_ch2)(s1, psi, PLUS);
672  swatch.stop();
673  t1 = swatch.getTimeInSeconds();
674  QDPIO::cout << "Single Pass algorithm took " << t1 << " seconds" << std::endl;
675 
676 
677  swatch.reset();
678  swatch.start();
679  (*MdagM_ch2_dp)(s2, psi, PLUS);
680  swatch.stop();
681  t1 = swatch.getTimeInSeconds();
682  QDPIO::cout << "Double Pass algorithm took " << t1 << " seconds" << std::endl;
683 
684  s3 = s1 - s2;
685 
686  diff = norm2(s3);
687 
688  QDPIO::cout << "Diff between single and double passes = " << sqrt(diff) << std::endl;
689 
690 
691  pop(xml_out);
693 
694  exit(0);
695 }
Primary include file for CHROMA in application codes.
Support class for fermion actions and linear operators.
Definition: state.h:28
virtual FermState< T, P, Q > * createState(const Q &q) const
Given links (coordinates Q) create the state needed for the linear operators.
Definition: fermact.h:59
Class for counted reference semantics.
Definition: handle.h:33
Concrete class for all gauge actions with simple boundary conditions.
Definition: simple_fermbc.h:42
Unpreconditioned Wilson fermion action.
UnprecLinearOperator< T, P, Q > * linOp(Handle< FermState< T, P, Q > > state) const
Produce a linear operator for this action.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
void readSzinFerm(LatticeFermion &q, const std::string &file)
Read a SZIN fermion. This is a simple memory dump reader.
void readSzin(SzinGauge_t &header, multi1d< LatticeColorMatrix > &u, const std::string &cfg_file)
Read a SZIN configuration file.
Definition: readszin.cc:31
Params params
unsigned j
Definition: ldumul_w.cc:35
Nd
Definition: meslate.cc:74
Double tmp2
Definition: mesq.cc:30
Handle< FermBC< LatticeStaggeredFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > reader(XMLReader &xml_in, const std::string &path)
Helper function for the FermionAction readers.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
gaussian(aux)
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)
int G5
Definition: pbg5p_w.cc:57
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
int i
Definition: pbg5p_w.cc:55
void initialize(int *argc, char ***argv)
Chroma initialisation routine.
Definition: chroma_init.cc:114
@ MINUS
Definition: chromabase.h:45
@ PLUS
Definition: chromabase.h:45
void finalize(void)
Chroma finalization routine.
Definition: chroma_init.cc:308
Chirality isChiralVector(const LatticeFermion &chi)
Definition: ischiral_w.cc:6
void reunit(LatticeColorMatrixF3 &xa)
Definition: reunit.cc:467
LatticeFermion psi
Definition: mespbg5p_w.cc:35
pop(xml_out)
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
Definition: mesplq.cc:83
Double zero
Definition: invbicg.cc:106
multi1d< LatticeFermion > s(Ncb)
FloatingPoint< double > Double
Definition: gtest.h:7351
::std::string string
Definition: gtest.h:1979
Parameters for running program.
Definition: qpropadd.cc:17
GaugeStartType
GaugeFormat
Definition: t_ov_pbp.cc:18
@ NERSC_GAUGE_FORMAT
@ SZIN_GAUGE_FORMAT
void readParams(const std::string &filename, Param_t &params)
int main(int argc, char **argv)
void dumpParams(XMLWriter &writer, Param_t &params)
@ HOT_START
@ FILE_START
@ COLD_START
void readEigenVecs(const multi1d< LatticeColorMatrix > &u, const UnprecWilsonFermAct &S_aux, const multi1d< Real > &lambda_lo, multi1d< LatticeFermion > &eigen_vec, const Real wilson_mass, const bool szin_eig, XMLWriter &xml_out, const std::string &root_prefix)
Read in the old SZIN eigenvectors.