--- trunk/OOPSE/libmdtools/mpiSimulation.cpp 2003/03/26 23:14:02 416 +++ trunk/OOPSE/libmdtools/mpiSimulation.cpp 2003/03/27 14:30:24 418 @@ -35,6 +35,10 @@ mpiSimulation::~mpiSimulation(){ mpiSimulation::~mpiSimulation(){ + delete[] MolToProcMap; + delete[] MolComponentType; + delete[] AtomToProcMap; + delete mpiPlug; // perhaps we should let fortran know the party is over. @@ -205,31 +209,31 @@ int* mpiSimulation::divideLabor( void ){ // Spray out this nonsense to all other processors: - MPI::COMM_WORLD.Bcast(&MolToProcMap, mpiPlug->nMolGlobal, + MPI::COMM_WORLD.Bcast(MolToProcMap, mpiPlug->nMolGlobal, MPI_INT, 0); - MPI::COMM_WORLD.Bcast(&AtomToProcMap, mpiPlug->nAtomsGlobal, + MPI::COMM_WORLD.Bcast(AtomToProcMap, mpiPlug->nAtomsGlobal, MPI_INT, 0); - MPI::COMM_WORLD.Bcast(&MolComponentType, mpiPlug->nMolGlobal, + MPI::COMM_WORLD.Bcast(MolComponentType, mpiPlug->nMolGlobal, MPI_INT, 0); - MPI::COMM_WORLD.Bcast(&AtomsPerProc, mpiPlug->numberProcessors, + MPI::COMM_WORLD.Bcast(AtomsPerProc, mpiPlug->numberProcessors, MPI_INT, 0); } else { // Listen to your marching orders from processor 0: - MPI::COMM_WORLD.Bcast(&MolToProcMap, mpiPlug->nMolGlobal, + MPI::COMM_WORLD.Bcast(MolToProcMap, mpiPlug->nMolGlobal, MPI_INT, 0); - MPI::COMM_WORLD.Bcast(&AtomToProcMap, mpiPlug->nAtomsGlobal, + MPI::COMM_WORLD.Bcast(AtomToProcMap, mpiPlug->nAtomsGlobal, MPI_INT, 0); - MPI::COMM_WORLD.Bcast(&MolComponentType, mpiPlug->nMolGlobal, + MPI::COMM_WORLD.Bcast(MolComponentType, mpiPlug->nMolGlobal, MPI_INT, 0); - MPI::COMM_WORLD.Bcast(&AtomsPerProc, mpiPlug->numberProcessors, + MPI::COMM_WORLD.Bcast(AtomsPerProc, mpiPlug->numberProcessors, MPI_INT, 0); }