--- trunk/OOPSE/libmdtools/mpiSimulation.cpp 2003/04/03 20:21:54 447 +++ trunk/OOPSE/libmdtools/mpiSimulation.cpp 2003/10/28 16:03:37 829 @@ -1,8 +1,8 @@ #ifdef IS_MPI #include -#include -#include -#include +#include +#include +#include #include #include "mpiSimulation.hpp" @@ -10,8 +10,6 @@ #include "fortranWrappers.hpp" #include "randomSPRNG.hpp" -#define BASE_SEED 123456789 - mpiSimulation* mpiSim; mpiSimulation::mpiSimulation(SimInfo* the_entryPlug) @@ -59,16 +57,12 @@ int* mpiSimulation::divideLabor( void ){ int old_atoms, add_atoms, new_atoms; int nTarget; - int molIndex, atomIndex, compIndex, compStart; + int molIndex, atomIndex; int done; - int nLocal, molLocal; int i, j, loops, which_proc, nmol_local, natoms_local; int nmol_global, natoms_global; - int local_index, index; - int smallDiff, bigDiff; - int baseSeed = BASE_SEED; - - int testSum; + int local_index; + int baseSeed = entryPlug->getSeed(); nComponents = entryPlug->nComponents; compStamps = entryPlug->compStamps; @@ -82,6 +76,7 @@ int* mpiSimulation::divideLabor( void ){ mpiPlug->nSRIGlobal = entryPlug->n_SRI; mpiPlug->nMolGlobal = entryPlug->n_mol; + myRandom = new randomSPRNG( baseSeed ); a = 3.0 * (double)mpiPlug->nMolGlobal / (double)mpiPlug->nAtomsGlobal;