mirror of https://github.com/lammps/lammps.git
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6476 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
f17f012bb8
commit
85aa73903c
|
@ -46,7 +46,6 @@ void Finish::end(int flag)
|
||||||
int loopflag,minflag,prdflag,tadflag,timeflag,fftflag,histoflag,neighflag;
|
int loopflag,minflag,prdflag,tadflag,timeflag,fftflag,histoflag,neighflag;
|
||||||
double time,tmp,ave,max,min;
|
double time,tmp,ave,max,min;
|
||||||
double time_loop,time_other;
|
double time_loop,time_other;
|
||||||
bigint natoms;
|
|
||||||
|
|
||||||
int me,nprocs;
|
int me,nprocs;
|
||||||
MPI_Comm_rank(world,&me);
|
MPI_Comm_rank(world,&me);
|
||||||
|
@ -83,20 +82,16 @@ void Finish::end(int flag)
|
||||||
time_loop = tmp/nprocs;
|
time_loop = tmp/nprocs;
|
||||||
|
|
||||||
// overall loop time
|
// overall loop time
|
||||||
// use actual natoms, in case atoms were lost
|
|
||||||
|
|
||||||
bigint nblocal = atom->nlocal;
|
|
||||||
MPI_Allreduce(&nblocal,&natoms,1,MPI_LMP_BIGINT,MPI_SUM,world);
|
|
||||||
|
|
||||||
if (me == 0) {
|
if (me == 0) {
|
||||||
if (screen) fprintf(screen,
|
if (screen) fprintf(screen,
|
||||||
"Loop time of %g on %d procs for %d steps with "
|
"Loop time of %g on %d procs for %d steps with "
|
||||||
BIGINT_FORMAT " atoms\n",
|
BIGINT_FORMAT " atoms\n",
|
||||||
time_loop,nprocs,update->nsteps,natoms);
|
time_loop,nprocs,update->nsteps,atom->natoms);
|
||||||
if (logfile) fprintf(logfile,
|
if (logfile) fprintf(logfile,
|
||||||
"Loop time of %g on %d procs for %d steps with "
|
"Loop time of %g on %d procs for %d steps with "
|
||||||
BIGINT_FORMAT " atoms\n",
|
BIGINT_FORMAT " atoms\n",
|
||||||
time_loop,nprocs,update->nsteps,natoms);
|
time_loop,nprocs,update->nsteps,atom->natoms);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (time_loop == 0.0) time_loop = 1.0;
|
if (time_loop == 0.0) time_loop = 1.0;
|
||||||
|
@ -585,9 +580,11 @@ void Finish::end(int flag)
|
||||||
fprintf(screen,
|
fprintf(screen,
|
||||||
"Total # of neighbors = %d\n",static_cast<int> (nall));
|
"Total # of neighbors = %d\n",static_cast<int> (nall));
|
||||||
else fprintf(screen,"Total # of neighbors = %g\n",nall);
|
else fprintf(screen,"Total # of neighbors = %g\n",nall);
|
||||||
if (natoms > 0) fprintf(screen,"Ave neighs/atom = %g\n",nall/natoms);
|
if (atom->natoms > 0)
|
||||||
if (atom->molecular && natoms > 0)
|
fprintf(screen,"Ave neighs/atom = %g\n",nall/atom->natoms);
|
||||||
fprintf(screen,"Ave special neighs/atom = %g\n",nspec_all/natoms);
|
if (atom->molecular && atom->natoms > 0)
|
||||||
|
fprintf(screen,"Ave special neighs/atom = %g\n",
|
||||||
|
nspec_all/atom->natoms);
|
||||||
fprintf(screen,"Neighbor list builds = %d\n",neighbor->ncalls);
|
fprintf(screen,"Neighbor list builds = %d\n",neighbor->ncalls);
|
||||||
fprintf(screen,"Dangerous builds = %d\n",neighbor->ndanger);
|
fprintf(screen,"Dangerous builds = %d\n",neighbor->ndanger);
|
||||||
}
|
}
|
||||||
|
@ -596,9 +593,11 @@ void Finish::end(int flag)
|
||||||
fprintf(logfile,
|
fprintf(logfile,
|
||||||
"Total # of neighbors = %d\n",static_cast<int> (nall));
|
"Total # of neighbors = %d\n",static_cast<int> (nall));
|
||||||
else fprintf(logfile,"Total # of neighbors = %g\n",nall);
|
else fprintf(logfile,"Total # of neighbors = %g\n",nall);
|
||||||
if (natoms > 0) fprintf(logfile,"Ave neighs/atom = %g\n",nall/natoms);
|
if (atom->natoms > 0)
|
||||||
if (atom->molecular && natoms > 0)
|
fprintf(logfile,"Ave neighs/atom = %g\n",nall/atom->natoms);
|
||||||
fprintf(logfile,"Ave special neighs/atom = %g\n",nspec_all/natoms);
|
if (atom->molecular && atom->natoms > 0)
|
||||||
|
fprintf(logfile,"Ave special neighs/atom = %g\n",
|
||||||
|
nspec_all/atom->natoms);
|
||||||
fprintf(logfile,"Neighbor list builds = %d\n",neighbor->ncalls);
|
fprintf(logfile,"Neighbor list builds = %d\n",neighbor->ncalls);
|
||||||
fprintf(logfile,"Dangerous builds = %d\n",neighbor->ndanger);
|
fprintf(logfile,"Dangerous builds = %d\n",neighbor->ndanger);
|
||||||
}
|
}
|
||||||
|
|
|
@ -372,7 +372,10 @@ bigint Thermo::lost_check()
|
||||||
// if not checking or already warned, just return
|
// if not checking or already warned, just return
|
||||||
|
|
||||||
if (lostflag == IGNORE) return ntotal;
|
if (lostflag == IGNORE) return ntotal;
|
||||||
if (lostflag == WARN && lostbefore == 1) return ntotal;
|
if (lostflag == WARN && lostbefore == 1) {
|
||||||
|
atom->natoms = ntotal;
|
||||||
|
return ntotal;
|
||||||
|
}
|
||||||
|
|
||||||
// error message
|
// error message
|
||||||
|
|
||||||
|
@ -391,6 +394,8 @@ bigint Thermo::lost_check()
|
||||||
"Lost atoms: original " BIGINT_FORMAT " current " BIGINT_FORMAT,
|
"Lost atoms: original " BIGINT_FORMAT " current " BIGINT_FORMAT,
|
||||||
atom->natoms,ntotal);
|
atom->natoms,ntotal);
|
||||||
if (me == 0) error->warning(str,0);
|
if (me == 0) error->warning(str,0);
|
||||||
|
|
||||||
|
atom->natoms = ntotal;
|
||||||
lostbefore = 1;
|
lostbefore = 1;
|
||||||
return ntotal;
|
return ntotal;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue