Minor bug in nsteps for resumption

This commit is contained in:
Ian Jauslin 2023-04-27 10:03:58 -04:00
parent 4436866d2f
commit 0b6fe9bd6b

View File

@ -177,7 +177,7 @@ int eea(
remove_entry(params, "starting_time");
remove_entry(params, "init");
remove_entry(params, "nsteps");
fprintf(savefile," -p \"%s;starting_time=%lu;nsteps=%lu;init=file:%s\"", params, t+1, (nsteps < t+1 ? 0 : nsteps-t-1), savefile_string);
fprintf(savefile," -p \"%s;starting_time=%lu;nsteps=%lu;init=file:%s\"", params, t+1, (nsteps+starting_time < t+1 ? 0 : nsteps+starting_time-t-1), savefile_string);
free(params);
}
fprintf(savefile," energy\n");