forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13937 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
962dd0da74
commit
ce59e32d1c
|
@ -295,7 +295,7 @@ void FixGPU::post_force(int vflag)
|
|||
force->pair->virial[5] += lvirial[5];
|
||||
|
||||
if (force->pair->vflag_fdotr) force->pair->virial_fdotr_compute();
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
|
|
@ -107,7 +107,7 @@ void VerletKokkos::setup()
|
|||
atomKK->sync(force->pair->execution_space,force->pair->datamask_read);
|
||||
atomKK->modified(force->pair->execution_space,force->pair->datamask_modify);
|
||||
force->pair->compute(eflag,vflag);
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
else if (force->pair) force->pair->compute_dummy(eflag,vflag);
|
||||
|
||||
|
@ -133,7 +133,7 @@ void VerletKokkos::setup()
|
|||
atomKK->modified(force->improper->execution_space,force->improper->datamask_modify);
|
||||
force->improper->compute(eflag,vflag);
|
||||
}
|
||||
timer->stamp(TIME_BOND);
|
||||
timer->stamp(Timer::BOND);
|
||||
}
|
||||
|
||||
if(force->kspace) {
|
||||
|
@ -142,7 +142,7 @@ void VerletKokkos::setup()
|
|||
atomKK->sync(force->kspace->execution_space,force->kspace->datamask_read);
|
||||
atomKK->modified(force->kspace->execution_space,force->kspace->datamask_modify);
|
||||
force->kspace->compute(eflag,vflag);
|
||||
timer->stamp(TIME_KSPACE);
|
||||
timer->stamp(Timer::KSPACE);
|
||||
} else force->kspace->compute_dummy(eflag,vflag);
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ void VerletKokkos::setup_minimal(int flag)
|
|||
atomKK->sync(force->pair->execution_space,force->pair->datamask_read);
|
||||
atomKK->modified(force->pair->execution_space,force->pair->datamask_modify);
|
||||
force->pair->compute(eflag,vflag);
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
else if (force->pair) force->pair->compute_dummy(eflag,vflag);
|
||||
|
||||
|
@ -235,7 +235,7 @@ void VerletKokkos::setup_minimal(int flag)
|
|||
atomKK->modified(force->improper->execution_space,force->improper->datamask_modify);
|
||||
force->improper->compute(eflag,vflag);
|
||||
}
|
||||
timer->stamp(TIME_BOND);
|
||||
timer->stamp(Timer::BOND);
|
||||
}
|
||||
|
||||
if(force->kspace) {
|
||||
|
@ -244,7 +244,7 @@ void VerletKokkos::setup_minimal(int flag)
|
|||
atomKK->sync(force->kspace->execution_space,force->kspace->datamask_read);
|
||||
atomKK->modified(force->kspace->execution_space,force->kspace->datamask_modify);
|
||||
force->kspace->compute(eflag,vflag);
|
||||
timer->stamp(TIME_KSPACE);
|
||||
timer->stamp(Timer::KSPACE);
|
||||
} else force->kspace->compute_dummy(eflag,vflag);
|
||||
}
|
||||
|
||||
|
@ -286,9 +286,11 @@ void VerletKokkos::run(int n)
|
|||
// initial time integration
|
||||
|
||||
ktimer.reset();
|
||||
timer->stamp();
|
||||
modify->initial_integrate(vflag);
|
||||
time += ktimer.seconds();
|
||||
if (n_post_integrate) modify->post_integrate();
|
||||
timer->stamp(Timer::MODIFY);
|
||||
|
||||
// regular communication vs neighbor list rebuild
|
||||
|
||||
|
@ -297,13 +299,17 @@ void VerletKokkos::run(int n)
|
|||
if (nflag == 0) {
|
||||
timer->stamp();
|
||||
comm->forward_comm();
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
} else {
|
||||
// added debug
|
||||
//atomKK->sync(Host,ALL_MASK);
|
||||
//atomKK->modified(Host,ALL_MASK);
|
||||
|
||||
if (n_pre_exchange) modify->pre_exchange();
|
||||
if (n_pre_exchange) {
|
||||
timer->stamp();
|
||||
modify->pre_exchange();
|
||||
timer->stamp(Timer::MODIFY);
|
||||
}
|
||||
// debug
|
||||
//atomKK->sync(Host,ALL_MASK);
|
||||
//atomKK->modified(Host,ALL_MASK);
|
||||
|
@ -330,10 +336,13 @@ void VerletKokkos::run(int n)
|
|||
|
||||
if (triclinic) domain->lamda2x(atomKK->nlocal+atomKK->nghost);
|
||||
|
||||
timer->stamp(TIME_COMM);
|
||||
if (n_pre_neighbor) modify->pre_neighbor();
|
||||
timer->stamp(Timer::COMM);
|
||||
if (n_pre_neighbor) {
|
||||
modify->pre_neighbor();
|
||||
timer->stamp(Timer::MODIFY);
|
||||
}
|
||||
neighbor->build();
|
||||
timer->stamp(TIME_NEIGHBOR);
|
||||
timer->stamp(Timer::NEIGH);
|
||||
}
|
||||
|
||||
// force computations
|
||||
|
@ -342,19 +351,24 @@ void VerletKokkos::run(int n)
|
|||
// and Pair:ev_tally() needs to be called before any tallying
|
||||
|
||||
force_clear();
|
||||
|
||||
timer->stamp();
|
||||
|
||||
// added for debug
|
||||
//atomKK->k_x.sync<LMPHostType>();
|
||||
//atomKK->k_f.sync<LMPHostType>();
|
||||
//atomKK->k_f.modify<LMPHostType>();
|
||||
if (n_pre_force) modify->pre_force(vflag);
|
||||
if (n_pre_force) {
|
||||
modify->pre_force(vflag);
|
||||
timer->stamp(Timer::MODIFY);
|
||||
}
|
||||
|
||||
timer->stamp();
|
||||
|
||||
if (pair_compute_flag) {
|
||||
atomKK->sync(force->pair->execution_space,force->pair->datamask_read);
|
||||
atomKK->modified(force->pair->execution_space,force->pair->datamask_modify);
|
||||
force->pair->compute(eflag,vflag);
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
|
||||
if (atomKK->molecular) {
|
||||
|
@ -378,20 +392,20 @@ void VerletKokkos::run(int n)
|
|||
atomKK->modified(force->improper->execution_space,force->improper->datamask_modify);
|
||||
force->improper->compute(eflag,vflag);
|
||||
}
|
||||
timer->stamp(TIME_BOND);
|
||||
timer->stamp(Timer::BOND);
|
||||
}
|
||||
|
||||
if (kspace_compute_flag) {
|
||||
atomKK->sync(force->kspace->execution_space,force->kspace->datamask_read);
|
||||
atomKK->modified(force->kspace->execution_space,force->kspace->datamask_modify);
|
||||
force->kspace->compute(eflag,vflag);
|
||||
timer->stamp(TIME_KSPACE);
|
||||
timer->stamp(Timer::KSPACE);
|
||||
}
|
||||
|
||||
// reverse communication of forces
|
||||
|
||||
if (force->newton) comm->reverse_comm();
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
|
||||
// force modifications, final time integration, diagnostics
|
||||
|
||||
|
@ -400,6 +414,7 @@ void VerletKokkos::run(int n)
|
|||
if (n_post_force) modify->post_force(vflag);
|
||||
modify->final_integrate();
|
||||
if (n_end_of_step) modify->end_of_step();
|
||||
timer->stamp(Timer::MODIFY);
|
||||
|
||||
time += ktimer.seconds();
|
||||
|
||||
|
@ -410,7 +425,7 @@ void VerletKokkos::run(int n)
|
|||
|
||||
timer->stamp();
|
||||
output->write(ntimestep);
|
||||
timer->stamp(TIME_OUTPUT);
|
||||
timer->stamp(Timer::OUTPUT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ void FixTuneKspace::pre_exchange()
|
|||
adjust_rcut(time);
|
||||
}
|
||||
|
||||
last_spcpu = timer->elapsed(TIME_LOOP);
|
||||
last_spcpu = timer->elapsed(Timer::TOTAL);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
@ -177,7 +177,7 @@ double FixTuneKspace::get_timing_info()
|
|||
dvalue = 0.0;
|
||||
firststep = 1;
|
||||
} else {
|
||||
new_cpu = timer->elapsed(TIME_LOOP);
|
||||
new_cpu = timer->elapsed(Timer::TOTAL);
|
||||
double cpu_diff = new_cpu - last_spcpu;
|
||||
int step_diff = new_step - last_step;
|
||||
if (step_diff > 0.0) dvalue = cpu_diff/step_diff;
|
||||
|
|
|
@ -232,7 +232,7 @@ void NEB::run()
|
|||
// damped dynamic min styles insure all replicas converge together
|
||||
|
||||
timer->init();
|
||||
timer->barrier_start(TIME_LOOP);
|
||||
timer->barrier_start();
|
||||
|
||||
while (update->minimize->niter < n1steps) {
|
||||
update->minimize->run(nevery);
|
||||
|
@ -240,7 +240,7 @@ void NEB::run()
|
|||
if (update->minimize->stop_condition) break;
|
||||
}
|
||||
|
||||
timer->barrier_stop(TIME_LOOP);
|
||||
timer->barrier_stop();
|
||||
|
||||
update->minimize->cleanup();
|
||||
|
||||
|
@ -302,7 +302,7 @@ void NEB::run()
|
|||
// damped dynamic min styles insure all replicas converge together
|
||||
|
||||
timer->init();
|
||||
timer->barrier_start(TIME_LOOP);
|
||||
timer->barrier_start();
|
||||
|
||||
while (update->minimize->niter < n2steps) {
|
||||
update->minimize->run(nevery);
|
||||
|
@ -310,7 +310,7 @@ void NEB::run()
|
|||
if (update->minimize->stop_condition) break;
|
||||
}
|
||||
|
||||
timer->barrier_stop(TIME_LOOP);
|
||||
timer->barrier_stop();
|
||||
|
||||
update->minimize->cleanup();
|
||||
|
||||
|
|
|
@ -278,8 +278,8 @@ void PRD::command(int narg, char **arg)
|
|||
share_event(0,0,0);
|
||||
|
||||
timer->init();
|
||||
timer->barrier_start(TIME_LOOP);
|
||||
time_start = timer->array[TIME_LOOP];
|
||||
timer->barrier_start();
|
||||
time_start = timer->get_wall(Timer::TOTAL);
|
||||
|
||||
log_event();
|
||||
|
||||
|
@ -305,8 +305,8 @@ void PRD::command(int narg, char **arg)
|
|||
time_dephase = time_dynamics = time_quench = time_comm = time_output = 0.0;
|
||||
bigint clock = 0;
|
||||
|
||||
timer->barrier_start(TIME_LOOP);
|
||||
time_start = timer->array[TIME_LOOP];
|
||||
timer->barrier_start();
|
||||
time_start = timer->get_wall(Timer::TOTAL);
|
||||
|
||||
int istep = 0;
|
||||
|
||||
|
@ -386,7 +386,7 @@ void PRD::command(int narg, char **arg)
|
|||
lmp->init();
|
||||
update->integrate->setup();
|
||||
|
||||
timer->barrier_start(TIME_LOOP);
|
||||
timer->barrier_start();
|
||||
|
||||
if (t_corr > 0) replicate(ireplica);
|
||||
if (temp_flag == 0) {
|
||||
|
@ -396,16 +396,16 @@ void PRD::command(int narg, char **arg)
|
|||
universe->uworld);
|
||||
}
|
||||
|
||||
timer->barrier_stop(TIME_LOOP);
|
||||
time_comm += timer->array[TIME_LOOP];
|
||||
timer->barrier_stop();
|
||||
time_comm += timer->get_wall(Timer::TOTAL);
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
if (stepmode == 0) istep = update->ntimestep - update->beginstep;
|
||||
|
@ -416,14 +416,14 @@ void PRD::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_dephase;
|
||||
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::DEPHASE, time_dephase);
|
||||
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;
|
||||
|
@ -431,14 +431,14 @@ void PRD::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);
|
||||
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 == 0) {
|
||||
|
@ -541,10 +541,10 @@ void PRD::dynamics(int nsteps, double &time_category)
|
|||
//modify->addstep_compute_all(update->ntimestep);
|
||||
bigint ncalls = neighbor->ncalls;
|
||||
|
||||
timer->barrier_start(TIME_LOOP);
|
||||
timer->barrier_start();
|
||||
update->integrate->run(nsteps);
|
||||
timer->barrier_stop(TIME_LOOP);
|
||||
time_category += timer->array[TIME_LOOP];
|
||||
timer->barrier_stop();
|
||||
time_category += timer->get_wall(Timer::TOTAL);
|
||||
|
||||
nbuild += neighbor->ncalls - ncalls;
|
||||
ndanger += neighbor->ndanger;
|
||||
|
@ -583,10 +583,10 @@ void PRD::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;
|
||||
|
@ -619,7 +619,7 @@ int PRD::check_event(int replica_num)
|
|||
if (compute_event->compute_scalar() > 0.0) worldflag = 1;
|
||||
if (replica_num >= 0 && replica_num != universe->iworld) worldflag = 0;
|
||||
|
||||
timer->barrier_start(TIME_LOOP);
|
||||
timer->barrier_start();
|
||||
|
||||
if (me == 0) MPI_Allreduce(&worldflag,&universeflag,1,
|
||||
MPI_INT,MPI_SUM,comm_replica);
|
||||
|
@ -655,8 +655,8 @@ int PRD::check_event(int replica_num)
|
|||
MPI_Bcast(&ireplica,1,MPI_INT,0,world);
|
||||
}
|
||||
|
||||
timer->barrier_stop(TIME_LOOP);
|
||||
time_comm += timer->array[TIME_LOOP];
|
||||
timer->barrier_stop();
|
||||
time_comm += timer->get_wall(Timer::TOTAL);
|
||||
|
||||
return ireplica;
|
||||
}
|
||||
|
@ -672,14 +672,14 @@ int PRD::check_event(int replica_num)
|
|||
|
||||
void PRD::share_event(int ireplica, int flag, int decrement)
|
||||
{
|
||||
timer->barrier_start(TIME_LOOP);
|
||||
timer->barrier_start();
|
||||
|
||||
// communicate quenched coords to all replicas and store as event
|
||||
// decrement event counter if flag = 0 since not really an event
|
||||
|
||||
replicate(ireplica);
|
||||
timer->barrier_stop(TIME_LOOP);
|
||||
time_comm += timer->array[TIME_LOOP];
|
||||
timer->barrier_stop();
|
||||
time_comm += timer->get_wall(Timer::TOTAL);
|
||||
|
||||
// adjust time for last correlated event check (not on first event)
|
||||
|
||||
|
@ -717,21 +717,21 @@ void PRD::share_event(int ireplica, int flag, int decrement)
|
|||
// 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);
|
||||
}
|
||||
|
||||
// restore and communicate hot coords to all replicas
|
||||
|
||||
fix_event->restore_state_quench();
|
||||
timer->barrier_start(TIME_LOOP);
|
||||
timer->barrier_start();
|
||||
replicate(ireplica);
|
||||
timer->barrier_stop(TIME_LOOP);
|
||||
time_comm += timer->array[TIME_LOOP];
|
||||
timer->barrier_stop();
|
||||
time_comm += timer->get_wall(Timer::TOTAL);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
@ -740,13 +740,13 @@ void PRD::share_event(int ireplica, int flag, int decrement)
|
|||
|
||||
void PRD::log_event()
|
||||
{
|
||||
timer->array[TIME_LOOP] = time_start;
|
||||
timer->set_wall(Timer::TOTAL, time_start);
|
||||
if (universe->me == 0) {
|
||||
if (universe->uscreen)
|
||||
fprintf(universe->uscreen,
|
||||
BIGINT_FORMAT " %.3f " BIGINT_FORMAT " %d %d %d %d\n",
|
||||
fix_event->event_timestep,
|
||||
timer->elapsed(TIME_LOOP),
|
||||
timer->elapsed(Timer::TOTAL),
|
||||
fix_event->clock,
|
||||
fix_event->event_number,fix_event->correlated_event,
|
||||
fix_event->ncoincident,
|
||||
|
@ -755,7 +755,7 @@ void PRD::log_event()
|
|||
fprintf(universe->ulogfile,
|
||||
BIGINT_FORMAT " %.3f " BIGINT_FORMAT " %d %d %d %d\n",
|
||||
fix_event->event_timestep,
|
||||
timer->elapsed(TIME_LOOP),
|
||||
timer->elapsed(Timer::TOTAL),
|
||||
fix_event->clock,
|
||||
fix_event->event_number,fix_event->correlated_event,
|
||||
fix_event->ncoincident,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -204,7 +204,7 @@ void Temper::command(int narg, char **arg)
|
|||
}
|
||||
|
||||
timer->init();
|
||||
timer->barrier_start(TIME_LOOP);
|
||||
timer->barrier_start();
|
||||
|
||||
for (int iswap = 0; iswap < nswaps; iswap++) {
|
||||
|
||||
|
@ -309,7 +309,7 @@ void Temper::command(int narg, char **arg)
|
|||
if (me_universe == 0) print_status();
|
||||
}
|
||||
|
||||
timer->barrier_stop(TIME_LOOP);
|
||||
timer->barrier_stop();
|
||||
|
||||
update->integrate->cleanup();
|
||||
|
||||
|
|
|
@ -279,7 +279,7 @@ void VerletSplit::run(int n)
|
|||
|
||||
MPI_Barrier(universe->uworld);
|
||||
timer->init();
|
||||
timer->barrier_start(TIME_LOOP);
|
||||
timer->barrier_start();
|
||||
|
||||
// setup initial Rspace <-> Kspace comm params
|
||||
|
||||
|
@ -325,7 +325,7 @@ void VerletSplit::run(int n)
|
|||
if (nflag == 0) {
|
||||
timer->stamp();
|
||||
comm->forward_comm();
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
} else {
|
||||
if (n_pre_exchange) modify->pre_exchange();
|
||||
if (triclinic) domain->x2lamda(atom->nlocal);
|
||||
|
@ -340,10 +340,10 @@ void VerletSplit::run(int n)
|
|||
if (sortflag && ntimestep >= atom->nextsort) atom->sort();
|
||||
comm->borders();
|
||||
if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
if (n_pre_neighbor) modify->pre_neighbor();
|
||||
neighbor->build();
|
||||
timer->stamp(TIME_NEIGHBOR);
|
||||
timer->stamp(Timer::NEIGH);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -363,7 +363,7 @@ void VerletSplit::run(int n)
|
|||
timer->stamp();
|
||||
if (force->pair) {
|
||||
force->pair->compute(eflag,vflag);
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
|
||||
if (atom->molecular) {
|
||||
|
@ -371,12 +371,12 @@ void VerletSplit::run(int n)
|
|||
if (force->angle) force->angle->compute(eflag,vflag);
|
||||
if (force->dihedral) force->dihedral->compute(eflag,vflag);
|
||||
if (force->improper) force->improper->compute(eflag,vflag);
|
||||
timer->stamp(TIME_BOND);
|
||||
timer->stamp(Timer::BOND);
|
||||
}
|
||||
|
||||
if (force->newton) {
|
||||
comm->reverse_comm();
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -388,14 +388,14 @@ void VerletSplit::run(int n)
|
|||
if (force->kspace) {
|
||||
timer->stamp();
|
||||
force->kspace->compute(eflag,vflag);
|
||||
timer->stamp(TIME_KSPACE);
|
||||
timer->stamp(Timer::KSPACE);
|
||||
}
|
||||
|
||||
// TIP4P PPPM puts forces on ghost atoms, so must reverse_comm()
|
||||
|
||||
if (tip4p_flag && force->newton) {
|
||||
comm->reverse_comm();
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -407,14 +407,16 @@ void VerletSplit::run(int n)
|
|||
// all output
|
||||
|
||||
if (master) {
|
||||
timer->stamp();
|
||||
if (n_post_force) modify->post_force(vflag);
|
||||
modify->final_integrate();
|
||||
if (n_end_of_step) modify->end_of_step();
|
||||
timer->stamp(Timer::MODIFY);
|
||||
|
||||
if (ntimestep == output->next) {
|
||||
timer->stamp();
|
||||
output->write(ntimestep);
|
||||
timer->stamp(TIME_OUTPUT);
|
||||
timer->stamp(Timer::OUTPUT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -486,7 +488,7 @@ void VerletSplit::rk_setup()
|
|||
atom->map_clear();
|
||||
comm->borders();
|
||||
if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -535,7 +537,7 @@ void VerletSplit::r2k_comm()
|
|||
if (tip4p_flag && !master) {
|
||||
timer->stamp();
|
||||
comm->forward_comm();
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -679,7 +679,7 @@ void VerletCuda::run(int n)
|
|||
my_gettime(CLOCK_REALTIME, &starttime);
|
||||
timer->stamp();
|
||||
comm->forward_comm(1);
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
my_gettime(CLOCK_REALTIME, &endtime);
|
||||
cuda->shared_data.cuda_timings.comm_forward_total +=
|
||||
endtime.tv_sec - starttime.tv_sec + 1.0 * (endtime.tv_nsec - starttime.tv_nsec) / 1000000000;
|
||||
|
@ -699,7 +699,7 @@ void VerletCuda::run(int n)
|
|||
//start force calculation asynchronus
|
||||
cuda->shared_data.comm.comm_phase = 1;
|
||||
force->pair->compute(eflag, vflag);
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
//CudaWrapper_Sync();
|
||||
|
||||
//download comm buffers from GPU, perform MPI communication and upload buffers again
|
||||
|
@ -708,11 +708,11 @@ void VerletCuda::run(int n)
|
|||
my_gettime(CLOCK_REALTIME, &endtime);
|
||||
cuda->shared_data.cuda_timings.comm_forward_total +=
|
||||
endtime.tv_sec - starttime.tv_sec + 1.0 * (endtime.tv_nsec - starttime.tv_nsec) / 1000000000;
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
|
||||
//wait for force calculation
|
||||
CudaWrapper_Sync();
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
|
||||
//unpack communication buffers
|
||||
my_gettime(CLOCK_REALTIME, &starttime);
|
||||
|
@ -721,7 +721,7 @@ void VerletCuda::run(int n)
|
|||
cuda->shared_data.cuda_timings.comm_forward_total +=
|
||||
endtime.tv_sec - starttime.tv_sec + 1.0 * (endtime.tv_nsec - starttime.tv_nsec) / 1000000000;
|
||||
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
MYDBG(printf("# CUDA VerletCuda::iterate: communicate done\n");)
|
||||
cuda->shared_data.cuda_timings.test1 +=
|
||||
endtotal.tv_sec - starttotal.tv_sec + 1.0 * (endtotal.tv_nsec - starttotal.tv_nsec) / 1000000000;
|
||||
|
@ -732,7 +732,7 @@ void VerletCuda::run(int n)
|
|||
my_gettime(CLOCK_REALTIME, &endtime);
|
||||
cuda->shared_data.cuda_timings.comm_forward_total +=
|
||||
endtime.tv_sec - starttime.tv_sec + 1.0 * (endtime.tv_nsec - starttime.tv_nsec) / 1000000000;
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
MYDBG(printf("# CUDA VerletCuda::iterate: communicate done\n");)
|
||||
}
|
||||
} else {
|
||||
|
@ -822,7 +822,7 @@ void VerletCuda::run(int n)
|
|||
cuda->shared_data.buffer_new = 2;
|
||||
|
||||
MYDBG(printf("# CUDA VerletCuda::iterate: neighbor build\n");)
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
my_gettime(CLOCK_REALTIME, &endtime);
|
||||
cuda->shared_data.cuda_timings.test2 +=
|
||||
endtime.tv_sec - starttime.tv_sec + 1.0 * (endtime.tv_nsec - starttime.tv_nsec) / 1000000000;
|
||||
|
@ -830,7 +830,7 @@ void VerletCuda::run(int n)
|
|||
//rebuild neighbor list
|
||||
test_atom(testatom, "Pre Neighbor");
|
||||
neighbor->build(0);
|
||||
timer->stamp(TIME_NEIGHBOR);
|
||||
timer->stamp(Timer::NEIGH);
|
||||
MYDBG(printf("# CUDA VerletCuda::iterate: neighbor done\n");)
|
||||
//if bonded interactions are used (in this case collect_forces_later is true), transfer data which only changes upon exchange/border routines from GPU to CPU
|
||||
if(cuda->shared_data.pair.collect_forces_later) {
|
||||
|
@ -917,7 +917,7 @@ void VerletCuda::run(int n)
|
|||
if(not cuda->shared_data.pair.collect_forces_later)
|
||||
CudaWrapper_Sync();
|
||||
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
|
||||
//calculate bonded interactions
|
||||
|
@ -927,11 +927,11 @@ void VerletCuda::run(int n)
|
|||
if(n_pre_force == 0) Verlet::force_clear();
|
||||
else cuda->cu_f->downloadAsync(2);
|
||||
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
|
||||
if(neighbor->lastcall == update->ntimestep) {
|
||||
neighbor->build_topology();
|
||||
timer->stamp(TIME_NEIGHBOR);
|
||||
timer->stamp(Timer::NEIGH);
|
||||
}
|
||||
|
||||
test_atom(testatom, "pre bond force");
|
||||
|
@ -944,7 +944,7 @@ void VerletCuda::run(int n)
|
|||
|
||||
if(force->improper) force->improper->compute(eflag, vflag);
|
||||
|
||||
timer->stamp(TIME_BOND);
|
||||
timer->stamp(Timer::BOND);
|
||||
}
|
||||
|
||||
//collect forces in case pair force and bonded interactions were overlapped, and either no KSPACE or a GPU KSPACE style is used
|
||||
|
@ -969,7 +969,7 @@ void VerletCuda::run(int n)
|
|||
|
||||
if(vflag) cuda->cu_virial->download();
|
||||
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
|
||||
my_gettime(CLOCK_REALTIME, &endtime);
|
||||
cuda->shared_data.cuda_timings.pair_force_collection +=
|
||||
|
@ -987,7 +987,7 @@ void VerletCuda::run(int n)
|
|||
if(n_pre_force == 0) Verlet::force_clear();
|
||||
else cuda->cu_f->downloadAsync(2);
|
||||
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
|
||||
force->kspace->compute(eflag, vflag);
|
||||
|
@ -995,7 +995,7 @@ void VerletCuda::run(int n)
|
|||
if((not cuda->shared_data.pppm.cudable_force) && (not cuda->shared_data.pair.collect_forces_later))
|
||||
cuda->uploadAll();
|
||||
|
||||
timer->stamp(TIME_KSPACE);
|
||||
timer->stamp(Timer::KSPACE);
|
||||
}
|
||||
|
||||
//collect forces in case pair forces and kspace was overlaped
|
||||
|
@ -1018,7 +1018,7 @@ void VerletCuda::run(int n)
|
|||
|
||||
if(vflag) cuda->cu_virial->download();
|
||||
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
|
||||
my_gettime(CLOCK_REALTIME, &endtime);
|
||||
cuda->shared_data.cuda_timings.pair_force_collection +=
|
||||
|
@ -1028,7 +1028,7 @@ void VerletCuda::run(int n)
|
|||
//send forces on ghost atoms back to other GPU: THIS SHOULD NEVER HAPPEN
|
||||
if(force->newton) {
|
||||
comm->reverse_comm();
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
}
|
||||
|
||||
test_atom(testatom, "post force");
|
||||
|
@ -1054,7 +1054,7 @@ void VerletCuda::run(int n)
|
|||
|
||||
timer->stamp();
|
||||
output->write(ntimestep);
|
||||
timer->stamp(TIME_OUTPUT);
|
||||
timer->stamp(Timer::OUTPUT);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -305,11 +305,11 @@ void ComputeFEP::compute_vector()
|
|||
timer->stamp();
|
||||
if (force->pair && force->pair->compute_flag) {
|
||||
force->pair->compute(eflag,vflag);
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
if (chgflag && force->kspace && force->kspace->compute_flag) {
|
||||
force->kspace->compute(eflag,vflag);
|
||||
timer->stamp(TIME_KSPACE);
|
||||
timer->stamp(Timer::KSPACE);
|
||||
}
|
||||
|
||||
// accumulate force/energy/virial from /gpu pair styles
|
||||
|
@ -322,11 +322,11 @@ void ComputeFEP::compute_vector()
|
|||
timer->stamp();
|
||||
if (force->pair && force->pair->compute_flag) {
|
||||
force->pair->compute(eflag,vflag);
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
if (chgflag && force->kspace && force->kspace->compute_flag) {
|
||||
force->kspace->compute(eflag,vflag);
|
||||
timer->stamp(TIME_KSPACE);
|
||||
timer->stamp(Timer::KSPACE);
|
||||
}
|
||||
|
||||
// accumulate force/energy/virial from /gpu pair styles
|
||||
|
|
|
@ -272,8 +272,10 @@ void VerletIntel::run(int n)
|
|||
|
||||
// initial time integration
|
||||
|
||||
timer->stamp();
|
||||
modify->initial_integrate(vflag);
|
||||
if (n_post_integrate) modify->post_integrate();
|
||||
timer->stamp(Timer::MODIFY);
|
||||
|
||||
// regular communication vs neighbor list rebuild
|
||||
|
||||
|
@ -282,9 +284,13 @@ void VerletIntel::run(int n)
|
|||
if (nflag == 0) {
|
||||
timer->stamp();
|
||||
comm->forward_comm();
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
} else {
|
||||
if (n_pre_exchange) modify->pre_exchange();
|
||||
if (n_pre_exchange) {
|
||||
timer->stamp();
|
||||
modify->pre_exchange();
|
||||
timer->stamp(Timer::MODIFY);
|
||||
}
|
||||
if (triclinic) domain->x2lamda(atom->nlocal);
|
||||
domain->pbc();
|
||||
if (domain->box_change) {
|
||||
|
@ -297,10 +303,13 @@ void VerletIntel::run(int n)
|
|||
if (sortflag && ntimestep >= atom->nextsort) atom->sort();
|
||||
comm->borders();
|
||||
if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
|
||||
timer->stamp(TIME_COMM);
|
||||
if (n_pre_neighbor) modify->pre_neighbor();
|
||||
timer->stamp(Timer::COMM);
|
||||
if (n_pre_neighbor) {
|
||||
modify->pre_neighbor();
|
||||
timer->stamp(Timer::MODIFY);
|
||||
}
|
||||
neighbor->build();
|
||||
timer->stamp(TIME_NEIGHBOR);
|
||||
timer->stamp(Timer::NEIGH);
|
||||
}
|
||||
|
||||
// force computations
|
||||
|
@ -309,13 +318,18 @@ void VerletIntel::run(int n)
|
|||
// and Pair:ev_tally() needs to be called before any tallying
|
||||
|
||||
force_clear();
|
||||
if (n_pre_force) modify->pre_force(vflag);
|
||||
|
||||
timer->stamp();
|
||||
|
||||
if (n_pre_force) {
|
||||
modify->pre_force(vflag);
|
||||
timer->stamp(Timer::MODIFY);
|
||||
}
|
||||
|
||||
|
||||
if (pair_compute_flag) {
|
||||
force->pair->compute(eflag,vflag);
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
|
||||
if (atom->molecular) {
|
||||
|
@ -323,18 +337,18 @@ void VerletIntel::run(int n)
|
|||
if (force->angle) force->angle->compute(eflag,vflag);
|
||||
if (force->dihedral) force->dihedral->compute(eflag,vflag);
|
||||
if (force->improper) force->improper->compute(eflag,vflag);
|
||||
timer->stamp(TIME_BOND);
|
||||
timer->stamp(Timer::BOND);
|
||||
}
|
||||
|
||||
if (kspace_compute_flag) {
|
||||
force->kspace->compute(eflag,vflag);
|
||||
timer->stamp(TIME_KSPACE);
|
||||
timer->stamp(Timer::KSPACE);
|
||||
}
|
||||
|
||||
#ifdef _LMP_INTEL_OFFLOAD
|
||||
if (sync_mode == 1) {
|
||||
fix_intel->sync_coprocessor();
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -342,13 +356,13 @@ void VerletIntel::run(int n)
|
|||
|
||||
if (force->newton) {
|
||||
comm->reverse_comm();
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
}
|
||||
|
||||
#ifdef _LMP_INTEL_OFFLOAD
|
||||
if (sync_mode == 2) {
|
||||
fix_intel->sync_coprocessor();
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -357,13 +371,14 @@ void VerletIntel::run(int n)
|
|||
if (n_post_force) modify->post_force(vflag);
|
||||
modify->final_integrate();
|
||||
if (n_end_of_step) modify->end_of_step();
|
||||
timer->stamp(Timer::MODIFY);
|
||||
|
||||
// all output
|
||||
|
||||
if (ntimestep == output->next) {
|
||||
timer->stamp();
|
||||
output->write(ntimestep);
|
||||
timer->stamp(TIME_OUTPUT);
|
||||
timer->stamp(Timer::OUTPUT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -283,7 +283,7 @@ void VerletSplitIntel::run(int n)
|
|||
|
||||
MPI_Barrier(universe->uworld);
|
||||
timer->init();
|
||||
timer->barrier_start(TIME_LOOP);
|
||||
timer->barrier_start();
|
||||
|
||||
// setup initial Rspace <-> Kspace comm params
|
||||
|
||||
|
@ -329,7 +329,7 @@ void VerletSplitIntel::run(int n)
|
|||
if (nflag == 0) {
|
||||
timer->stamp();
|
||||
comm->forward_comm();
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
} else {
|
||||
if (n_pre_exchange) modify->pre_exchange();
|
||||
if (triclinic) domain->x2lamda(atom->nlocal);
|
||||
|
@ -344,10 +344,10 @@ void VerletSplitIntel::run(int n)
|
|||
if (sortflag && ntimestep >= atom->nextsort) atom->sort();
|
||||
comm->borders();
|
||||
if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
if (n_pre_neighbor) modify->pre_neighbor();
|
||||
neighbor->build();
|
||||
timer->stamp(TIME_NEIGHBOR);
|
||||
timer->stamp(Timer::NEIGH);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -367,7 +367,7 @@ void VerletSplitIntel::run(int n)
|
|||
timer->stamp();
|
||||
if (force->pair) {
|
||||
force->pair->compute(eflag,vflag);
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
|
||||
if (atom->molecular) {
|
||||
|
@ -375,25 +375,25 @@ void VerletSplitIntel::run(int n)
|
|||
if (force->angle) force->angle->compute(eflag,vflag);
|
||||
if (force->dihedral) force->dihedral->compute(eflag,vflag);
|
||||
if (force->improper) force->improper->compute(eflag,vflag);
|
||||
timer->stamp(TIME_BOND);
|
||||
timer->stamp(Timer::BOND);
|
||||
}
|
||||
|
||||
#ifdef _LMP_INTEL_OFFLOAD
|
||||
if (sync_mode == 1) {
|
||||
fix_intel->sync_coprocessor();
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (force->newton) {
|
||||
comm->reverse_comm();
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
}
|
||||
|
||||
#ifdef _LMP_INTEL_OFFLOAD
|
||||
if (sync_mode == 2) {
|
||||
fix_intel->sync_coprocessor();
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -406,14 +406,14 @@ void VerletSplitIntel::run(int n)
|
|||
if (force->kspace) {
|
||||
timer->stamp();
|
||||
force->kspace->compute(eflag,vflag);
|
||||
timer->stamp(TIME_KSPACE);
|
||||
timer->stamp(Timer::KSPACE);
|
||||
}
|
||||
|
||||
// TIP4P PPPM puts forces on ghost atoms, so must reverse_comm()
|
||||
|
||||
if (tip4p_flag && force->newton) {
|
||||
comm->reverse_comm();
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -425,14 +425,16 @@ void VerletSplitIntel::run(int n)
|
|||
// all output
|
||||
|
||||
if (master) {
|
||||
timer->stamp();
|
||||
if (n_post_force) modify->post_force(vflag);
|
||||
modify->final_integrate();
|
||||
if (n_end_of_step) modify->end_of_step();
|
||||
timer->stamp(Timer::MODIFY);
|
||||
|
||||
if (ntimestep == output->next) {
|
||||
timer->stamp();
|
||||
output->write(ntimestep);
|
||||
timer->stamp(TIME_OUTPUT);
|
||||
timer->stamp(Timer::OUTPUT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -504,7 +506,7 @@ void VerletSplitIntel::rk_setup()
|
|||
atom->map_clear();
|
||||
comm->borders();
|
||||
if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -553,7 +555,7 @@ void VerletSplitIntel::r2k_comm()
|
|||
if (tip4p_flag && !master) {
|
||||
timer->stamp();
|
||||
comm->forward_comm();
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -61,6 +61,7 @@ void AngleCharmmOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -77,6 +78,7 @@ void AngleCharmmOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ void AngleClass2OMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -77,6 +78,7 @@ void AngleClass2OMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ void AngleCosineDeltaOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -77,6 +78,7 @@ void AngleCosineDeltaOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ void AngleCosineOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -77,6 +78,7 @@ void AngleCosineOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -63,6 +63,7 @@ void AngleCosinePeriodicOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -79,6 +80,7 @@ void AngleCosinePeriodicOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ void AngleCosineShiftExpOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -77,6 +78,7 @@ void AngleCosineShiftExpOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ void AngleCosineShiftOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -77,6 +78,7 @@ void AngleCosineShiftOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ void AngleCosineSquaredOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -77,6 +78,7 @@ void AngleCosineSquaredOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -65,6 +65,7 @@ void AngleDipoleOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -73,6 +74,7 @@ void AngleDipoleOMP::compute(int eflag, int vflag)
|
|||
else
|
||||
eval<0>(ifrom, ito, thr);
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
|
||||
|
|
|
@ -61,6 +61,7 @@ void AngleFourierOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -77,6 +78,7 @@ void AngleFourierOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ void AngleFourierSimpleOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -77,6 +78,7 @@ void AngleFourierSimpleOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ void AngleHarmonicOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -77,6 +78,7 @@ void AngleHarmonicOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ void AngleQuarticOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -77,6 +78,7 @@ void AngleQuarticOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -63,6 +63,7 @@ void AngleSDKOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -79,6 +80,7 @@ void AngleSDKOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ void AngleTableOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -77,6 +78,7 @@ void AngleTableOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ void BondClass2OMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -73,6 +74,7 @@ void BondClass2OMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ void BondFENEExpandOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -74,6 +75,7 @@ void BondFENEExpandOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ void BondFENEOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -74,6 +75,7 @@ void BondFENEOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -56,6 +56,7 @@ void BondHarmonicOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -72,6 +73,7 @@ void BondHarmonicOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -56,6 +56,7 @@ void BondHarmonicShiftCutOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -72,6 +73,7 @@ void BondHarmonicShiftCutOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -56,6 +56,7 @@ void BondHarmonicShiftOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -72,6 +73,7 @@ void BondHarmonicShiftOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -56,6 +56,7 @@ void BondMorseOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -72,6 +73,7 @@ void BondMorseOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -56,6 +56,7 @@ void BondNonlinearOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -72,6 +73,7 @@ void BondNonlinearOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ void BondQuarticOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -78,6 +79,7 @@ void BondQuarticOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -56,6 +56,7 @@ void BondTableOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -72,6 +73,7 @@ void BondTableOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -67,6 +67,7 @@ void DihedralCharmmOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -83,6 +84,7 @@ void DihedralCharmmOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ void DihedralClass2OMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -76,6 +77,7 @@ void DihedralClass2OMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ void DihedralCosineShiftExpOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -76,6 +77,7 @@ void DihedralCosineShiftExpOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ void DihedralFourierOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -77,6 +78,7 @@ void DihedralFourierOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ void DihedralHarmonicOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -76,6 +77,7 @@ void DihedralHarmonicOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -63,6 +63,7 @@ void DihedralHelixOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -79,6 +80,7 @@ void DihedralHelixOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ void DihedralMultiHarmonicOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -76,6 +77,7 @@ void DihedralMultiHarmonicOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ void DihedralNHarmonicOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -76,6 +77,7 @@ void DihedralNHarmonicOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ void DihedralOPLSOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -77,6 +78,7 @@ void DihedralOPLSOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ void DihedralQuadraticOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -77,6 +78,7 @@ void DihedralQuadraticOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -128,6 +128,7 @@ void DihedralTableOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -144,6 +145,7 @@ void DihedralTableOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -118,6 +118,7 @@ void EwaldOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, nlocal, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, 0, NULL, NULL, thr);
|
||||
|
||||
for (i = ifrom; i < ito; i++) {
|
||||
|
@ -205,6 +206,7 @@ void EwaldOMP::compute(int eflag, int vflag)
|
|||
for (j = 0; j < 6; j++) vatom[i][j] *= q[i]*qscale;
|
||||
}
|
||||
|
||||
thr->timer(Timer::KSPACE);
|
||||
reduce_thr(this, eflag,vflag,thr);
|
||||
} // end of omp parallel region
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "update.h"
|
||||
#include "integrate.h"
|
||||
#include "min.h"
|
||||
#include "timer.h"
|
||||
|
||||
#include "fix_omp.h"
|
||||
#include "thr_data.h"
|
||||
|
@ -65,7 +66,7 @@ static int get_tid()
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixOMP::FixOMP(LAMMPS *lmp, int narg, char **arg)
|
||||
FixOMP::FixOMP(LAMMPS *lmp, int narg, char **arg)
|
||||
: Fix(lmp, narg, arg),
|
||||
thr(NULL), last_omp_style(NULL), last_pair_hybrid(NULL),
|
||||
_nthr(-1), _neighbor(true), _mixed(false), _reduced(true)
|
||||
|
@ -130,7 +131,7 @@ FixOMP::FixOMP(LAMMPS *lmp, int narg, char **arg)
|
|||
fprintf(screen,"using %s neighbor list subroutines\n", nmode);
|
||||
fprintf(screen,"prefer %s precision OpenMP force kernels\n", kmode);
|
||||
}
|
||||
|
||||
|
||||
if (logfile) {
|
||||
if (reset_thr)
|
||||
fprintf(logfile,"set %d OpenMP thread(s) per MPI task\n", nthreads);
|
||||
|
@ -146,11 +147,12 @@ FixOMP::FixOMP(LAMMPS *lmp, int narg, char **arg)
|
|||
thr = new ThrData *[nthreads];
|
||||
_nthr = nthreads;
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none)
|
||||
#pragma omp parallel default(none) shared(lmp)
|
||||
#endif
|
||||
{
|
||||
const int tid = get_tid();
|
||||
thr[tid] = new ThrData(tid);
|
||||
Timer *t = new Timer(lmp);
|
||||
thr[tid] = new ThrData(tid,t);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -196,11 +198,17 @@ int FixOMP::setmask()
|
|||
void FixOMP::init()
|
||||
{
|
||||
// USER-OMP package cannot be used with atom_style template
|
||||
|
||||
if (atom->molecular == 2)
|
||||
if (atom->molecular == 2)
|
||||
error->all(FLERR,"USER-OMP package does not (yet) work with "
|
||||
"atom_style template");
|
||||
|
||||
// reset per thread timer
|
||||
for (int i=0; i < comm->nthreads; ++i) {
|
||||
thr[i]->_timer_active=1;
|
||||
thr[i]->timer(Timer::RESET);
|
||||
thr[i]->_timer_active=-1;
|
||||
}
|
||||
|
||||
if ((strstr(update->integrate_style,"respa") != NULL)
|
||||
&& (strstr(update->integrate_style,"respa/omp") == NULL))
|
||||
error->all(FLERR,"Need to use respa/omp for r-RESPA with /omp styles");
|
||||
|
@ -272,7 +280,7 @@ void FixOMP::init()
|
|||
CheckStyleForOMP(improper);
|
||||
CheckHybridForOMP(improper,Improper);
|
||||
}
|
||||
|
||||
|
||||
if (kspace_split >= 0) {
|
||||
CheckStyleForOMP(kspace);
|
||||
}
|
||||
|
@ -325,6 +333,15 @@ void FixOMP::set_neighbor_omp()
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void FixOMP::setup(int)
|
||||
{
|
||||
// we are post the force compute in setup. turn on timers
|
||||
for (int i=0; i < comm->nthreads; ++i)
|
||||
thr[i]->_timer_active=0;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
// adjust size and clear out per thread accumulator arrays
|
||||
void FixOMP::pre_force(int)
|
||||
{
|
||||
|
|
|
@ -36,6 +36,8 @@ class FixOMP : public Fix {
|
|||
virtual ~FixOMP();
|
||||
virtual int setmask();
|
||||
virtual void init();
|
||||
virtual void setup(int);
|
||||
virtual void min_setup(int flag) { setup(flag); }
|
||||
virtual void pre_force(int);
|
||||
|
||||
virtual void setup_pre_force(int vflag) { pre_force(vflag); }
|
||||
|
|
|
@ -60,6 +60,7 @@ void ImproperClass2OMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -76,6 +77,7 @@ void ImproperClass2OMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ void ImproperCossqOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -76,6 +77,7 @@ void ImproperCossqOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ void ImproperCvffOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -76,6 +77,7 @@ void ImproperCvffOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ void ImproperFourierOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -76,6 +77,7 @@ void ImproperFourierOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
@ -115,18 +117,18 @@ void ImproperFourierOMP::eval(int nfrom, int nto, ThrData * const thr)
|
|||
vb3z = x[i4][2] - x[i1][2];
|
||||
|
||||
add1_thr<EVFLAG,EFLAG,NEWTON_BOND>(i1,i2,i3,i4,type,
|
||||
vb1x,vb1y,vb1z,
|
||||
vb2x,vb2y,vb2z,
|
||||
vb1x,vb1y,vb1z,
|
||||
vb2x,vb2y,vb2z,
|
||||
vb3x,vb3y,vb3z,thr);
|
||||
if ( all[type] ) {
|
||||
add1_thr<EVFLAG,EFLAG,NEWTON_BOND>(i1,i4,i2,i3,type,
|
||||
vb3x,vb3y,vb3z,
|
||||
vb1x,vb1y,vb1z,
|
||||
vb2x,vb2y,vb2z,thr);
|
||||
vb1x,vb1y,vb1z,
|
||||
vb2x,vb2y,vb2z,thr);
|
||||
add1_thr<EVFLAG,EFLAG,NEWTON_BOND>(i1,i3,i4,i2,type,
|
||||
vb2x,vb2y,vb2z,
|
||||
vb2x,vb2y,vb2z,
|
||||
vb3x,vb3y,vb3z,
|
||||
vb1x,vb1y,vb1z,thr);
|
||||
vb1x,vb1y,vb1z,thr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ void ImproperHarmonicOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -76,6 +77,7 @@ void ImproperHarmonicOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ void ImproperRingOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -77,6 +78,7 @@ void ImproperRingOMP::compute(int eflag, int vflag)
|
|||
if (force->newton_bond) eval<0,0,1>(ifrom, ito, thr);
|
||||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
}
|
||||
} // end of omp parallel region
|
||||
|
|
|
@ -60,6 +60,7 @@ void ImproperUmbrellaOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (inum > 0) {
|
||||
|
@ -76,6 +77,7 @@ void ImproperUmbrellaOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::BOND);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -312,6 +312,7 @@ void MSMCGOMP::compute(int eflag, int vflag)
|
|||
const int tid = 0;
|
||||
#endif
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -66,6 +66,7 @@ void MSMOMP::compute(int eflag, int vflag)
|
|||
const int tid = 0;
|
||||
#endif
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
@ -74,12 +75,12 @@ void MSMOMP::compute(int eflag, int vflag)
|
|||
MSM direct part procedure for intermediate grid levels
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void MSMOMP::direct(int n)
|
||||
void MSMOMP::direct(int n)
|
||||
{
|
||||
// zero out electric potential
|
||||
|
||||
memset(&(egrid[n][nzlo_out[n]][nylo_out[n]][nxlo_out[n]]),0,ngrid[n]*sizeof(double));
|
||||
|
||||
|
||||
// zero out virial
|
||||
|
||||
if (vflag_atom) {
|
||||
|
@ -169,6 +170,8 @@ void MSMOMP::direct_eval(const int nn)
|
|||
int i,ifrom,ito,tid,icx,icy,icz,ix,iy,iz,k;
|
||||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, comm->nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
|
||||
for (i = ifrom; i < ito; ++i) {
|
||||
|
||||
|
@ -298,6 +301,7 @@ void MSMOMP::direct_eval(const int nn)
|
|||
}
|
||||
}
|
||||
}
|
||||
thr->timer(Timer::KSPACE);
|
||||
} // end of omp parallel region
|
||||
|
||||
if (EFLAG_GLOBAL || VFLAG_GLOBAL) {
|
||||
|
|
|
@ -18,14 +18,20 @@
|
|||
#include <omp.h>
|
||||
#endif
|
||||
|
||||
#include "modify.h"
|
||||
#include "timer.h"
|
||||
#include "fix_omp.h"
|
||||
#include "thr_data.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
// these macros hide some ugly and redundant OpenMP related stuff
|
||||
#if defined(_OPENMP)
|
||||
|
||||
// make sure we have at least one page for each thread
|
||||
#define NEIGH_OMP_INIT \
|
||||
const int nthreads = comm->nthreads;
|
||||
#define NEIGH_OMP_INIT \
|
||||
const int nthreads = comm->nthreads; \
|
||||
const int ifix = modify->find_fix("package_omp")
|
||||
|
||||
// get thread id and then assign each thread a fixed chunk of atoms
|
||||
#define NEIGH_OMP_SETUP(num) \
|
||||
|
@ -34,14 +40,18 @@ namespace LAMMPS_NS {
|
|||
const int idelta = 1 + num/nthreads; \
|
||||
const int ifrom = tid*idelta; \
|
||||
const int ito = ((ifrom + idelta) > num) \
|
||||
? num : (ifrom+idelta);
|
||||
? num : (ifrom+idelta); \
|
||||
FixOMP *fix = static_cast<FixOMP *>(modify->fix[ifix]); \
|
||||
ThrData *thr = fix->get_thr(tid); \
|
||||
thr->timer(Timer::START);
|
||||
|
||||
#define NEIGH_OMP_CLOSE }
|
||||
#define NEIGH_OMP_CLOSE \
|
||||
thr->timer(Timer::NEIGH); \
|
||||
}
|
||||
|
||||
#else /* !defined(_OPENMP) */
|
||||
|
||||
#define NEIGH_OMP_INIT \
|
||||
const int nthreads = comm->nthreads;
|
||||
#define NEIGH_OMP_INIT
|
||||
|
||||
#define NEIGH_OMP_SETUP(num) \
|
||||
const int tid = 0; \
|
||||
|
|
|
@ -71,6 +71,7 @@ void PairADPOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (force->newton_pair)
|
||||
|
@ -91,6 +92,7 @@ void PairADPOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
@ -200,6 +202,7 @@ void PairADPOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
|
||||
if (NEWTON_PAIR) {
|
||||
// reduce per thread density
|
||||
thr->timer(Timer::PAIR);
|
||||
data_reduce_thr(&(rho[0]), nall, comm->nthreads, 1, tid);
|
||||
data_reduce_thr(&(mu[0][0]), nall, comm->nthreads, 3, tid);
|
||||
data_reduce_thr(&(lambda[0][0]), nall, comm->nthreads, 6, tid);
|
||||
|
@ -217,6 +220,7 @@ void PairADPOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
|
||||
} else {
|
||||
// reduce per thread density
|
||||
thr->timer(Timer::PAIR);
|
||||
data_reduce_thr(&(rho[0]), nlocal, comm->nthreads, 1, tid);
|
||||
data_reduce_thr(&(mu[0][0]), nlocal, comm->nthreads, 3, tid);
|
||||
data_reduce_thr(&(lambda[0][0]), nlocal, comm->nthreads, 6, tid);
|
||||
|
|
|
@ -65,12 +65,14 @@ void PairAIREBOOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
FREBO_thr(ifrom,ito,evflag,eflag,vflag_atom,thr);
|
||||
if (ljflag) FLJ_thr(ifrom,ito,evflag,eflag,vflag_atom,thr);
|
||||
if (torflag) TORSION_thr(ifrom,ito,evflag,eflag,thr);
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ void PairBeckOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -69,6 +70,7 @@ void PairBeckOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ void PairBornCoulLongOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -75,6 +76,7 @@ void PairBornCoulLongOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ void PairBornCoulMSMOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -72,6 +73,7 @@ void PairBornCoulMSMOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ void PairBornCoulWolfOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -69,6 +70,7 @@ void PairBornCoulWolfOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ void PairBornOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -67,6 +68,7 @@ void PairBornOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -132,6 +132,7 @@ void PairBrownianOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
// generate a random number generator instance for
|
||||
|
@ -157,6 +158,7 @@ void PairBrownianOMP::compute(int eflag, int vflag)
|
|||
}
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -132,6 +132,7 @@ void PairBrownianPolyOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
// generate a random number generator instance for
|
||||
|
@ -150,6 +151,7 @@ void PairBrownianPolyOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ void PairBuckCoulCutOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -66,6 +67,7 @@ void PairBuckCoulCutOMP::compute(int eflag, int vflag)
|
|||
if (force->newton_pair) eval<0,0,1>(ifrom, ito, thr);
|
||||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ void PairBuckCoulLongOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -76,6 +77,7 @@ void PairBuckCoulLongOMP::compute(int eflag, int vflag)
|
|||
}
|
||||
|
||||
// reduce per thread forces into global force array.
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ void PairBuckCoulMSMOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -73,6 +74,7 @@ void PairBuckCoulMSMOMP::compute(int eflag, int vflag)
|
|||
}
|
||||
|
||||
// reduce per thread forces into global force array.
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -64,6 +64,7 @@ void PairBuckLongCoulLongOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (order6) {
|
||||
|
@ -302,8 +303,9 @@ void PairBuckLongCoulLongOMP::compute(int eflag, int vflag)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
@ -326,8 +328,10 @@ void PairBuckLongCoulLongOMP::compute_inner()
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(0, 0, nall, 0, 0, thr);
|
||||
eval_inner(ifrom, ito, thr);
|
||||
thr->timer(Timer::PAIR);
|
||||
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
@ -349,8 +353,10 @@ void PairBuckLongCoulLongOMP::compute_middle()
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(0, 0, nall, 0, 0, thr);
|
||||
eval_middle(ifrom, ito, thr);
|
||||
thr->timer(Timer::PAIR);
|
||||
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
@ -377,6 +383,7 @@ void PairBuckLongCoulLongOMP::compute_outer(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (order6) {
|
||||
|
@ -615,8 +622,9 @@ void PairBuckLongCoulLongOMP::compute_outer(int eflag, int vflag)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ void PairBuckOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -67,6 +68,7 @@ void PairBuckOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -86,6 +86,7 @@ void PairCDEAMOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (force->newton_pair)
|
||||
|
@ -128,12 +129,15 @@ void PairCDEAMOMP::compute(int eflag, int vflag)
|
|||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp master
|
||||
#endif
|
||||
error->all(FLERR,"unsupported eam/cd pair style variant");
|
||||
error->all(FLERR,"unsupported eam/cd pair style variant");
|
||||
}
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
@ -227,6 +231,7 @@ void PairCDEAMOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
|
||||
if (NEWTON_PAIR) {
|
||||
// reduce per thread density
|
||||
thr->timer(Timer::PAIR);
|
||||
data_reduce_thr(rho, nall, nthreads, 1, tid);
|
||||
data_reduce_thr(rhoB, nall, nthreads, 1, tid);
|
||||
if (CDEAMVERSION==1)
|
||||
|
@ -246,6 +251,7 @@ void PairCDEAMOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
|
||||
} else {
|
||||
// reduce per thread density
|
||||
thr->timer(Timer::PAIR);
|
||||
data_reduce_thr(rho, nlocal, nthreads, 1, tid);
|
||||
data_reduce_thr(rhoB, nlocal, nthreads, 1, tid);
|
||||
if (CDEAMVERSION==1)
|
||||
|
@ -346,6 +352,7 @@ void PairCDEAMOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
}
|
||||
|
||||
if (NEWTON_PAIR) {
|
||||
thr->timer(Timer::PAIR);
|
||||
data_reduce_thr(D_values, nall, nthreads, 1, tid);
|
||||
|
||||
// wait until reduction is complete
|
||||
|
@ -361,6 +368,7 @@ void PairCDEAMOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
sync_threads();
|
||||
|
||||
} else {
|
||||
thr->timer(Timer::PAIR);
|
||||
data_reduce_thr(D_values, nlocal, nthreads, 1, tid);
|
||||
|
||||
// wait until reduction is complete
|
||||
|
@ -410,7 +418,9 @@ void PairCDEAMOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
D_i = D_values[i] * h_prime_i / (2.0 * rho[i] * rho[i]);
|
||||
} else if(CDEAMVERSION == 2) {
|
||||
D_i = D_values[i];
|
||||
} else ASSERT(false);
|
||||
} else {
|
||||
ASSERT(false);
|
||||
}
|
||||
}
|
||||
|
||||
for(jj = 0; jj < jnum; jj++) {
|
||||
|
@ -456,8 +466,9 @@ void PairCDEAMOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
D_j = D_values[j] * h_prime_j / (2.0 * rho[j] * rho[j]);
|
||||
} else if(CDEAMVERSION == 2) {
|
||||
D_j = D_values[j];
|
||||
} else ASSERT(false);
|
||||
|
||||
} else {
|
||||
ASSERT(false);
|
||||
}
|
||||
double t2 = -rhoB[j];
|
||||
if(itype == speciesB) t2 += rho[j];
|
||||
fpair += D_j * rhoip * t2;
|
||||
|
@ -491,8 +502,9 @@ void PairCDEAMOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
double x_ij = 0.5 * (x_i + x_j);
|
||||
// Calculate h(x_ij) polynomial function.
|
||||
h = evalH(x_ij);
|
||||
} else ASSERT(false);
|
||||
|
||||
} else {
|
||||
ASSERT(false);
|
||||
}
|
||||
fpair += h * phip;
|
||||
phi *= h;
|
||||
}
|
||||
|
|
|
@ -55,6 +55,7 @@ void PairColloidOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -70,6 +71,7 @@ void PairColloidOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ void PairCombOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -73,6 +74,7 @@ void PairCombOMP::compute(int eflag, int vflag)
|
|||
}
|
||||
} else eval<0,0,0>(ifrom, ito, thr);
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ void PairCoulCutOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -67,6 +68,7 @@ void PairCoulCutOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ void PairCoulCutSoftOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -67,6 +68,7 @@ void PairCoulCutSoftOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ void PairCoulDebyeOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -67,6 +68,7 @@ void PairCoulDebyeOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ void PairCoulDielOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -67,6 +68,7 @@ void PairCoulDielOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ void PairCoulDSFOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -77,6 +78,7 @@ void PairCoulDSFOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ void PairCoulLongOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -76,6 +77,7 @@ void PairCoulLongOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ void PairCoulLongSoftOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -75,6 +76,7 @@ void PairCoulLongSoftOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ void PairCoulMSMOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -73,6 +74,7 @@ void PairCoulMSMOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ void PairCoulWolfOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -69,6 +70,7 @@ void PairCoulWolfOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -77,6 +77,7 @@ void PairDPDOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
// generate a random number generator instance for
|
||||
|
@ -98,6 +99,7 @@ void PairDPDOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -77,6 +77,7 @@ void PairDPDTstatOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
// generate a random number generator instance for
|
||||
|
@ -98,6 +99,7 @@ void PairDPDTstatOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -66,6 +66,7 @@ void PairEAMOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (force->newton_pair)
|
||||
|
@ -86,6 +87,7 @@ void PairEAMOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
@ -162,6 +164,7 @@ void PairEAMOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
|
||||
if (NEWTON_PAIR) {
|
||||
// reduce per thread density
|
||||
thr->timer(Timer::PAIR);
|
||||
data_reduce_thr(rho, nall, nthreads, 1, tid);
|
||||
|
||||
// wait until reduction is complete
|
||||
|
@ -176,6 +179,7 @@ void PairEAMOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
sync_threads();
|
||||
|
||||
} else {
|
||||
thr->timer(Timer::PAIR);
|
||||
data_reduce_thr(rho, nlocal, nthreads, 1, tid);
|
||||
|
||||
// wait until reduction is complete
|
||||
|
|
|
@ -59,6 +59,7 @@ void PairEDIPOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -71,6 +72,7 @@ void PairEDIPOMP::compute(int eflag, int vflag)
|
|||
}
|
||||
} else eval<0,0,0>(ifrom, ito, thr);
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -66,6 +66,7 @@ void PairEIMOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (force->newton_pair)
|
||||
|
@ -86,6 +87,7 @@ void PairEIMOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
@ -162,6 +164,7 @@ void PairEIMOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
// communicate and sum densities
|
||||
if (NEWTON_PAIR) {
|
||||
// reduce per thread density
|
||||
thr->timer(Timer::PAIR);
|
||||
data_reduce_thr(rho, nall, nthreads, 1, tid);
|
||||
|
||||
// wait until reduction is complete
|
||||
|
@ -176,6 +179,7 @@ void PairEIMOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
}
|
||||
|
||||
} else {
|
||||
thr->timer(Timer::PAIR);
|
||||
data_reduce_thr(rho, nlocal, nthreads, 1, tid);
|
||||
|
||||
// wait until reduction is complete
|
||||
|
@ -234,6 +238,7 @@ void PairEIMOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
// communicate and sum modified densities
|
||||
if (NEWTON_PAIR) {
|
||||
// reduce per thread density
|
||||
thr->timer(Timer::PAIR);
|
||||
data_reduce_thr(fp, nall, nthreads, 1, tid);
|
||||
|
||||
// wait until reduction is complete
|
||||
|
@ -248,6 +253,7 @@ void PairEIMOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
}
|
||||
|
||||
} else {
|
||||
thr->timer(Timer::PAIR);
|
||||
data_reduce_thr(fp, nlocal, nthreads, 1, tid);
|
||||
|
||||
// wait until reduction is complete
|
||||
|
|
|
@ -52,6 +52,7 @@ void PairGaussCutOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -67,6 +68,7 @@ void PairGaussCutOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ void PairGaussOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -69,6 +70,7 @@ void PairGaussOMP::compute(int eflag, int vflag)
|
|||
else occ = eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@ void PairGayBerneOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -69,6 +70,7 @@ void PairGayBerneOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -77,6 +77,7 @@ void PairGranHertzHistoryOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag)
|
||||
|
@ -86,6 +87,7 @@ void PairGranHertzHistoryOMP::compute(int eflag, int vflag)
|
|||
if (shearupdate) eval<0,1>(ifrom, ito, thr);
|
||||
else eval<0,0>(ifrom, ito, thr);
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
|
|
@ -79,6 +79,7 @@ void PairGranHookeHistoryOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag)
|
||||
|
@ -88,6 +89,7 @@ void PairGranHookeHistoryOMP::compute(int eflag, int vflag)
|
|||
if (shearupdate) eval<0,1>(ifrom, ito, thr);
|
||||
else eval<0,0>(ifrom, ito, thr);
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
@ -95,7 +97,7 @@ void PairGranHookeHistoryOMP::compute(int eflag, int vflag)
|
|||
template <int EVFLAG, int SHEARUPDATE>
|
||||
void PairGranHookeHistoryOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
{
|
||||
int i,j,ii,jj,jnum,itype,jtype;
|
||||
int i,j,ii,jj,jnum;
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,fx,fy,fz;
|
||||
double myshear[3];
|
||||
double radi,radj,radsum,rsq,r,rinv,rsqinv;
|
||||
|
|
|
@ -74,6 +74,7 @@ void PairGranHookeOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag)
|
||||
|
@ -83,6 +84,7 @@ void PairGranHookeOMP::compute(int eflag, int vflag)
|
|||
if (force->newton_pair) eval<0,1>(ifrom, ito, thr);
|
||||
else eval<0,0>(ifrom, ito, thr);
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
@ -90,7 +92,7 @@ void PairGranHookeOMP::compute(int eflag, int vflag)
|
|||
template <int EVFLAG, int NEWTON_PAIR>
|
||||
void PairGranHookeOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
{
|
||||
int i,j,ii,jj,jnum,itype,jtype;
|
||||
int i,j,ii,jj,jnum;
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,fx,fy,fz;
|
||||
double radi,radj,radsum,rsq,r,rinv,rsqinv;
|
||||
double vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3;
|
||||
|
|
|
@ -83,6 +83,7 @@ void PairHbondDreidingLJOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -98,6 +99,7 @@ void PairHbondDreidingLJOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
|
||||
|
|
|
@ -83,6 +83,7 @@ void PairHbondDreidingMorseOMP::compute(int eflag, int vflag)
|
|||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
|
@ -98,6 +99,7 @@ void PairHbondDreidingMorseOMP::compute(int eflag, int vflag)
|
|||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue