git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6454 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -132,7 +132,7 @@ elif (test $1 = 0) then
|
|||||||
rm -f ../pair_lj_class2_gpu.h
|
rm -f ../pair_lj_class2_gpu.h
|
||||||
rm -f ../pair_lj_class2_coul_long_gpu.h
|
rm -f ../pair_lj_class2_coul_long_gpu.h
|
||||||
rm -f ../pair_lj_charmm_coul_long_gpu.h
|
rm -f ../pair_lj_charmm_coul_long_gpu.h
|
||||||
rm -f ../pair_lj_cut_tgpu.cpp
|
rm -f ../pair_lj_cut_tgpu.h
|
||||||
rm -f ../pair_cg_cmm_gpu.h
|
rm -f ../pair_cg_cmm_gpu.h
|
||||||
rm -f ../pair_cg_cmm_coul_long_gpu.h
|
rm -f ../pair_cg_cmm_coul_long_gpu.h
|
||||||
rm -f ../pair_cg_cmm_coul_msm.h
|
rm -f ../pair_cg_cmm_coul_msm.h
|
||||||
|
|||||||
@ -80,8 +80,15 @@ void ReadRestart::command(int narg, char **arg)
|
|||||||
// if filename contains "*", search dir for latest restart file
|
// if filename contains "*", search dir for latest restart file
|
||||||
|
|
||||||
char *file = new char[strlen(arg[0]) + 16];
|
char *file = new char[strlen(arg[0]) + 16];
|
||||||
if (strchr(arg[0],'*')) file_search(arg[0],file);
|
if (strchr(arg[0],'*')) {
|
||||||
else strcpy(file,arg[0]);
|
int n;
|
||||||
|
if (me == 0) {
|
||||||
|
file_search(arg[0],file);
|
||||||
|
n = strlen(file) + 1;
|
||||||
|
}
|
||||||
|
MPI_Bcast(&n,1,MPI_INT,0,world);
|
||||||
|
MPI_Bcast(file,n,MPI_CHAR,0,world);
|
||||||
|
} else strcpy(file,arg[0]);
|
||||||
|
|
||||||
// check if filename contains "%"
|
// check if filename contains "%"
|
||||||
|
|
||||||
@ -348,10 +355,12 @@ void ReadRestart::command(int narg, char **arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
search for all files matching infile which contains a "*"
|
infile contains a "*"
|
||||||
|
search for all files which match the infile pattern
|
||||||
replace "*" with latest timestep value to create outfile name
|
replace "*" with latest timestep value to create outfile name
|
||||||
search dir referenced by initial pathname of file
|
search dir referenced by initial pathname of file
|
||||||
if infile also contains "%", need to use "base" when search directory
|
if infile also contains "%", use "base" when searching directory
|
||||||
|
only called by proc 0
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void ReadRestart::file_search(char *infile, char *outfile)
|
void ReadRestart::file_search(char *infile, char *outfile)
|
||||||
@ -399,7 +408,6 @@ void ReadRestart::file_search(char *infile, char *outfile)
|
|||||||
int nbegin = strlen(begin);
|
int nbegin = strlen(begin);
|
||||||
int maxnum = -1;
|
int maxnum = -1;
|
||||||
|
|
||||||
if (me == 0) {
|
|
||||||
struct dirent *ep;
|
struct dirent *ep;
|
||||||
DIR *dp = opendir(dirname);
|
DIR *dp = opendir(dirname);
|
||||||
if (dp == NULL)
|
if (dp == NULL)
|
||||||
@ -416,7 +424,6 @@ void ReadRestart::file_search(char *infile, char *outfile)
|
|||||||
}
|
}
|
||||||
closedir(dp);
|
closedir(dp);
|
||||||
if (maxnum < 0) error->one("Found no restart file matching pattern");
|
if (maxnum < 0) error->one("Found no restart file matching pattern");
|
||||||
}
|
|
||||||
|
|
||||||
// create outfile with maxint substituted for "*"
|
// create outfile with maxint substituted for "*"
|
||||||
// use original infile, not pattern, since need to retain "%" in filename
|
// use original infile, not pattern, since need to retain "%" in filename
|
||||||
|
|||||||
Reference in New Issue
Block a user