#include #include #include #include #include #include #if (VERSION_SUB >17 || VERSION_MAJOR > 4) #include #else #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #undef DO_SCU_CHECKSUMS #ifdef HAVE_QCDOCOS_SCU_CHECKSUM_H #include #endif //-------------------------------------------------------------- USING_NAMESPACE_CPS using namespace std; const int MAX_FILENAME = 256; HmcArg hmc_arg; HmcArg hmc_arg_pass; ActionGaugeArg gauge_arg; ActionQuotientArg quo_arg; ActionRationalQuotientArg rat_quo_arg; ActionRationalQuotientArg rat_quo_arg_new; IntABArg ab1_arg; IntABArg ab2_arg; IntABArg ab3_arg; IntABArg sum_arg; EvoArg evo_arg; DoArg do_arg; PbpArg pbp_arg; NoArg no_arg; FloatArray w_spect_mass_list; void checkpoint(int traj); inline int Chdir(const char *dir){ if (chdir(dir) !=0){ printf("cannot change directory to %s\n",dir); exit(-1); } return 0; } int main(int argc, char *argv[]) { // char plaq_file[256]; // char pbp_file[256]; // char hmc_file[256]; char *cname=argv[0]; char *fname="main()"; Float dtime; CommonArg common_arg_plaq; CommonArg common_arg_pbp; CommonArg common_arg_hmc; WspectArg w_spect_arg; CgArg w_spect_cg_arg; WspectOutput w_spect_output; FixGaugeArg w_spect_fg_arg; Start(&argc,&argv); if ( argc < 5 ) { if(!UniqueID()){ printf("Args:\tdo_arg.vml quo_arg.vml current_dir (start traj)\n"); for(int i =0; i5) sscanf(argv[5],"%d",&traj); // int w_int = evo_arg.measure_w_spect_interval; int g_int = evo_arg.gauge_unload_period; hmc_arg_pass = hmc_arg; sum_arg.A_steps = 1; sum_arg.B_steps = 1; //!< Create fictitous Hamiltonian (mom + action) AlgMomentum mom; // AlgActionGauge gauge(mom, gauge_arg); // AlgActionRationalQuotient rat_quo(mom, rat_quo_arg); char lat_file[256]; char rng_file[256]; char rw_file[256]; char vml_file[256]; int n_step = evo_arg.measure_pbp; int n_mass = quo_arg.quotients.quotients_len; // for now assumes all masses for quotients are the same Float upper = quo_arg.quotients.quotients_val[0].bsn_mass; Float lower = quo_arg.quotients.quotients_val[0].frm_mass; VRB.Result(cname,fname,"bsn_mass=%g frm_mass=%g n_step=%d n_mass=%d\n", upper,lower,n_step,n_mass); Float *rw_fac,*norm; rw_fac = new Float[n_mass]; norm = new Float[n_mass]; for(int conf=0; conf< evo_arg.gauge_configurations; conf ++ ) { sprintf(lat_file,"%s.%d",evo_arg.gauge_file_stem,traj); sprintf(rw_file,"reweight.%d",traj); sprintf(vml_file,"quo_arg.%d",traj); if ( !quo_arg.Encode(vml_file,"quo_arg") ){ printf("bad rat_quo_arg encode\n"); exit(-1); } FILE *fp = Fopen(rw_file,"a"); // sprintf(rng_file,"%s.%d",evo_arg.rng_file_stem,traj); { GwilsonFdwf lat; ReadLatticeParallel(lat,lat_file); } // LRG.Read(rng_file,32); for(int i =0;i