Skip to content

Commit

Permalink
Merge remote-tracking branch 'etmc/master' into mixed_cg_merge_hmc
Browse files Browse the repository at this point in the history
Conflicts:
	monomial/cloverdet_monomial.c
	monomial/det_monomial.c
  • Loading branch information
kostrzewa committed Feb 17, 2016
2 parents 7f2ccce + a2291dc commit 74f93b7
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 18 deletions.
19 changes: 14 additions & 5 deletions gen_sources.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,16 @@ int main(int argc,char *argv[]) {
for(is = 0; is < 4; is ++) {
for(ic = 0; ic < 3; ic++) {
if(!filenameflag && !appendflag) {
sprintf(spinorfilename, "%s.%.4d.%.4d.%.2d.%.2d", filename, nstore, sample, t0, 3*is+ic);
if(T_global > 99) {
sprintf(spinorfilename, "%s.%.4d.%.4d.%.3d.%.2d", filename, nstore, sample, t0, 3*is+ic);
}
else {
sprintf(spinorfilename, "%s.%.4d.%.4d.%.2d.%.2d", filename, nstore, sample, t0, 3*is+ic);
}
}
else if(!filenameflag && appendflag) {
sprintf(spinorfilename, "%s.%.4d.%.4d.%.2d", filename, nstore, sample, t0);
if(T_global > 99) sprintf(spinorfilename, "%s.%.4d.%.4d.%.3d", filename, nstore, sample, t0);
else sprintf(spinorfilename, "%s.%.4d.%.4d.%.2d", filename, nstore, sample, t0);
}
else{
sprintf(spinorfilename, "%s.%.2d", filename, 3*is+ic);
Expand All @@ -233,7 +239,8 @@ int main(int argc,char *argv[]) {
else {
if(!ext_sourceflag) {
if(!filenameflag) {
sprintf(spinorfilename, "%s.%.4d.%.4d.%.2d", filename, nstore, sample, t0);
if(T_global > 99) sprintf(spinorfilename, "%s.%.4d.%.4d.%.3d", filename, nstore, sample, t0);
else sprintf(spinorfilename, "%s.%.4d.%.4d.%.2d", filename, nstore, sample, t0);
}
else {
sprintf(spinorfilename, "%s", filename);
Expand All @@ -249,7 +256,8 @@ int main(int argc,char *argv[]) {
}
else {
if(!filenameflag) {
sprintf(spinorfilename, "%s.%.4d.%.4d.%.2d.inverted", filename, nstore, sample, t0);
if(T_global > 99) sprintf(spinorfilename, "%s.%.4d.%.4d.%.3d.inverted", filename, nstore, sample, t0);
else sprintf(spinorfilename, "%s.%.4d.%.4d.%.2d.inverted", filename, nstore, sample, t0);
}
else {
sprintf(spinorfilename, "%s.inverted", filename);
Expand All @@ -261,7 +269,8 @@ int main(int argc,char *argv[]) {
g_spinor_field[0], g_spinor_field[1],
t0, 0., 0., 0.);
if(!filenameflag) {
sprintf(spinorfilename, "g%s.%.4d.%.4d.%.2d", filename, nstore, sample, t0);
if(T_global > 99) sprintf(spinorfilename, "g%s.%.4d.%.4d.%.3d", filename, nstore, sample, t0);
else sprintf(spinorfilename, "g%s.%.4d.%.4d.%.2d", filename, nstore, sample, t0);
}
else {
sprintf(spinorfilename, "g%s", filename);
Expand Down
3 changes: 2 additions & 1 deletion invert_eo.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,8 @@ static void cgmms_write_props(spinor ** const P, double const * const shifts, co
for(int im = 0; im < no_shifts; im++) {
if(SourceInfo.type != 1) {
if (PropInfo.splitted) {
sprintf(filename, "%s.%.2d.%.4d.%.2d.%.2d.cgmms.%.2d.inverted", SourceInfo.basename, id, SourceInfo.nstore, SourceInfo.t, SourceInfo.ix, im);
if(T_global > 99) sprintf(filename, "%s.%.2d.%.4d.%.3d.%.2d.cgmms.%.2d.inverted", SourceInfo.basename, id, SourceInfo.nstore, SourceInfo.t, SourceInfo.ix, im);
else sprintf(filename, "%s.%.2d.%.4d.%.2d.%.2d.cgmms.%.2d.inverted", SourceInfo.basename, id, SourceInfo.nstore, SourceInfo.t, SourceInfo.ix, im);
} else {
sprintf(filename, "%s.%.2d.%.4d.%.2d.cgmms.%.2d.inverted", SourceInfo.basename, id, SourceInfo.nstore, SourceInfo.t, im);
}
Expand Down
2 changes: 1 addition & 1 deletion monomial/cloverdet_monomial.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ double cloverdet_acc(const int id, hamiltonian_field_t * const hf) {
chrono_guess(mnl->w_fields[0], mnl->pf, mnl->csg_field, mnl->csg_index_array,
mnl->csg_N, mnl->csg_n, VOLUME/2, mnl->Qsq);
g_sloppy_precision_flag = 0;
mnl->iter0 = solve_degenerate(mnl->w_fields[0], mnl->pf, mnl->solver_params, mnl->maxiter, mnl->accprec,
mnl->iter0 += solve_degenerate(mnl->w_fields[0], mnl->pf, mnl->solver_params, mnl->maxiter, mnl->accprec,
g_relative_precision_flag, VOLUME/2, mnl->Qsq, mnl->solver);
mnl->Qm(mnl->w_fields[0], mnl->w_fields[0]);

Expand Down
8 changes: 4 additions & 4 deletions monomial/det_monomial.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ double det_acc(const int id, hamiltonian_field_t * const hf) {
chrono_guess(mnl->w_fields[0], mnl->pf, mnl->csg_field, mnl->csg_index_array,
mnl->csg_N, mnl->csg_n, VOLUME/2, mnl->Qsq);
g_sloppy_precision_flag = 0;
mnl->iter0 = solve_degenerate(mnl->w_fields[0], mnl->pf, mnl->solver_params, mnl->maxiter, mnl->accprec, g_relative_precision_flag,
VOLUME/2, mnl->Qsq, mnl->solver);
mnl->iter0 += solve_degenerate(mnl->w_fields[0], mnl->pf, mnl->solver_params, mnl->maxiter,
mnl->accprec, g_relative_precision_flag,VOLUME/2, mnl->Qsq, mnl->solver);
mnl->Qm(mnl->w_fields[1], mnl->w_fields[0]);
g_sloppy_precision_flag = save_sloppy;
/* Compute the energy contr. from first field */
Expand All @@ -231,8 +231,8 @@ double det_acc(const int id, hamiltonian_field_t * const hf) {
if((mnl->solver == CG) || (mnl->solver == MIXEDCG)) {
chrono_guess(mnl->w_fields[1], mnl->pf, mnl->csg_field, mnl->csg_index_array,
mnl->csg_N, mnl->csg_n, VOLUME/2, &Q_pm_psi);
mnl->iter0 = solve_degenerate(mnl->w_fields[1], mnl->pf, mnl->solver_params,
mnl->maxiter, mnl->accprec, g_relative_precision_flag,
mnl->iter0 += solve_degenerate(mnl->w_fields[1], mnl->pf, mnl->solver_params, mnl->maxiter,
mnl->accprec, g_relative_precision_flag,
VOLUME, &Q_pm_psi, mnl->solver);
Q_minus_psi(mnl->w_fields[0], mnl->w_fields[1]);
/* Compute the energy contr. from first field */
Expand Down
6 changes: 4 additions & 2 deletions operator.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,10 +475,12 @@ void op_write_prop(const int op_id, const int index_start, const int append_) {

if(SourceInfo.type != 1) {
if (PropInfo.splitted) {
sprintf(filename, "%s.%.4d.%.2d.%.2d.%s", SourceInfo.basename, SourceInfo.nstore, SourceInfo.t, SourceInfo.ix, ending);
if(T_global > 99) sprintf(filename, "%s.%.4d.%.3d.%.2d.%s", SourceInfo.basename, SourceInfo.nstore, SourceInfo.t, SourceInfo.ix, ending);
else sprintf(filename, "%s.%.4d.%.2d.%.2d.%s", SourceInfo.basename, SourceInfo.nstore, SourceInfo.t, SourceInfo.ix, ending);
}
else {
sprintf(filename, "%s.%.4d.%.2d.%s", SourceInfo.basename, SourceInfo.nstore, SourceInfo.t, ending);
if(T_global > 99) sprintf(filename, "%s.%.4d.%.3d.%s", SourceInfo.basename, SourceInfo.nstore, SourceInfo.t, ending);
else sprintf(filename, "%s.%.4d.%.2d.%s", SourceInfo.basename, SourceInfo.nstore, SourceInfo.t, ending);
}
}
else {
Expand Down
15 changes: 10 additions & 5 deletions prepare_source.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ void prepare_source(const int nstore, const int isample, const int ix, const int
/* automatic timeslice detection */
if(g_proc_id == 0) {
for(t = 0; t < g_nproc_t*T; t++) {
sprintf(source_filename, "%s.%.4d.%.2d.%.2d", SourceInfo.basename, nstore, t, ix);
if(T_global > 99) sprintf(source_filename, "%s.%.4d.%.3d.%.2d", SourceInfo.basename, nstore, t, ix);
else sprintf(source_filename, "%s.%.4d.%.2d.%.2d", SourceInfo.basename, nstore, t, ix);
if( (ifs = fopen(source_filename, "r")) != NULL) {
fclose(ifs);
break;
Expand All @@ -96,7 +97,8 @@ void prepare_source(const int nstore, const int isample, const int ix, const int
#endif
SourceInfo.t = t;
}
sprintf(source_filename, "%s.%.4d.%.2d.%.2d", SourceInfo.basename, nstore, SourceInfo.t, ix);
if(T_global > 99) sprintf(source_filename, "%s.%.4d.%.3d.%.2d", SourceInfo.basename, nstore, SourceInfo.t, ix);
else sprintf(source_filename, "%s.%.4d.%.2d.%.2d", SourceInfo.basename, nstore, SourceInfo.t, ix);
if (g_cart_id == 0) {
printf("# Trying to read source from %s\n", source_filename);
}
Expand All @@ -115,10 +117,12 @@ void prepare_source(const int nstore, const int isample, const int ix, const int
}
}
if (PropInfo.splitted) {
sprintf(source_filename, "%s.%.4d.%.2d.%.2d.inverted", PropInfo.basename, nstore, SourceInfo.t, ix);
if(T_global > 99) sprintf(source_filename, "%s.%.4d.%.3d.%.2d.inverted", PropInfo.basename, nstore, SourceInfo.t, ix);
else sprintf(source_filename, "%s.%.4d.%.2d.%.2d.inverted", PropInfo.basename, nstore, SourceInfo.t, ix);
}
else {
sprintf(source_filename, "%s.%.4d.%.2d.inverted", PropInfo.basename, nstore, SourceInfo.t);
if(T_global > 99) sprintf(source_filename, "%s.%.4d.%.3d.inverted", PropInfo.basename, nstore, SourceInfo.t);
else sprintf(source_filename, "%s.%.4d.%.2d.inverted", PropInfo.basename, nstore, SourceInfo.t);
}
}
else if(source_type == 1) {
Expand Down Expand Up @@ -209,7 +213,8 @@ void prepare_source(const int nstore, const int isample, const int ix, const int
}
else {
if(SourceInfo.splitted) {
sprintf(source_filename, "%s.%.4d.%.2d.%.2d", SourceInfo.basename, nstore, SourceInfo.t, ix);
if(T_global > 99) sprintf(source_filename, "%s.%.4d.%.3d.%.2d", SourceInfo.basename, nstore, SourceInfo.t, ix);
else sprintf(source_filename, "%s.%.4d.%.2d.%.2d", SourceInfo.basename, nstore, SourceInfo.t, ix);
}
else {
sprintf(source_filename,"%s", SourceInfo.basename);
Expand Down

0 comments on commit 74f93b7

Please sign in to comment.