| 25 |
|
|
| 26 |
|
MolToProcMap = new int[entryPlug->n_mol]; |
| 27 |
|
MolComponentType = new int[entryPlug->n_mol]; |
| 28 |
– |
|
| 28 |
|
AtomToProcMap = new int[entryPlug->n_atoms]; |
| 29 |
|
|
| 30 |
|
mpiSim = this; |
| 34 |
|
|
| 35 |
|
mpiSimulation::~mpiSimulation(){ |
| 36 |
|
|
| 37 |
+ |
delete[] MolToProcMap; |
| 38 |
+ |
delete[] MolComponentType; |
| 39 |
+ |
delete[] AtomToProcMap; |
| 40 |
+ |
|
| 41 |
|
delete mpiPlug; |
| 42 |
|
// perhaps we should let fortran know the party is over. |
| 43 |
|
|
| 208 |
|
|
| 209 |
|
// Spray out this nonsense to all other processors: |
| 210 |
|
|
| 211 |
< |
MPI::COMM_WORLD.Bcast(&MolToProcMap, mpiPlug->nMolGlobal, |
| 211 |
> |
MPI::COMM_WORLD.Bcast(MolToProcMap, mpiPlug->nMolGlobal, |
| 212 |
|
MPI_INT, 0); |
| 213 |
|
|
| 214 |
< |
MPI::COMM_WORLD.Bcast(&AtomToProcMap, mpiPlug->nAtomsGlobal, |
| 214 |
> |
MPI::COMM_WORLD.Bcast(AtomToProcMap, mpiPlug->nAtomsGlobal, |
| 215 |
|
MPI_INT, 0); |
| 216 |
|
|
| 217 |
< |
MPI::COMM_WORLD.Bcast(&MolComponentType, mpiPlug->nMolGlobal, |
| 217 |
> |
MPI::COMM_WORLD.Bcast(MolComponentType, mpiPlug->nMolGlobal, |
| 218 |
|
MPI_INT, 0); |
| 219 |
|
|
| 220 |
< |
MPI::COMM_WORLD.Bcast(&AtomsPerProc, mpiPlug->numberProcessors, |
| 220 |
> |
MPI::COMM_WORLD.Bcast(AtomsPerProc, mpiPlug->numberProcessors, |
| 221 |
|
MPI_INT, 0); |
| 222 |
|
} else { |
| 223 |
|
|
| 224 |
|
// Listen to your marching orders from processor 0: |
| 225 |
|
|
| 226 |
< |
MPI::COMM_WORLD.Bcast(&MolToProcMap, mpiPlug->nMolGlobal, |
| 226 |
> |
MPI::COMM_WORLD.Bcast(MolToProcMap, mpiPlug->nMolGlobal, |
| 227 |
|
MPI_INT, 0); |
| 228 |
|
|
| 229 |
< |
MPI::COMM_WORLD.Bcast(&AtomToProcMap, mpiPlug->nAtomsGlobal, |
| 229 |
> |
MPI::COMM_WORLD.Bcast(AtomToProcMap, mpiPlug->nAtomsGlobal, |
| 230 |
|
MPI_INT, 0); |
| 231 |
|
|
| 232 |
< |
MPI::COMM_WORLD.Bcast(&MolComponentType, mpiPlug->nMolGlobal, |
| 232 |
> |
MPI::COMM_WORLD.Bcast(MolComponentType, mpiPlug->nMolGlobal, |
| 233 |
|
MPI_INT, 0); |
| 234 |
|
|
| 235 |
< |
MPI::COMM_WORLD.Bcast(&AtomsPerProc, mpiPlug->numberProcessors, |
| 235 |
> |
MPI::COMM_WORLD.Bcast(AtomsPerProc, mpiPlug->numberProcessors, |
| 236 |
|
MPI_INT, 0); |
| 237 |
|
} |
| 238 |
|
|