--- trunk/mdtools/md_code/InitializeFromFile.cpp 2002/12/13 21:17:00 212 +++ trunk/mdtools/md_code/InitializeFromFile.cpp 2002/12/19 21:59:51 215 @@ -11,6 +11,9 @@ #include "ReadWrite.hpp" #include "simError.h" +#ifdef IS_MPI +#include "mpiSimulation.hpp" +#endif // is_mpi InitializeFromFile :: InitializeFromFile( char *in_name ){ #ifdef IS_MPI @@ -158,7 +161,7 @@ void InitializeFromFile :: read_xyz( SimInfo* the_entr // Check to see that the number of atoms in the intial configuration file is the // same as declared in simBass. - if( n_atoms != entry_plug->mpiSim->getTotAtoms() ){ + if( n_atoms != mpiSim->getTotAtoms() ){ sprintf( painCave.errMsg, "Initialize from File error. %s n_atoms, %d, " "does not match the BASS file's n_atoms, %d.\n", @@ -179,7 +182,7 @@ void InitializeFromFile :: read_xyz( SimInfo* the_entr // Read Proc 0 share of the xyz file... masterIndex = 0; - for( i=0; i <= entry_plug->mpiSim->getMyAtomEnd(); i++){ + for( i=0; i <= mpiSim->getMyAtomEnd(); i++){ eof_test = fgets(read_buffer, sizeof(read_buffer), c_in_file); if(eof_test == NULL){ @@ -257,8 +260,8 @@ void InitializeFromFile :: read_xyz( SimInfo* the_entr else if(worldRank == procIndex){ - nodeAtomStart = entry_plug->mpiSim->getMyAtomStart(); - nodeAtomEnd = entry_plug->mpiSim->getMyAtomEnd(); + nodeAtomStart = mpiSim->getMyAtomStart(); + nodeAtomEnd = mpiSim->getMyAtomEnd(); mpiErr = MPI_Send(&nodeAtomsStart,1,MPI_INT,0,MPI_ANY_TAG,MPI_COMM_WORLD); mpiErr = MPI_Send(&nodeAtomsEnd,1,MPI_INT,0,MPI_ANY_TAG,MPI_COMM_WORLD); @@ -311,7 +314,7 @@ char* IntitializeFromFile::parseDumpLine(char* readLin int n_atoms; #ifdef IS_MPI - n_atoms = entry_plug->mpiSim->getTotAtoms(); + n_atoms = mpiSim->getTotAtoms(); #else n_atoms = entry_plug->n_atoms; #endi // is_mpi