output number of processors when reporting a mismatch on reading a restart

This commit is contained in:
Axel Kohlmeyer 2019-09-18 14:35:12 -04:00
parent d4d5f241eb
commit df3fad3b49
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 6 additions and 2 deletions

View File

@ -734,8 +734,12 @@ void ReadRestart::header(int incompatible)
} else if (flag == NPROCS) {
nprocs_file = read_int();
if (nprocs_file != comm->nprocs && me == 0)
error->warning(FLERR,"Restart file used different # of processors");
if (nprocs_file != comm->nprocs && me == 0) {
char msg[128];
snprintf(msg,128,"Restart file used different # of processors: %d vs. %d",
nprocs_file,comm->nprocs);
error->warning(FLERR,msg);
}
// don't set procgrid, warn if different