From b8f4efcb6a703cbaf9f5451954b024a7afbf18c9 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 28 Jul 2022 16:53:39 -0600 Subject: [PATCH] pre-existing bug fix for delay option with dump computes for pe/virial --- src/dump.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/dump.cpp b/src/dump.cpp index 13e3bcdfcc..048a3712ab 100644 --- a/src/dump.cpp +++ b/src/dump.cpp @@ -341,10 +341,6 @@ void Dump::write() imageint *imagehold; double **xhold,**vhold; - // if timestep < delaystep, just return - - if (delay_flag && update->ntimestep < delaystep) return; - // simulation box bounds if (domain->triclinic == 0) { @@ -370,9 +366,12 @@ void Dump::write() nme = count(); + // if timestep < delaystep, just return // if skip condition is defined and met, just return - // do this after count() b/c it invokes computes, - // so caller can trigger future invocation of needed computes + // must do both these tests after count() b/c it invokes computes, + // this enables caller to trigger future invocation of needed computes + + if (delay_flag && update->ntimestep < delaystep) return; if (skipflag) { double value = input->variable->compute_equal(skipindex);