From 15f1c2d9600562624fb9a9a82f61d4a5b080fceb Mon Sep 17 00:00:00 2001 From: Stan Gerald Moore Date: Thu, 18 Nov 2021 08:50:09 -0700 Subject: [PATCH] Fix inaccurate error message --- doc/src/dump_modify.rst | 4 +++- src/dump.cpp | 2 +- src/dump.h | 5 ++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/src/dump_modify.rst b/doc/src/dump_modify.rst index da7ccffeb2..88b375ecb6 100644 --- a/doc/src/dump_modify.rst +++ b/doc/src/dump_modify.rst @@ -561,7 +561,9 @@ The dump *local* style cannot be sorted by atom ID, since there are typically multiple lines of output per atom. Some dump styles, such as *dcd* and *xtc*, require sorting by atom ID to format the output file correctly. If multiple processors are writing the dump file, via -the "%" wildcard in the dump filename, then sorting cannot be +the "%" wildcard in the dump filename and the *nfile* or *fileper* +keywords are set to non-default values (i.e. the number of dump file +pieces is not equal to the number of procs), then sorting cannot be performed. .. note:: diff --git a/src/dump.cpp b/src/dump.cpp index 9ca7e61e76..2917099ff9 100644 --- a/src/dump.cpp +++ b/src/dump.cpp @@ -228,7 +228,7 @@ void Dump::init() if (sort_flag) { if (multiproc > 1) error->all(FLERR, - "Cannot dump sort when multiple dump files are written"); + "Cannot dump sort when 'nfile' or 'fileper' keywords are set to non-default values"); if (sortcol == 0 && atom->tag_enable == 0) error->all(FLERR,"Cannot dump sort on atom IDs with no atom IDs defined"); if (sortcol && sortcol > size_one) diff --git a/src/dump.h b/src/dump.h index 681ce88c96..468b007096 100644 --- a/src/dump.h +++ b/src/dump.h @@ -173,10 +173,9 @@ E: Dump file MPI-IO output not allowed with % in filename This is because a % signifies one file per processor and MPI-IO creates one large file for all processors. -E: Cannot dump sort when multiple dump files are written +E: Cannot dump sort when 'nfile' or 'fileper' keywords are set to non-default values -In this mode, each processor dumps its atoms to a file, so -no sorting is allowed. +Can only dump sort when the number of dump file pieces using % in filename equals the number of processors E: Cannot dump sort on atom IDs with no atom IDs defined