Commit 9bd1d423 authored by Marc Arene's avatar Marc Arene
Browse files

Computing correctly the number of traj left to run to finish phase3

parent f97e800c
......@@ -1388,7 +1388,7 @@ if __name__ == '__main__':
# to converge. Do the check at the end of run anyway also.
if (traj_index >= CONST.N_TRAJ_TO_CHECK_SIS_DEFAULT and traj_index == next_traj_to_check_sis) or traj_index == idx_end_phase3_asked:
cut.logger.info(f'Checking SIS on Phase III samples only...')
ACLmax = cautocorr.get_maximum_integrated_time(np.asarray(sampler.samples))
ACLmax = cautocorr.get_maximum_integrated_time(np.asarray(sampler.samples))
n_sis_accumulated = int(len(sampler.samples) / ACLmax)
n_sis_to_get = sampler.n_sis - n_sis_accumulated
cut.logger.info(f'~{n_sis_accumulated} SIS out of {len(sampler.samples)} samples since ACLmax={ACLmax}.')
......@@ -1397,10 +1397,10 @@ if __name__ == '__main__':
break_before_enough_sis = False
break
else:
n_traj_left_to_run_a_priori = sampler.n_sis * ACLmax - traj_index
n_traj_left_to_run_a_priori = sampler.n_sis * ACLmax - len(sampler.samples)
n_traj_to_check_sis = min(CONST.N_TRAJ_TO_CHECK_SIS_DEFAULT, n_traj_left_to_run_a_priori)
next_traj_to_check_sis = traj_index + n_traj_to_check_sis
cut.logger.info(f' Missing {n_sis_to_get} SIS => continuing phase3 for ~{n_traj_left_to_run_a_priori}. Next check in {n_traj_to_check_sis} traj.')
cut.logger.info(f' Missing {n_sis_to_get} SIS => continuing phase3 for ~{n_traj_left_to_run_a_priori}. Next check in {n_traj_to_check_sis} traj at trajectory #{next_traj_to_check_sis}.')
if traj_index % CONST.N_TRAJ_TO_SAVE_STATE == 0 and traj_index != idx_start_phase3:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment