Merge branch 'develop' into thermo-refactor-plus-yaml
This commit is contained in:
@ -63,7 +63,7 @@ Finish::Finish(LAMMPS *lmp) : Pointers(lmp) {}
|
||||
|
||||
void Finish::end(int flag)
|
||||
{
|
||||
int i,m,nneigh,nneighfull;
|
||||
int i,nneigh,nneighfull;
|
||||
int histo[10];
|
||||
int minflag,prdflag,tadflag,hyperflag;
|
||||
int timeflag,fftflag,histoflag,neighflag;
|
||||
@ -436,6 +436,7 @@ void Finish::end(int flag)
|
||||
time3d,fraction,flop3,flop1);
|
||||
}
|
||||
|
||||
nneigh = nneighfull = 0;
|
||||
if (histoflag) {
|
||||
std::string mesg = "\n";
|
||||
tmp = atom->nlocal;
|
||||
@ -456,27 +457,8 @@ void Finish::end(int flag)
|
||||
mesg += "\n";
|
||||
}
|
||||
|
||||
// find a non-skip neighbor list containing half pairwise interactions
|
||||
// count neighbors in that list for stats purposes
|
||||
// allow it to be Kokkos neigh list as well
|
||||
|
||||
for (m = 0; m < neighbor->old_nrequest; m++)
|
||||
if (neighbor->old_requests[m]->half &&
|
||||
neighbor->old_requests[m]->skip == 0 &&
|
||||
neighbor->lists[m] && neighbor->lists[m]->numneigh) break;
|
||||
|
||||
nneigh = 0;
|
||||
if (m < neighbor->old_nrequest) {
|
||||
if (!neighbor->lists[m]->kokkos) {
|
||||
int inum = neighbor->lists[m]->inum;
|
||||
int *ilist = neighbor->lists[m]->ilist;
|
||||
int *numneigh = neighbor->lists[m]->numneigh;
|
||||
for (i = 0; i < inum; i++)
|
||||
nneigh += numneigh[ilist[i]];
|
||||
} else if (lmp->kokkos) nneigh = lmp->kokkos->neigh_count(m);
|
||||
}
|
||||
|
||||
tmp = nneigh;
|
||||
tmp = nneigh = neighbor->get_nneigh_half();
|
||||
if (tmp < 0.0) tmp = 0.0;
|
||||
stats(1,&tmp,&ave,&max,&min,10,histo);
|
||||
if (me == 0) {
|
||||
mesg += fmt::format("Neighs: {:11.6} ave {:11.6g} max {:11.6g} min\n",ave,max,min);
|
||||
@ -485,33 +467,14 @@ void Finish::end(int flag)
|
||||
mesg += "\n";
|
||||
}
|
||||
|
||||
// find a non-skip neighbor list containing full pairwise interactions
|
||||
// count neighbors in that list for stats purposes
|
||||
// allow it to be Kokkos neigh list as well
|
||||
|
||||
for (m = 0; m < neighbor->old_nrequest; m++)
|
||||
if (neighbor->old_requests[m]->full &&
|
||||
neighbor->old_requests[m]->skip == 0) break;
|
||||
|
||||
nneighfull = 0;
|
||||
if (m < neighbor->old_nrequest) {
|
||||
if (!neighbor->lists[m]->kokkos && neighbor->lists[m]->numneigh) {
|
||||
int inum = neighbor->lists[m]->inum;
|
||||
int *ilist = neighbor->lists[m]->ilist;
|
||||
int *numneigh = neighbor->lists[m]->numneigh;
|
||||
for (i = 0; i < inum; i++)
|
||||
nneighfull += numneigh[ilist[i]];
|
||||
} else if (lmp->kokkos)
|
||||
nneighfull = lmp->kokkos->neigh_count(m);
|
||||
|
||||
tmp = nneighfull;
|
||||
tmp = nneighfull = neighbor->get_nneigh_full();
|
||||
if (tmp >= 0.0) {
|
||||
stats(1,&tmp,&ave,&max,&min,10,histo);
|
||||
if (me == 0) {
|
||||
mesg += fmt::format("FullNghs: {:11.6} ave {:11.6g} max {:11.6g} min\n",ave,max,min);
|
||||
mesg += "Histogram:";
|
||||
for (i = 0; i < 10; i++) mesg += fmt::format(" {}",histo[i]);
|
||||
mesg += "\n";
|
||||
|
||||
}
|
||||
}
|
||||
if (me == 0) utils::logmesg(lmp,mesg);
|
||||
@ -571,9 +534,7 @@ void Finish::end(int flag)
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Finish::stats(int n, double *data,
|
||||
double *pave, double *pmax, double *pmin,
|
||||
int nhisto, int *histo)
|
||||
void Finish::stats(int n, double *data, double *pave, double *pmax, double *pmin, int nhisto, int *histo)
|
||||
{
|
||||
int i,m;
|
||||
int *histotmp;
|
||||
|
||||
Reference in New Issue
Block a user