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

This commit is contained in:
sjplimp
2012-10-19 15:50:04 +00:00
parent e4e9c4cb88
commit 0e28d227fe

View File

@ -417,6 +417,7 @@ int main (int narg, char **arg)
// if restart file contains '%', file = filename with % replaced by "base" // if restart file contains '%', file = filename with % replaced by "base"
// else file = single file // else file = single file
// open single restart file or base file for multiproc case // open single restart file or base file for multiproc case
// auto-detect whether byte swapping needs to be done as file is read
printf("Reading restart file ...\n"); printf("Reading restart file ...\n");
@ -434,18 +435,16 @@ int main (int narg, char **arg)
printf("ERROR: Cannot open restart file %s\n",basefile); printf("ERROR: Cannot open restart file %s\n",basefile);
return 1; return 1;
} }
swapflag = autodetect(&fp,basefile);
} else { } else {
fp = fopen(restartfile,"rb"); fp = fopen(restartfile,"rb");
if (fp == NULL) { if (fp == NULL) {
printf("ERROR: Cannot open restart file %s\n",restartfile); printf("ERROR: Cannot open restart file %s\n",restartfile);
return 1; return 1;
} }
swapflag = autodetect(&fp,restartfile);
} }
// auto-detect whether byte swapping needs to be done as file is read
swapflag = autodetect(&fp,restartfile);
// read beginning of restart file // read beginning of restart file
Data data; Data data;