git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13937 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -255,8 +255,8 @@ void TAD::command(int narg, char **arg)
|
||||
quench();
|
||||
|
||||
timer->init();
|
||||
timer->barrier_start(TIME_LOOP);
|
||||
time_start = timer->array[TIME_LOOP];
|
||||
timer->barrier_start();
|
||||
time_start = timer->get_wall(Timer::TOTAL);
|
||||
fix_event->store_event_tad(update->ntimestep);
|
||||
log_event(0);
|
||||
fix_event->restore_state_quench();
|
||||
@ -275,8 +275,8 @@ void TAD::command(int narg, char **arg)
|
||||
nbuild = ndanger = 0;
|
||||
time_neb = time_dynamics = time_quench = time_comm = time_output = 0.0;
|
||||
|
||||
timer->barrier_start(TIME_LOOP);
|
||||
time_start = timer->array[TIME_LOOP];
|
||||
timer->barrier_start();
|
||||
time_start = timer->get_wall(Timer::TOTAL);
|
||||
|
||||
int confident_flag, event_flag;
|
||||
|
||||
@ -347,10 +347,10 @@ void TAD::command(int narg, char **arg)
|
||||
// write restart file of hot coords
|
||||
|
||||
if (restart_flag) {
|
||||
timer->barrier_start(TIME_LOOP);
|
||||
timer->barrier_start();
|
||||
output->write_restart(update->ntimestep);
|
||||
timer->barrier_stop(TIME_LOOP);
|
||||
time_output += timer->array[TIME_LOOP];
|
||||
timer->barrier_stop();
|
||||
time_output += timer->get_wall(Timer::TOTAL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -381,14 +381,14 @@ void TAD::command(int narg, char **arg)
|
||||
|
||||
// set total timers and counters so Finish() will process them
|
||||
|
||||
timer->array[TIME_LOOP] = time_start;
|
||||
timer->barrier_stop(TIME_LOOP);
|
||||
timer->set_wall(Timer::TOTAL, time_start);
|
||||
timer->barrier_stop();
|
||||
|
||||
timer->array[TIME_PAIR] = time_neb;
|
||||
timer->array[TIME_BOND] = time_dynamics;
|
||||
timer->array[TIME_KSPACE] = time_quench;
|
||||
timer->array[TIME_COMM] = time_comm;
|
||||
timer->array[TIME_OUTPUT] = time_output;
|
||||
timer->set_wall(Timer::NEB, time_neb);
|
||||
timer->set_wall(Timer::DYNAMICS, time_dynamics);
|
||||
timer->set_wall(Timer::QUENCH, time_quench);
|
||||
timer->set_wall(Timer::REPCOMM, time_comm);
|
||||
timer->set_wall(Timer::REPOUT, time_output);
|
||||
|
||||
neighbor->ncalls = nbuild;
|
||||
neighbor->ndanger = ndanger;
|
||||
@ -396,14 +396,14 @@ void TAD::command(int narg, char **arg)
|
||||
if (me_universe == 0) {
|
||||
if (universe->uscreen)
|
||||
fprintf(universe->uscreen,
|
||||
"Loop time of %g on %d procs for %d steps with " BIGINT_FORMAT
|
||||
"Loop time of %g on %d procs for %d steps with " BIGINT_FORMAT
|
||||
" atoms\n",
|
||||
timer->array[TIME_LOOP],nprocs_universe,nsteps,atom->natoms);
|
||||
if (universe->ulogfile)
|
||||
timer->get_wall(Timer::TOTAL),nprocs_universe,nsteps,atom->natoms);
|
||||
if (universe->ulogfile)
|
||||
fprintf(universe->ulogfile,
|
||||
"Loop time of %g on %d procs for %d steps with " BIGINT_FORMAT
|
||||
"Loop time of %g on %d procs for %d steps with " BIGINT_FORMAT
|
||||
" atoms\n",
|
||||
timer->array[TIME_LOOP],nprocs_universe,nsteps,atom->natoms);
|
||||
timer->get_wall(Timer::TOTAL),nprocs_universe,nsteps,atom->natoms);
|
||||
}
|
||||
|
||||
if (me_universe == 0) fclose(ulogfile_neb);
|
||||
@ -451,10 +451,10 @@ void TAD::dynamics()
|
||||
//modify->addstep_compute_all(update->ntimestep);
|
||||
int ncalls = neighbor->ncalls;
|
||||
|
||||
timer->barrier_start(TIME_LOOP);
|
||||
timer->barrier_start();
|
||||
update->integrate->run(t_event);
|
||||
timer->barrier_stop(TIME_LOOP);
|
||||
time_dynamics += timer->array[TIME_LOOP];
|
||||
timer->barrier_stop();
|
||||
time_dynamics += timer->get_wall(Timer::TOTAL);
|
||||
|
||||
nbuild += neighbor->ncalls - ncalls;
|
||||
ndanger += neighbor->ndanger;
|
||||
@ -493,10 +493,10 @@ void TAD::quench()
|
||||
|
||||
int ncalls = neighbor->ncalls;
|
||||
|
||||
timer->barrier_start(TIME_LOOP);
|
||||
timer->barrier_start();
|
||||
update->minimize->run(maxiter);
|
||||
timer->barrier_stop(TIME_LOOP);
|
||||
time_quench += timer->array[TIME_LOOP];
|
||||
timer->barrier_stop();
|
||||
time_quench += timer->get_wall(Timer::TOTAL);
|
||||
|
||||
if (neighbor->ncalls == ncalls) quench_reneighbor = 0;
|
||||
else quench_reneighbor = 1;
|
||||
@ -535,14 +535,14 @@ int TAD::check_event()
|
||||
|
||||
void TAD::log_event(int ievent)
|
||||
{
|
||||
timer->array[TIME_LOOP] = time_start;
|
||||
timer->set_wall(Timer::TOTAL, time_start);
|
||||
if (universe->me == 0) {
|
||||
double tfrac = 0.0;
|
||||
if (universe->uscreen)
|
||||
fprintf(universe->uscreen,
|
||||
BIGINT_FORMAT " %.3f %d %d %s %.3f %.3f %.3f %.3f\n",
|
||||
fix_event->event_timestep,
|
||||
timer->elapsed(TIME_LOOP),
|
||||
timer->elapsed(Timer::TOTAL),
|
||||
fix_event->event_number,ievent,
|
||||
"E ",
|
||||
fix_event->ebarrier,tfrac,
|
||||
@ -551,7 +551,7 @@ void TAD::log_event(int ievent)
|
||||
fprintf(universe->ulogfile,
|
||||
BIGINT_FORMAT " %.3f %d %d %s %.3f %.3f %.3f %.3f\n",
|
||||
fix_event->event_timestep,
|
||||
timer->elapsed(TIME_LOOP),
|
||||
timer->elapsed(Timer::TOTAL),
|
||||
fix_event->event_number,ievent,
|
||||
"E ",
|
||||
fix_event->ebarrier,tfrac,
|
||||
@ -563,12 +563,12 @@ void TAD::log_event(int ievent)
|
||||
// addstep_compute_all insures eng/virial are calculated if needed
|
||||
|
||||
if (output->ndump && universe->iworld == 0) {
|
||||
timer->barrier_start(TIME_LOOP);
|
||||
timer->barrier_start();
|
||||
modify->addstep_compute_all(update->ntimestep);
|
||||
update->integrate->setup_minimal(1);
|
||||
output->write_dump(update->ntimestep);
|
||||
timer->barrier_stop(TIME_LOOP);
|
||||
time_output += timer->array[TIME_LOOP];
|
||||
timer->barrier_stop();
|
||||
time_output += timer->get_wall(Timer::TOTAL);
|
||||
}
|
||||
|
||||
}
|
||||
@ -604,10 +604,10 @@ void TAD::options(int narg, char **arg)
|
||||
while (iarg < narg) {
|
||||
if (strcmp(arg[iarg],"min") == 0) {
|
||||
if (iarg+5 > narg) error->all(FLERR,"Illegal tad command");
|
||||
etol = atof(arg[iarg+1]);
|
||||
ftol = atof(arg[iarg+2]);
|
||||
maxiter = atoi(arg[iarg+3]);
|
||||
maxeval = atoi(arg[iarg+4]);
|
||||
etol = force->numeric(FLERR,arg[iarg+1]);
|
||||
ftol = force->numeric(FLERR,arg[iarg+2]);
|
||||
maxiter = force->inumeric(FLERR,arg[iarg+3]);
|
||||
maxeval = force->inumeric(FLERR,arg[iarg+4]);
|
||||
if (maxiter < 0 || maxeval < 0 ||
|
||||
etol < 0.0 || ftol < 0.0 )
|
||||
error->all(FLERR,"Illegal tad command");
|
||||
@ -615,11 +615,11 @@ void TAD::options(int narg, char **arg)
|
||||
|
||||
} else if (strcmp(arg[iarg],"neb") == 0) {
|
||||
if (iarg+6 > narg) error->all(FLERR,"Illegal tad command");
|
||||
etol_neb = atof(arg[iarg+1]);
|
||||
ftol_neb = atof(arg[iarg+2]);
|
||||
n1steps_neb = atoi(arg[iarg+3]);
|
||||
n2steps_neb = atoi(arg[iarg+4]);
|
||||
nevery_neb = atoi(arg[iarg+5]);
|
||||
etol_neb = force->numeric(FLERR,arg[iarg+1]);
|
||||
ftol_neb = force->numeric(FLERR,arg[iarg+2]);
|
||||
n1steps_neb = force->inumeric(FLERR,arg[iarg+3]);
|
||||
n2steps_neb = force->inumeric(FLERR,arg[iarg+4]);
|
||||
nevery_neb = force->inumeric(FLERR,arg[iarg+5]);
|
||||
if (etol_neb < 0.0 || ftol_neb < 0.0 ||
|
||||
n1steps_neb < 0 || n2steps_neb < 0 ||
|
||||
nevery_neb < 0) error->all(FLERR,"Illegal tad command");
|
||||
@ -753,10 +753,10 @@ void TAD::perform_neb(int ievent)
|
||||
// had to bypass timer interface
|
||||
// because timer->array is reset inside neb->run()
|
||||
|
||||
// timer->barrier_start(TIME_LOOP);
|
||||
// timer->barrier_start();
|
||||
// neb->run();
|
||||
// timer->barrier_stop(TIME_LOOP);
|
||||
// time_neb += timer->array[TIME_LOOP];
|
||||
// timer->barrier_stop();
|
||||
// time_neb += timer->get_wall(Timer::TOTAL);
|
||||
|
||||
MPI_Barrier(world);
|
||||
double time_tmp = MPI_Wtime();
|
||||
@ -977,7 +977,7 @@ void TAD::compute_tlo(int ievent)
|
||||
|
||||
// first-replica output about each event
|
||||
|
||||
timer->array[TIME_LOOP] = time_start;
|
||||
timer->set_wall(Timer::TOTAL, time_start);
|
||||
if (universe->me == 0) {
|
||||
double tfrac = 0.0;
|
||||
if (ievent > 0) tfrac = delthi/deltstop;
|
||||
@ -986,7 +986,7 @@ void TAD::compute_tlo(int ievent)
|
||||
fprintf(universe->uscreen,
|
||||
BIGINT_FORMAT " %.3f %d %d %s %.3f %.3f %.3f %.3f\n",
|
||||
fix_event_list[ievent]->event_timestep,
|
||||
timer->elapsed(TIME_LOOP),
|
||||
timer->elapsed(Timer::TOTAL),
|
||||
fix_event->event_number,
|
||||
ievent,statstr,ebarrier,tfrac,
|
||||
fix_event->tlo,deltlo);
|
||||
@ -995,7 +995,7 @@ void TAD::compute_tlo(int ievent)
|
||||
fprintf(universe->ulogfile,
|
||||
BIGINT_FORMAT " %.3f %d %d %s %.3f %.3f %.3f %.3f\n",
|
||||
fix_event_list[ievent]->event_timestep,
|
||||
timer->elapsed(TIME_LOOP),
|
||||
timer->elapsed(Timer::TOTAL),
|
||||
fix_event->event_number,
|
||||
ievent,statstr,ebarrier,tfrac,
|
||||
fix_event->tlo,deltlo);
|
||||
|
||||
Reference in New Issue
Block a user