Unverified Commit 207976f4 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

avoid abort when timeout appears in temper commands

parent 75c1e285
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -215,12 +215,11 @@ void Temper::command(int narg, char **arg)

  for (int iswap = 0; iswap < nswaps; iswap++) {

    if (timer->is_timeout()) break;
    timer->init_timeout();

    // run for nevery timesteps

    timer->init_timeout();
    update->integrate->run(nevery);
    if (timer->is_timeout()) break;

    // compute PE
    // notify compute it will be called at next swap
+2 −4
Original line number Diff line number Diff line
@@ -237,12 +237,11 @@ void TemperGrem::command(int narg, char **arg)

  for (int iswap = 0; iswap < nswaps; iswap++) {

    if (timer->is_timeout()) break;
    timer->init_timeout();

    // run for nevery timesteps

    timer->init_timeout();
    update->integrate->run(nevery);
    if (timer->is_timeout()) break;

    // compute PE
    // notify compute it will be called at next swap
@@ -250,7 +249,6 @@ void TemperGrem::command(int narg, char **arg)
    pe = pe_compute->compute_scalar();
    pe_compute->addstep(update->ntimestep + nevery);


    // which = which of 2 kinds of swaps to do (0,1)

    if (!ranswap) which = iswap % 2;
+2 −3
Original line number Diff line number Diff line
@@ -216,12 +216,11 @@ void TemperNPT::command(int narg, char **arg)

  for (int iswap = 0; iswap < nswaps; iswap++) {

    if (timer->is_timeout()) break;
    timer->init_timeout();

    // run for nevery timesteps

    timer->init_timeout();
    update->integrate->run(nevery);
    if (timer->is_timeout()) break;

    // compute PE
    // notify compute it will be called at next swap