pseudoscalar.use_NON_gauge_invar()  ; scalar_meson.use_NON_gauge_invar()  ; rho.use_NON_gauge_invar()  ;
int main(int argc, char **argv){  // Put the machine into a known state  Chroma::initialize(&argc, &argv);  // Force the machine into a ring for speed up purposes//  QMP_u32_t foo[] = {1,1,1,8};//  QMP_declare_logical_topology(foo, Nd);  // Input parameter structure  Propagator_input_t  input;  // Instantiate xml reader for DATA  // XMLReader xml_in("./DATA_v2");  XMLReader xml_in(Chroma::getXMLInputFileName());  // Read data  read(xml_in, "/propagator", input);  // Specify lattice size, shape, etc.  Layout::setLattSize(input.param.nrow);  Layout::create();  // Read in the configuration along with relevant information.  multi1d<LatticeColorMatrix> u(Nd);    XMLReader gauge_xml;  switch (input.cfg.cfg_type)   {  case CFG_TYPE_NERSC :    readArchiv(gauge_xml, u, input.cfg.cfg_file);    break;  default :    QDP_error_exit("Configuration type is unsupported.");  }  // Read in the source along with relevant information.  LatticeStaggeredPropagator quark_prop_source;  XMLReader source_xml;  switch (input.param.prop_type)   {  case PROP_TYPE_SZIN ://    readSzinQprop(source_xml, quark_prop_source, input.prop.source_file);    quark_prop_source = zero;    break;  default :    QDP_error_exit("Propagator type is unsupported.");  }  // Instantiate XML writer for the output file  // XMLFileWriter xml_out("t_propagator_s.xml");  XMLFileWriter& xml_out = Chroma::getXMLOutputInstance();  push(xml_out, "hadron_corr");  // Write out the input  write(xml_out, "Input", xml_in);  // Write out the config header  write(xml_out, "Config_info", gauge_xml);  // Write out the source header  write(xml_out, "Source_info", source_xml);  push(xml_out, "Output_version");  write(xml_out, "out_version", 1);  pop(xml_out);  xml_out.flush();  // Check if the gauge field configuration is unitarized  unitarityCheck(u);  // Calculate some gauge invariant observables just for info.  MesPlq(xml_out, "Observables", u);  xml_out.flush();  // Fix to the coulomb gauge  int n_gf;  int j_decay = Nd-1;  coulGauge(u, n_gf, j_decay, input.param.GFAccu, input.param.GFMax, true, input.param.OrPara);  QDPIO::cout << "No. of gauge fixing iterations =" << n_gf << endl;  // Calcluate plaq on the gauge fixed field  MesPlq(xml_out, "Is_this_gauge_invariant", u);  xml_out.flush();  // Create a fermion BC. Note, the handle is on an ABSTRACT type.  Handle< FermBC<LatticeStaggeredFermion> >  fbc(new SimpleFermBC<LatticeStaggeredFermion>(input.param.boundary));  //  // Initialize fermion action  //  AsqtadFermAct S_f(fbc, input.param.Mass, input.param.u0);  // Set up a state for the current u,  // (compute fat & triple links)  // Use S_f.createState so that S_f can pass in u0  Handle<const ConnectState > state(S_f.createState(u));//  Handle<const EvenOddLinearOperatorBase<LatticeStaggeredFermion> > D_asqtad(S_f.linOp(state));//  Handle<const LinearOperator<LatticeStaggeredFermion> > MdagM_asqtad(S_f.lMdagM(state));  //  // Loop over the source color, creating the source  // and calling the relevant propagator routines.   //   //  LatticeStaggeredPropagator quark_propagator;  XMLBufferWriter xml_buf;  int ncg_had = 0;  int n_count;  int t_length = input.param.nrow[3];  LatticeStaggeredFermion q_source, psi;  multi1d<LatticeStaggeredPropagator> stag_prop(8);  push(xml_out, "Wall_source");  push(xml_out,"Inverter_properties");  write(xml_out, "Mass" , input.param.Mass);  write(xml_out, "RsdCG", input.param.invParam.RsdCG);  pop(xml_out);  Handle<const SystemSolver<LatticeStaggeredFermion> > qprop(S_f.qprop(state,input.param.invParam));  for(int t_source = 0; t_source < 3; t_source += 2) {    QDPIO::cout << "Source time slice = " << t_source << endl;    for(int src_ind = 0; src_ind < 8; ++src_ind){      psi = zero;   // note this is ``zero'' and not 0      QDPIO::cout << "Inversion for source " << src_ind << endl;      for(int color_source = 0; color_source < Nc; ++color_source) {        QDPIO::cout << "Inversion for Color =  " << color_source << endl;        q_source = zero ;        	//  Use a wall source	walfil(q_source, t_source, j_decay, color_source, src_ind);        // Use the last initial guess as the current guess        // Compute the propagator for given source color/spin 	int n_count = (*qprop)(psi, q_source);        ncg_had += n_count;      	push(xml_out,"Inverter_performance");        write(xml_out, "color", color_source);        write(xml_out, "staggered_src", src_ind);        write(xml_out, "iterations", n_count);        pop(xml_out);        /*         * Move the solution to the appropriate components         * of quark propagator.        */        FermToProp(psi, quark_propagator, color_source);      }  //color_source          stag_prop[src_ind] = quark_propagator;    } // end src_ind      int t_eff;    push(xml_out, "Hadrons_from_time_source");    write(xml_out, "source_time", t_source);    staggered_pions pseudoscalar(t_length,u) ;     staggered_scalars  scalar_meson(t_length,u) ;     vector_meson rho(t_length,u) ;          pseudoscalar.compute(stag_prop, j_decay);    scalar_meson.compute(stag_prop,  j_decay);    rho.compute(stag_prop,  j_decay);        // write the correlators to disk    pseudoscalar.dump(t_source,xml_out);    scalar_meson.dump(t_source,xml_out);    rho.dump(t_source,xml_out);    pop(xml_out);  } //t_source;  pop(xml_out);  pop(xml_out);  xml_out.close();  xml_in.close();  // Time to bolt  Chroma::finalize();  exit(0);}