--- trunk/mdtools/interface_implementation/SimSetup.cpp 2003/01/27 21:28:19 249 +++ trunk/mdtools/interface_implementation/SimSetup.cpp 2003/01/30 20:03:37 254 @@ -238,7 +238,11 @@ void SimSetup::createSim( void ){ mpiSim = new mpiSimulation( simnfo ); - mpiSim->divideLabor(); + fprintf( stderr, "about to call divideLabour.\n" ); + + globalIndex = mpiSim->divideLabor(); + + fprintf(stderr, "we're back from divideLabour\n" ); // set up the local variables @@ -644,7 +648,15 @@ void SimSetup::makeAtoms( void ){ molIndex++; } } + +#ifdef IS_MPI + for( i=0; igetMyNlocal(); i++ ) the_atoms[i]->setGlobalIndex( globalIndex[i] ); + + delete[] globalIndex; + mpiSim->mpiRefresh(); +#endif //IS_MPI + the_ff->initializeAtoms(); } @@ -684,7 +696,7 @@ void SimSetup::makeBonds( void ){ #ifdef IS_MPI } -#endif is_mpi +#endif //is_mpi molIndex++; }