| 91 |
|
Molecule* mols = entry_plug->molecules; |
| 92 |
|
indexArray.clear(); |
| 93 |
|
|
| 94 |
< |
for(int i = 0; i < mpiSim->getMyNlocal();i++) |
| 94 |
> |
for(int i = 0; i < entry_plug->n_mol;i++) |
| 95 |
|
indexArray.push_back(make_pair(i, mols[i].getGlobalIndex())); |
| 96 |
|
|
| 97 |
|
sort(indexArray.begin(), indexArray.end(), indexSortingCriterion); |
| 366 |
|
// so wrap this processor potato back to 0: |
| 367 |
|
|
| 368 |
|
potatoes[which_node] = 0; |
| 369 |
< |
MPI_Send(0, 1, MPI_INT, which_node, 0, MPI_COMM_WORLD); |
| 369 |
> |
MPI_Send(&potatoes[which_node], 1, MPI_INT, which_node, 0, MPI_COMM_WORLD); |
| 370 |
|
|
| 371 |
|
} |
| 372 |
|
|
| 375 |
|
//recieve the number of integrableObject in current molecule |
| 376 |
|
MPI_Recv(&nCurObj, 1, MPI_INT, which_node, |
| 377 |
|
myPotato, MPI_COMM_WORLD, &istatus); |
| 378 |
+ |
myPotato++; |
| 379 |
|
|
| 380 |
|
for(int l = 0; l < nCurObj; l++){ |
| 381 |
|
|
| 384 |
|
// so wrap this processor potato back to 0: |
| 385 |
|
|
| 386 |
|
potatoes[which_node] = 0; |
| 387 |
< |
MPI_Send(0, 1, MPI_INT, which_node, 0, MPI_COMM_WORLD); |
| 387 |
> |
MPI_Send(&potatoes[which_node], 1, MPI_INT, which_node, 0, MPI_COMM_WORLD); |
| 388 |
|
|
| 389 |
|
} |
| 390 |
|
|
| 545 |
|
|
| 546 |
|
MPI_Send(&nCurObj, 1, MPI_INT, 0, |
| 547 |
|
myPotato, MPI_COMM_WORLD); |
| 548 |
+ |
myPotato++; |
| 549 |
|
|
| 550 |
|
for( iter = integrableObjects.begin(); iter != integrableObjects.end(); iter++){ |
| 551 |
|
|
| 632 |
|
} |
| 633 |
|
|
| 634 |
|
} |
| 633 |
– |
|
| 634 |
– |
} |
| 635 |
|
|
| 636 |
|
sprintf( checkPointMsg, |
| 637 |
|
"Sucessfully took a dump.\n"); |
| 638 |
< |
MPIcheckPoint(); |
| 638 |
> |
MPIcheckPoint(); |
| 639 |
|
|
| 640 |
+ |
} |
| 641 |
+ |
|
| 642 |
+ |
|
| 643 |
|
|
| 644 |
|
#endif // is_mpi |
| 645 |
|
} |