/*********************************************************** * PAB: simplified main programme for DWF RHMC algorithm * using VML for parameter loading * Arguments * DoArg ParameterFile in absolute node-path * HmdArg ParameterFile in absolute node-path * EvoArg ParameterFile in absolute node-path * * Future: * Do we pass a pole/residue file to the RHMC (do so through alg_hmd) * * I've inserted a placeholder RHMCPoleResStatus class and a * filename entry into the HmdArg class, with the intention of * Mike tweaking the RHMC to use it. At this point the PoleRes * stuff could be dropped. * * We could use the hmd_arg.rhmc_poles_action to decide how * to modify the HmdArg parameter file at the next checkpoint. ***************************************************** */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define USE_SCU_CHECKSUMS #ifdef USE_SCU_CHECKSUMS #include #endif //-------------------------------------------------------------- USING_NAMESPACE_CPS using namespace std; HmdArg hmd_arg; HmdArg hmd_arg_pass; void checkpoint(DoArg &do_arg, HmdArg &hmd_arg,EvoArg &evo_arg, int traj); int main(int argc, char *argv[]) { char plaq_file[256]; char hmd_file[256]; char *cname=argv[0]; char *fname="main()"; CommonArg common_arg_hmdr; CommonArg common_arg_plaq; EvoArg evo_arg; EigArg eig_arg; DoArg do_arg; NoArg no_arg; if ( argc!=6 ) { printf("Args: doarg-file hmdarg-file evoarg-file eigarg_file initial-directory\n"); exit(-1); } chdir (argv[5]); if ( !do_arg.Decode(argv[1],"do_arg") ) { printf("Bum do_arg\n"); exit(-1);} do_arg.x_nodes = SizeX();/*Layout the lattice on the machine (without regard to even-odd)*/ do_arg.y_nodes = SizeY(); do_arg.z_nodes = SizeZ(); do_arg.t_nodes = SizeT(); do_arg.s_nodes = SizeS(); do_arg.x_node_sites = do_arg.x_sites/do_arg.x_nodes; do_arg.y_node_sites = do_arg.y_sites/do_arg.y_nodes; do_arg.z_node_sites = do_arg.z_sites/do_arg.z_nodes; do_arg.t_node_sites = do_arg.t_sites/do_arg.t_nodes; do_arg.s_node_sites = do_arg.s_sites/do_arg.s_nodes; if (do_arg.x_sites!=do_arg.x_node_sites*do_arg.x_nodes) {printf("Lattice does not fit\n");exit(-1);} if (do_arg.y_sites!=do_arg.y_node_sites*do_arg.y_nodes) {printf("Lattice does not fit\n");exit(-1);} if (do_arg.z_sites!=do_arg.z_node_sites*do_arg.z_nodes) {printf("Lattice does not fit\n");exit(-1);} if (do_arg.t_sites!=do_arg.t_node_sites*do_arg.t_nodes) {printf("Lattice does not fit\n");exit(-1);} if (do_arg.s_sites!=do_arg.s_node_sites*do_arg.s_nodes) {printf("Lattice does not fit\n");exit(-1);} if ( !hmd_arg.Decode(argv[2],"hmd_arg")){printf("Bum hmd_arg\n"); exit(-1);} if ( !evo_arg.Decode(argv[3],"evo_arg")){printf("Bum evo_arg\n"); exit(-1);} if ( !eig_arg.Decode(argv[4],"eig_arg")){printf("Bum eig_arg\n"); exit(-1);} chdir(evo_arg.work_directory); #ifdef USE_SCU_CHECKSUMS ScuChecksum::Initialise(evo_arg.hdw_xcsum,evo_arg.hdw_rcsum); #endif // do_arg.verbose_level=VERBOSE_RESULT_LEVEL; GJP.Initialize(do_arg); // VRB.Level(VERBOSE_RESULT_LEVEL); LRG.Initialize(); /************************************************ * Outer config loop ************************************************/ int traj = evo_arg.traj_start; if ( do_arg.start_conf_kind != START_CONF_FILE ) { /* * Expect hot or cold start to be saved * but don't overwrite a loaded file */ checkpoint(do_arg, hmd_arg, evo_arg, traj); } hmd_arg_pass = hmd_arg; int g_size = GJP.VolNodeSites()*18*4; Matrix *mom = (Matrix*)smalloc(g_size*sizeof(Float),cname,fname,"mom"); for(int conf=0; conf< evo_arg.gauge_configurations; conf ++ ) { sprintf(plaq_file,"%s.%d",evo_arg.plaquette_stem,traj); FILE * truncate_it = Fopen(plaq_file,"w"); Fclose(truncate_it); common_arg_plaq.set_filename(plaq_file); sprintf(hmd_file,"%s.%d",evo_arg.evo_stem,traj); common_arg_hmdr.set_filename(hmd_file); /************************************************ * Inner trajectory loop ************************************************/ for(int i=0;i