apply timeout bugfix to temper variants in USER-MISC

This commit is contained in:
Axel Kohlmeyer
2020-02-23 05:04:21 -05:00
parent d226f5d02c
commit c3fc680ccd
2 changed files with 16 additions and 2 deletions

View File

@ -241,7 +241,14 @@ void TemperGrem::command(int narg, char **arg)
timer->init_timeout();
update->integrate->run(nevery);
if (timer->is_timeout()) break;
// check for timeout across all procs
int my_timeout=0;
int any_timeout=0;
if (timer->is_timeout()) my_timeout=1;
MPI_Allreduce(&my_timeout, &any_timeout, 1, MPI_INT, MPI_SUM, universe->uworld);
if (any_timeout) break;
// compute PE
// notify compute it will be called at next swap

View File

@ -220,7 +220,14 @@ void TemperNPT::command(int narg, char **arg)
timer->init_timeout();
update->integrate->run(nevery);
if (timer->is_timeout()) break;
// check for timeout across all procs
int my_timeout=0;
int any_timeout=0;
if (timer->is_timeout()) my_timeout=1;
MPI_Allreduce(&my_timeout, &any_timeout, 1, MPI_INT, MPI_SUM, universe->uworld);
if (any_timeout) break;
// compute PE
// notify compute it will be called at next swap