remove the old versions of the utility function and use the new
This commit is contained in:
@ -1226,7 +1226,7 @@ void ReadData::atoms()
|
||||
|
||||
while (nread < natoms) {
|
||||
nchunk = MIN(natoms-nread,CHUNK);
|
||||
eof = comm->read_lines_from_file(fp,nchunk,MAXLINE,buffer);
|
||||
eof = utils::read_lines_from_file(fp,nchunk,MAXLINE,buffer,me,world);
|
||||
if (eof) error->all(FLERR,"Unexpected end of data file");
|
||||
atom->data_atoms(nchunk,buffer,id_offset,mol_offset,toffset,shiftflag,shift);
|
||||
nread += nchunk;
|
||||
@ -1282,7 +1282,7 @@ void ReadData::velocities()
|
||||
|
||||
while (nread < natoms) {
|
||||
nchunk = MIN(natoms-nread,CHUNK);
|
||||
eof = comm->read_lines_from_file(fp,nchunk,MAXLINE,buffer);
|
||||
eof = utils::read_lines_from_file(fp,nchunk,MAXLINE,buffer,me,world);
|
||||
if (eof) error->all(FLERR,"Unexpected end of data file");
|
||||
atom->data_vels(nchunk,buffer,id_offset);
|
||||
nread += nchunk;
|
||||
@ -1324,7 +1324,7 @@ void ReadData::bonds(int firstpass)
|
||||
|
||||
while (nread < nbonds) {
|
||||
nchunk = MIN(nbonds-nread,CHUNK);
|
||||
eof = comm->read_lines_from_file(fp,nchunk,MAXLINE,buffer);
|
||||
eof = utils::read_lines_from_file(fp,nchunk,MAXLINE,buffer,me,world);
|
||||
if (eof) error->all(FLERR,"Unexpected end of data file");
|
||||
atom->data_bonds(nchunk,buffer,count,id_offset,boffset);
|
||||
nread += nchunk;
|
||||
@ -1398,7 +1398,7 @@ void ReadData::angles(int firstpass)
|
||||
|
||||
while (nread < nangles) {
|
||||
nchunk = MIN(nangles-nread,CHUNK);
|
||||
eof = comm->read_lines_from_file(fp,nchunk,MAXLINE,buffer);
|
||||
eof = utils::read_lines_from_file(fp,nchunk,MAXLINE,buffer,me,world);
|
||||
if (eof) error->all(FLERR,"Unexpected end of data file");
|
||||
atom->data_angles(nchunk,buffer,count,id_offset,aoffset);
|
||||
nread += nchunk;
|
||||
@ -1472,7 +1472,7 @@ void ReadData::dihedrals(int firstpass)
|
||||
|
||||
while (nread < ndihedrals) {
|
||||
nchunk = MIN(ndihedrals-nread,CHUNK);
|
||||
eof = comm->read_lines_from_file(fp,nchunk,MAXLINE,buffer);
|
||||
eof = utils::read_lines_from_file(fp,nchunk,MAXLINE,buffer,me,world);
|
||||
if (eof) error->all(FLERR,"Unexpected end of data file");
|
||||
atom->data_dihedrals(nchunk,buffer,count,id_offset,doffset);
|
||||
nread += nchunk;
|
||||
@ -1546,7 +1546,7 @@ void ReadData::impropers(int firstpass)
|
||||
|
||||
while (nread < nimpropers) {
|
||||
nchunk = MIN(nimpropers-nread,CHUNK);
|
||||
eof = comm->read_lines_from_file(fp,nchunk,MAXLINE,buffer);
|
||||
eof = utils::read_lines_from_file(fp,nchunk,MAXLINE,buffer,me,world);
|
||||
if (eof) error->all(FLERR,"Unexpected end of data file");
|
||||
atom->data_impropers(nchunk,buffer,count,id_offset,ioffset);
|
||||
nread += nchunk;
|
||||
@ -1613,7 +1613,7 @@ void ReadData::bonus(bigint nbonus, AtomVec *ptr, const char *type)
|
||||
|
||||
while (nread < natoms) {
|
||||
nchunk = MIN(natoms-nread,CHUNK);
|
||||
eof = comm->read_lines_from_file(fp,nchunk,MAXLINE,buffer);
|
||||
eof = utils::read_lines_from_file(fp,nchunk,MAXLINE,buffer,me,world);
|
||||
if (eof) error->all(FLERR,"Unexpected end of data file");
|
||||
atom->data_bonus(nchunk,buffer,ptr,id_offset);
|
||||
nread += nchunk;
|
||||
@ -1739,7 +1739,7 @@ void ReadData::mass()
|
||||
char *next;
|
||||
char *buf = new char[ntypes*MAXLINE];
|
||||
|
||||
int eof = comm->read_lines_from_file(fp,ntypes,MAXLINE,buf);
|
||||
int eof = utils::read_lines_from_file(fp,ntypes,MAXLINE,buf,me,world);
|
||||
if (eof) error->all(FLERR,"Unexpected end of data file");
|
||||
|
||||
char *original = buf;
|
||||
@ -1759,7 +1759,7 @@ void ReadData::paircoeffs()
|
||||
char *next;
|
||||
char *buf = new char[ntypes*MAXLINE];
|
||||
|
||||
int eof = comm->read_lines_from_file(fp,ntypes,MAXLINE,buf);
|
||||
int eof = utils::read_lines_from_file(fp,ntypes,MAXLINE,buf,me,world);
|
||||
if (eof) error->all(FLERR,"Unexpected end of data file");
|
||||
|
||||
char *original = buf;
|
||||
@ -1785,7 +1785,7 @@ void ReadData::pairIJcoeffs()
|
||||
int nsq = ntypes * (ntypes+1) / 2;
|
||||
char *buf = new char[nsq * MAXLINE];
|
||||
|
||||
int eof = comm->read_lines_from_file(fp,nsq,MAXLINE,buf);
|
||||
int eof = utils::read_lines_from_file(fp,nsq,MAXLINE,buf,me,world);
|
||||
if (eof) error->all(FLERR,"Unexpected end of data file");
|
||||
|
||||
char *original = buf;
|
||||
@ -1811,7 +1811,7 @@ void ReadData::bondcoeffs()
|
||||
char *next;
|
||||
char *buf = new char[nbondtypes*MAXLINE];
|
||||
|
||||
int eof = comm->read_lines_from_file(fp,nbondtypes,MAXLINE,buf);
|
||||
int eof = utils::read_lines_from_file(fp,nbondtypes,MAXLINE,buf,me,world);
|
||||
if (eof) error->all(FLERR,"Unexpected end of data file");
|
||||
|
||||
char *original = buf;
|
||||
@ -1836,7 +1836,7 @@ void ReadData::anglecoeffs(int which)
|
||||
char *next;
|
||||
char *buf = new char[nangletypes*MAXLINE];
|
||||
|
||||
int eof = comm->read_lines_from_file(fp,nangletypes,MAXLINE,buf);
|
||||
int eof = utils::read_lines_from_file(fp,nangletypes,MAXLINE,buf,me,world);
|
||||
if (eof) error->all(FLERR,"Unexpected end of data file");
|
||||
|
||||
char *original = buf;
|
||||
@ -1862,7 +1862,7 @@ void ReadData::dihedralcoeffs(int which)
|
||||
char *next;
|
||||
char *buf = new char[ndihedraltypes*MAXLINE];
|
||||
|
||||
int eof = comm->read_lines_from_file(fp,ndihedraltypes,MAXLINE,buf);
|
||||
int eof = utils::read_lines_from_file(fp,ndihedraltypes,MAXLINE,buf,me,world);
|
||||
if (eof) error->all(FLERR,"Unexpected end of data file");
|
||||
|
||||
char *original = buf;
|
||||
@ -1892,7 +1892,7 @@ void ReadData::impropercoeffs(int which)
|
||||
char *next;
|
||||
char *buf = new char[nimpropertypes*MAXLINE];
|
||||
|
||||
int eof = comm->read_lines_from_file(fp,nimpropertypes,MAXLINE,buf);
|
||||
int eof = utils::read_lines_from_file(fp,nimpropertypes,MAXLINE,buf,me,world);
|
||||
if (eof) error->all(FLERR,"Unexpected end of data file");
|
||||
|
||||
char *original = buf;
|
||||
@ -1922,7 +1922,7 @@ void ReadData::fix(int ifix, char *keyword)
|
||||
bigint nread = 0;
|
||||
while (nread < nline) {
|
||||
nchunk = MIN(nline-nread,CHUNK);
|
||||
eof = comm->read_lines_from_file(fp,nchunk,MAXLINE,buffer);
|
||||
eof = utils::read_lines_from_file(fp,nchunk,MAXLINE,buffer,me,world);
|
||||
if (eof) error->all(FLERR,"Unexpected end of data file");
|
||||
modify->fix[ifix]->read_data_section(keyword,nchunk,buffer,id_offset);
|
||||
nread += nchunk;
|
||||
|
||||
Reference in New Issue
Block a user