diff --git a/src/input.cpp b/src/input.cpp index 8eda9eab56..fb1dd7db7f 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -507,7 +507,7 @@ int Input::execute_command() #define COMMAND_CLASS #define CommandStyle(key,Class) \ else if (strcmp(command,#key) == 0) { \ - Class key(lmp); \ + Class key(lmp); \ key.command(narg,arg); \ return 0; \ } diff --git a/src/min.cpp b/src/min.cpp index 83468936cd..bb084e7f1c 100644 --- a/src/min.cpp +++ b/src/min.cpp @@ -278,7 +278,7 @@ void Min::setup() requestor[m]->min_xf_get(m); modify->setup(vflag); - output->setup(1); + output->setup(1,1); // stats for Finish to print diff --git a/src/output.cpp b/src/output.cpp index 7cb5f44db5..0888be3eb3 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -161,9 +161,11 @@ void Output::init() perform output for setup of run/min do dump first, so memory_usage will include dump allocation do thermo last, so will print after memory_usage + headflag = 0/1 for printing out header line + memflag = 0/1 for printing out memory usage ------------------------------------------------------------------------- */ -void Output::setup(int flag) +void Output::setup(int headflag, int memflag) { bigint ntimestep = update->ntimestep; @@ -245,16 +247,16 @@ void Output::setup(int flag) // print memory usage unless being called between multiple runs - if (flag) memory_usage(); + if (memflag) memory_usage(); - // always do thermo with header at start of run + // always do thermo with header at start of run unless called via rerun // set next_thermo to multiple of every or last step of run (if smaller) // if every = 0, set next_thermo to last step of run // thermo may invoke computes so wrap with clear/add modify->clearstep_compute(); - thermo->header(); + if (headflag) thermo->header(); thermo->compute(0); last_thermo = ntimestep; diff --git a/src/output.h b/src/output.h index 2511d42331..380db516c1 100644 --- a/src/output.h +++ b/src/output.h @@ -60,7 +60,7 @@ class Output : protected Pointers { Output(class LAMMPS *); ~Output(); void init(); - void setup(int); // initial output before run/min + void setup(int,int); // initial output before run/min void write(bigint); // output for current timestep void write_dump(bigint); // force output of dump snapshots void write_restart(bigint); // force output of a restart file diff --git a/src/read_dump.cpp b/src/read_dump.cpp index 128902e76c..6f1db5f225 100644 --- a/src/read_dump.cpp +++ b/src/read_dump.cpp @@ -456,7 +456,8 @@ void ReadDump::atoms() domain->set_initial_box(); domain->set_global_box(); - comm->set_proc_grid(); + // would be OK to do this, except it prints out info + //comm->set_proc_grid(); domain->set_local_box(); } diff --git a/src/respa.cpp b/src/respa.cpp index 51be81ebe8..192cb2696d 100644 --- a/src/respa.cpp +++ b/src/respa.cpp @@ -379,7 +379,7 @@ void Respa::setup() modify->setup(vflag); sum_flevel_f(); - output->setup(1); + output->setup(1,1); update->setupflag = 0; } diff --git a/src/run.cpp b/src/run.cpp index 781001ae9f..87368b3a24 100644 --- a/src/run.cpp +++ b/src/run.cpp @@ -167,7 +167,7 @@ void Run::command(int narg, char **arg) if (preflag || update->first_update == 0) { lmp->init(); update->integrate->setup(); - } else output->setup(0); + } else output->setup(1,0); timer->init(); timer->barrier_start(TIME_LOOP); @@ -205,7 +205,7 @@ void Run::command(int narg, char **arg) if (preflag || iter == 0) { lmp->init(); update->integrate->setup(); - } else output->setup(0); + } else output->setup(1,0); timer->init(); timer->barrier_start(TIME_LOOP); diff --git a/src/verlet.cpp b/src/verlet.cpp index 6ed4f40b0c..dac1aab7dd 100644 --- a/src/verlet.cpp +++ b/src/verlet.cpp @@ -139,7 +139,7 @@ void Verlet::setup() if (force->newton) comm->reverse_comm(); modify->setup(vflag); - output->setup(1); + output->setup(1,1); update->setupflag = 0; }