Add overflow check to dump_h5md
This commit is contained in:
@ -181,6 +181,7 @@ DumpH5MD::DumpH5MD(LAMMPS *lmp, int narg, char **arg) : Dump(lmp, narg, arg)
|
||||
// allocate global array for atom coords
|
||||
|
||||
bigint n = group->count(igroup);
|
||||
if ((bigint) domain->dimension*n > MAXSMALLINT) error->all(FLERR,"Too many atoms for dump h5md");
|
||||
natoms = static_cast<int> (n);
|
||||
|
||||
if (every_position>=0)
|
||||
|
||||
@ -90,6 +90,11 @@ E: Dump h5md requires sorting by atom ID
|
||||
|
||||
Use the dump_modify sort command to enable this.
|
||||
|
||||
E: Too many atoms for dump h5md
|
||||
|
||||
The system size must fit in a 32-bit integer to use this dump
|
||||
style.
|
||||
|
||||
E: Cannot use variable every setting for dump xtc
|
||||
|
||||
The format of this file requires snapshots at regular intervals.
|
||||
|
||||
Reference in New Issue
Block a user