git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5504 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2011-01-07 21:42:19 +00:00
parent beabb5e05a
commit 140cdf9485
52 changed files with 417 additions and 220 deletions

View File

@ -241,15 +241,22 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator)
}
}
// check datatype sizes
// check datatype settings in lmptype.h
if (sizeof(bigint) != 8)
error->all("No support for 8-byte unsigned integers");
if (sizeof(smallint) != sizeof(int))
error->all("Smallint setting in lmptype.h is invalid");
if (sizeof(tagint) < sizeof(smallint))
error->all("Tagint setting in lmptype.h is invalid");
if (sizeof(bigint) < sizeof(tagint))
error->all("Bigint setting in lmptype.h is invalid");
int mpisize;
MPI_Type_size(MPI_LMP_TAGINT,&mpisize);
if (mpisize != sizeof(tagint))
error->all("MPI_LMP_TAGINT and tagint in lmptype.h are not compatible");
MPI_Type_size(MPI_LMP_BIGINT,&mpisize);
if (mpisize != 8)
error->all("MPI_LMP_BIGINT is not 8-byte data type");
if (mpisize != sizeof(bigint))
error->all("MPI_LMP_BIGINT and bigint in lmptype.h are not compatible");
// allocate input class now that MPI is fully setup