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

This commit is contained in:
sjplimp
2013-12-06 22:44:55 +00:00
parent a7b689a403
commit f41d6124fb

View File

@ -128,11 +128,11 @@ void ReadRestart::command(int narg, char **arg)
magic_string(); magic_string();
endian(); endian();
int outofdate = version_numeric(); int incompatible = version_numeric();
// read header info which creates simulation box // read header info which creates simulation box
header(outofdate); header(incompatible);
domain->box_exist = 1; domain->box_exist = 1;
// problem setup using info from header // problem setup using info from header
@ -586,7 +586,7 @@ void ReadRestart::file_search(char *infile, char *outfile)
read header of restart file read header of restart file
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
void ReadRestart::header(int outofdate) void ReadRestart::header(int incompatible)
{ {
int px,py,pz; int px,py,pz;
int xperiodic,yperiodic,zperiodic; int xperiodic,yperiodic,zperiodic;
@ -605,8 +605,8 @@ void ReadRestart::header(int outofdate)
if (screen) fprintf(screen," restart file = %s, LAMMPS = %s\n", if (screen) fprintf(screen," restart file = %s, LAMMPS = %s\n",
version,universe->version); version,universe->version);
} }
if (outofdate) if (incompatible)
error->all(FLERR,"Restart file too old for current version to read"); error->all(FLERR,"Restart file incompatible with current version");
delete [] version; delete [] version;
// check lmptype.h sizes, error if different // check lmptype.h sizes, error if different
@ -957,7 +957,7 @@ int ReadRestart::version_numeric()
int vn; int vn;
if (me == 0) fread(&vn,sizeof(int),1,fp); if (me == 0) fread(&vn,sizeof(int),1,fp);
MPI_Bcast(&vn,1,MPI_INT,0,world); MPI_Bcast(&vn,1,MPI_INT,0,world);
if (vn < VERSION_NUMERIC) return 1; if (vn != VERSION_NUMERIC) return 1;
return 0; return 0;
} }