git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15203 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
10
src/run.cpp
10
src/run.cpp
@ -42,6 +42,9 @@ void Run::command(int narg, char **arg)
|
||||
if (domain->box_exist == 0)
|
||||
error->all(FLERR,"Run command before simulation box is defined");
|
||||
|
||||
// ignore run command, if walltime limit was already reached
|
||||
if (timer->is_timeout()) return;
|
||||
|
||||
bigint nsteps_input = force->bnumeric(FLERR,arg[0]);
|
||||
|
||||
// parse optional args
|
||||
@ -130,6 +133,9 @@ void Run::command(int narg, char **arg)
|
||||
error->all(FLERR,"Run command stop value is before end of run");
|
||||
}
|
||||
|
||||
if (!preflag && strstr(update->integrate_style,"respa"))
|
||||
error->all(FLERR,"Run flag 'pre no' not compatible with r-RESPA");
|
||||
|
||||
// if nevery, make copies of arg strings that are commands
|
||||
// required because re-parsing commands via input->one() will wipe out args
|
||||
|
||||
@ -152,6 +158,7 @@ void Run::command(int narg, char **arg)
|
||||
// if post, do full Finish, else just print time
|
||||
|
||||
update->whichflag = 1;
|
||||
timer->init_timeout();
|
||||
|
||||
if (nevery == 0) {
|
||||
update->nsteps = nsteps;
|
||||
@ -190,6 +197,9 @@ void Run::command(int narg, char **arg)
|
||||
int iter = 0;
|
||||
int nleft = nsteps;
|
||||
while (nleft > 0 || iter == 0) {
|
||||
if (timer->is_timeout()) break;
|
||||
timer->init_timeout();
|
||||
|
||||
nsteps = MIN(nleft,nevery);
|
||||
|
||||
update->nsteps = nsteps;
|
||||
|
||||
Reference in New Issue
Block a user