--- trunk/OOPSE/libmdtools/InitializeFromFile.cpp 2003/08/12 21:44:06 690 +++ trunk/OOPSE/libmdtools/InitializeFromFile.cpp 2003/09/25 19:27:15 787 @@ -72,18 +72,19 @@ void InitializeFromFile :: readInit( SimInfo* the_simn void InitializeFromFile :: readInit( SimInfo* the_simnfo ){ - int i, j, done, which_node, which_atom; // loop counter + int i, j; + +#ifdef IS_MPI + int done, which_node, which_atom; // loop counter +#endif //is_mpi const int BUFFERSIZE = 2000; // size of the read buffer int n_atoms; // the number of atoms char read_buffer[BUFFERSIZE]; //the line buffer for reading -#ifdef IS_MPI - char send_buffer[BUFFERSIZE]; -#endif char *eof_test; // ptr to see when we reach the end of the file char *parseErr; - int procIndex; + double currTime; double boxMat[9]; double theBoxMat3[3][3]; @@ -102,9 +103,6 @@ void InitializeFromFile :: readInit( SimInfo* the_simn } n_atoms = atoi( read_buffer ); - - Atom **atoms = simnfo->atoms; - DirectionalAtom* dAtom; if( n_atoms != simnfo->n_atoms ){ sprintf( painCave.errMsg, @@ -181,16 +179,13 @@ void InitializeFromFile :: readInit( SimInfo* the_simn eof_test = fgets(read_buffer, sizeof(read_buffer), c_in_file); if( eof_test == NULL ){ sprintf( painCave.errMsg, - "Error reading 1st line of %d \n ",c_in_name); + "Error reading 1st line of %s \n ",c_in_name); haveError = 1; simError(); } n_atoms = atoi( read_buffer ); - Atom **atoms = simnfo->atoms; - DirectionalAtom* dAtom; - // Check to see that the number of atoms in the intial configuration file is the // same as declared in simBass. @@ -333,9 +328,11 @@ char* InitializeFromFile::parseDumpLine(char* readLine Atom **atoms = simnfo->atoms; DirectionalAtom* dAtom; - int j, n_atoms, atomIndex; + int n_atoms, atomIndex; #ifdef IS_MPI + int j; + n_atoms = mpiSim->getTotAtoms(); atomIndex=-1; for (j=0; j < mpiSim->getMyNlocal(); j++) { @@ -544,7 +541,6 @@ char* InitializeFromFile::parseBoxLine(char* readLine, double &time ){ char *foo; // the pointer to the current string token - int j; // set the string tokenizer