Merge branch 'develop' into type-labels

This commit is contained in:
Jacob Gissinger
2022-08-08 17:16:50 -04:00
committed by GitHub
4100 changed files with 378596 additions and 127634 deletions

View File

@ -119,8 +119,7 @@ void WriteRestart::command(int narg, char **arg)
/* ---------------------------------------------------------------------- */
void WriteRestart::multiproc_options(int multiproc_caller, int mpiioflag_caller,
int narg, char **arg)
void WriteRestart::multiproc_options(int multiproc_caller, int mpiioflag_caller, int narg, char **arg)
{
multiproc = multiproc_caller;
mpiioflag = mpiioflag_caller;
@ -128,14 +127,12 @@ void WriteRestart::multiproc_options(int multiproc_caller, int mpiioflag_caller,
// error checks
if (multiproc && mpiioflag)
error->all(FLERR,
"Restart file MPI-IO output not allowed with % in filename");
error->all(FLERR,"Restart file MPI-IO output not allowed with % in filename");
if (mpiioflag) {
mpiio = new RestartMPIIO(lmp);
if (!mpiio->mpiio_exists)
error->all(FLERR,"Writing to MPI-IO filename when "
"MPIIO package is not installed");
error->all(FLERR,"Writing to MPI-IO filename when MPIIO package is not installed");
}
// defaults for multiproc file writing
@ -159,8 +156,7 @@ void WriteRestart::multiproc_options(int multiproc_caller, int mpiioflag_caller,
if (strcmp(arg[iarg],"fileper") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal write_restart command");
if (!multiproc)
error->all(FLERR,"Cannot use write_restart fileper "
"without % in restart file name");
error->all(FLERR,"Cannot use write_restart fileper without % in restart file name");
int nper = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
if (nper <= 0) error->all(FLERR,"Illegal write_restart command");
@ -177,8 +173,7 @@ void WriteRestart::multiproc_options(int multiproc_caller, int mpiioflag_caller,
} else if (strcmp(arg[iarg],"nfile") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal write_restart command");
if (!multiproc)
error->all(FLERR,"Cannot use write_restart nfile "
"without % in restart file name");
error->all(FLERR,"Cannot use write_restart nfile without % in restart file name");
int nfile = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
if (nfile <= 0) error->all(FLERR,"Illegal write_restart command");
nfile = MIN(nfile,nprocs);
@ -511,6 +506,11 @@ void WriteRestart::header()
write_bigint(NTRIS,atom->ntris);
write_bigint(NBODIES,atom->nbodies);
// write out current simulation time. added 3 May 2022
write_bigint(ATIMESTEP,update->atimestep);
write_double(ATIME,update->atime);
// -1 flag signals end of header
int flag = -1;