void write_appl_gauge_info(FILE *fp, gauge_file *gf) { Real myssplaq = g_ssplaq; /* Precision conversion */ Real mystplaq = g_stplaq; /* Precision conversion */ Real nersc_linktr = linktrsum.real/3.; /* Convention and precision */ /* Write generic information */ write_generic_gauge_info(fp, gf); /* The rest are optional */ write_gauge_info_item(fp,"action.description","%s", "\"Pure gauge\"",0,0); write_gauge_info_item(fp,"gauge.description","%s", gauge_action_description,0,0); write_gauge_info_item(fp,"gauge.nloops","%d",(char *)&gauge_action_nloops,0,0); write_gauge_info_item(fp,"gauge.nreps","%d",(char *)&gauge_action_nreps,0,0); write_gauge_info_item(fp,"gauge.beta11","%f",(char *)&beta,0,0); write_gauge_info_item(fp,"gauge.tadpole.u0","%f",(char *)&u0,0,0); write_gauge_info_item(fp,"gauge.ssplaq","%f",(char *)&myssplaq,0,0); write_gauge_info_item(fp,"gauge.stplaq","%f",(char *)&mystplaq,0,0); write_gauge_info_item(fp,"gauge.nersc_linktr","%e", (char *)&(nersc_linktr),0,0); write_gauge_info_item(fp,"gauge.nersc_checksum","%u", (char *)&(nersc_checksum),0,0); }
// ----------------------------------------------------------------- // Open, write, and close the ASCII info file void write_gauge_info_file(gauge_file *gf) { FILE *info_fp; gauge_header *gh; char info_filename[256]; char sums[20]; gh = gf->header; /* Construct header file name from lattice file name by adding filename extension to lattice file name */ strcpy(info_filename, gf->filename); strcat(info_filename, ASCII_GAUGE_INFO_EXT); // Open header file if ((info_fp = fopen(info_filename,"w")) == NULL) { printf("write_gauge_info_file: Can't open ascii info file %s\n", info_filename); return; } // Write required information write_gauge_info_item(info_fp, "magic_number", "%d", (char *)&gh->magic_number, 0, 0); write_gauge_info_item(info_fp, "time_stamp", "\"%s\"", gh->time_stamp, 0, 0); sprintf(sums, "%x %x", gf->check.sum29, gf->check.sum31); write_gauge_info_item(info_fp, "checksums", "\"%s\"", sums, 0, 0); write_gauge_info_item(info_fp, "nx", "%d", (char *)&nx, 0, 0); write_gauge_info_item(info_fp, "nt", "%d", (char *)&nt, 0, 0); write_appl_gauge_info(info_fp); fclose(info_fp); printf("Wrote info file %s\n", info_filename); }
void write_appl_gauge_info(FILE *fp, gauge_file *gf) { Real gauge_fix_tol = GAUGE_FIX_TOL; /* Write generic information */ write_generic_gauge_info(fp, gf); /* The rest are optional */ if(fixflag==COULOMB_GAUGE_FIX) { write_gauge_info_item(fp,"gauge.fix.description","%s", "\"Coulomb\"",0,0); write_gauge_info_item(fp,"gauge.fix.tolerance","%g", (char *)&gauge_fix_tol,0,0); } }
void write_appl_gauge_info(FILE *fp, gauge_file *gf) { char sums[20]; /* Write generic information */ write_generic_gauge_info(fp, gf); /* The rest are optional */ if(startlat_p != NULL) { /* To retain some info about the original (or previous) configuration */ write_gauge_info_item(fp,"gauge.previous.filename","\"%s\"", startlat_p->filename,0,0); write_gauge_info_item(fp,"gauge.previous.time_stamp","\"%s\"", startlat_p->header->time_stamp,0,0); sprintf(sums,"%x %x",startlat_p->check.sum29,startlat_p->check.sum31); write_gauge_info_item(fp,"gauge.previous.checksums","\"%s\"",sums,0,0); } }
void write_appl_gauge_info(FILE *fp, gauge_file *gf) { char sums[20]; Real gauge_fix_tol = GAUGE_FIX_TOL; /* Write generic information */ write_generic_gauge_info(fp, gf); /* The rest are optional */ if(startlat_p != NULL) { /* To retain some info about the original (or previous) configuration */ write_gauge_info_item(fp,"gauge.previous.filename","\"%s\"", startlat_p->filename,0,0); write_gauge_info_item(fp,"gauge.previous.time_stamp","\"%s\"", startlat_p->header->time_stamp,0,0); sprintf(sums,"%x %x",startlat_p->check.sum29,startlat_p->check.sum31); write_gauge_info_item(fp,"gauge.previous.checksums","\"%s\"",sums,0,0); } if(fixflag==COULOMB_GAUGE_FIX) { write_gauge_info_item(fp,"gauge.fix.description","%s", "\"Coulomb\"",0,0); write_gauge_info_item(fp,"gauge.fix.tolerance","%g", (char *)&gauge_fix_tol,0,0); } write_gauge_info_item(fp,"gauge.smear.description","\"%s\"", "\"All links SU3 projected\"",0,0); write_gauge_info_item(fp,"gauge.smear.steps","\"%d\"", (char *)&total_sweeps,0,0); /* For the smearing factor we use Tom and Anna's convention which corresponds to the weighting U_fat = (1 - a) U_link + a/6 U_staple */ write_gauge_info_item(fp,"gauge.smear.factor","\"%f\"", (char *)&ape_weight,0,0); }
void write_appl_gauge_info(FILE *fp, gauge_file *gf) { /* Write generic information */ write_generic_gauge_info(fp, gf); /* The rest are optional */ write_gauge_info_item(fp,"action.description","%s", "\"Gauge plus fermion\"",0,0); write_gauge_info_item(fp,"gauge.description","%s", gauge_action_description,0,0); write_gauge_info_item(fp,"gauge.nloops","%d",(char *)&gauge_action_nloops,0,0); write_gauge_info_item(fp,"gauge.nreps","%d",(char *)&gauge_action_nreps,0,0); write_gauge_info_item(fp,"gauge.tadpole.u0","%f",(char *)&u0,0,0); write_gauge_info_item(fp,"quark.description","%s",quark_action_description,0,0); write_gauge_info_item(fp,"quark.flavors","%d",(char *)&nflavors,0,0); write_gauge_info_item(fp,"quark.mass","%f",(char *)&mass,0,0); }
void write_appl_gauge_info(FILE *fp, gauge_file *gf) { /* Write generic information */ write_generic_gauge_info(fp, gf); /* The rest are optional */ write_gauge_info_item(fp,"action.description","%s", "\"Gauge plus fermion\"",0,0); write_gauge_info_item(fp,"gauge.description","%s", "\"One plaquette gauge action\"",0,0); write_gauge_info_item(fp,"gauge.beta11","%f",(char *)&beta,0,0); write_gauge_info_item(fp,"quark.description","%s","\"Wilson fermions\"",0,0); write_gauge_info_item(fp,"quark.flavors","%d",(char *)&nflavors,0,0); write_gauge_info_item(fp,"quark.kappa","%f",(char *)&kappa,0,0); }
// ----------------------------------------------------------------- // Write optional entries in the ASCII info file // Call from one of the lattice output routines in io_lat4.c // File has already been opened and the required magic number, // time stamp and lattice dimensions have already been written void write_appl_gauge_info(FILE *fp) { write_gauge_info_item(fp, "action.description", "%s", "\"Gauge plus fermion\"", 0, 0); write_gauge_info_item(fp, "quark.description", "%s", "\"nHYP KS fermions\"", 0, 0); }
void write_appl_gauge_info(FILE *fp, gauge_file *gf) { char sums[20]; Real gauge_fix_tol = GAUGE_FIX_TOL; Real myssplaq = g_ssplaq; /* Precision conversion */ Real mystplaq = g_stplaq; /* Precision conversion */ Real nersc_linktr = linktrsum.real/3.; /* Convention and precision */ /* Write generic information */ write_generic_gauge_info(fp, gf); /* Note that the file has already been opened and the required magic number, time stamp, and lattice dimensions have already been written */ /* The rest are optional */ if(startlat_p != NULL) { /* To retain some info about the original (or previous) configuration */ write_gauge_info_item(fp,"gauge.previous.filename","\"%s\"", startlat_p->filename,0,0); write_gauge_info_item(fp,"gauge.previous.time_stamp","\"%s\"", startlat_p->header->time_stamp,0,0); sprintf(sums,"%x %x",startlat_p->check.sum29,startlat_p->check.sum31); write_gauge_info_item(fp,"gauge.previous.checksums","\"%s\"",sums,0,0); } write_gauge_info_item(fp,"gauge.ssplaq","%f",(char *)&myssplaq,0,0); write_gauge_info_item(fp,"gauge.stplaq","%f",(char *)&mystplaq,0,0); write_gauge_info_item(fp,"gauge.nersc_linktr","%e", (char *)&(nersc_linktr),0,0); write_gauge_info_item(fp,"gauge.nersc_checksum","%u", (char *)&(nersc_checksum),0,0); if(fixflag==COULOMB_GAUGE_FIX) { write_gauge_info_item(fp,"gauge.fix.description","%s", "\"Coulomb\"",0,0); write_gauge_info_item(fp,"gauge.fix.tolerance","%g", (char *)&gauge_fix_tol,0,0); } if(fixflag==LANDAU_GAUGE_FIX) { write_gauge_info_item(fp,"gauge.fix.description","%s", "\"Landau\"",0,0); write_gauge_info_item(fp,"gauge.fix.tolerance","%g", (char *)&gauge_fix_tol,0,0); } }