589 |
|
MPI_Bcast(&molToProcMap[0], nGlobalMols, MPI_INT, 0, MPI_COMM_WORLD); |
590 |
|
} |
591 |
|
|
592 |
+ |
cerr << "molToProcMap:\n"; |
593 |
+ |
for (int i = 0; i < molToProcMap.size(); i++) { |
594 |
+ |
cerr << "m = " << i << " mtpr[m] = " << molToProcMap[i] <<"\n"; |
595 |
+ |
} |
596 |
+ |
|
597 |
|
info->setMolToProcMap(molToProcMap); |
598 |
|
sprintf(checkPointMsg, |
599 |
|
"Successfully divided the molecules among the processors.\n"); |
713 |
|
} |
714 |
|
|
715 |
|
//fill globalGroupMembership |
716 |
< |
std::vector<int> globalGroupMembership(info->getNGlobalAtoms(), 0); |
716 |
> |
std::vector<int> globalGroupMembership(info->getNGlobalAtoms(), -1); |
717 |
|
for(mol = info->beginMolecule(mi); mol != NULL; mol = info->nextMolecule(mi)) { |
718 |
|
for (cg = mol->beginCutoffGroup(ci); cg != NULL; cg = mol->nextCutoffGroup(ci)) { |
719 |
|
|
732 |
|
// docs said we could. |
733 |
|
std::vector<int> tmpGroupMembership(info->getNGlobalAtoms(), 0); |
734 |
|
MPI_Allreduce(&globalGroupMembership[0], &tmpGroupMembership[0], nGlobalAtoms, |
735 |
< |
MPI_INT, MPI_SUM, MPI_COMM_WORLD); |
735 |
> |
MPI_INT, MPI_MAX, MPI_COMM_WORLD); |
736 |
|
info->setGlobalGroupMembership(tmpGroupMembership); |
737 |
+ |
|
738 |
+ |
cerr << "ggm:\n"; |
739 |
+ |
for (int i = 0; i < tmpGroupMembership.size(); i++) |
740 |
+ |
cerr << "i = " << i << "\t ggm(i) = " << tmpGroupMembership[i] << "\n"; |
741 |
+ |
|
742 |
|
#else |
743 |
|
info->setGlobalGroupMembership(globalGroupMembership); |
744 |
|
#endif |
798 |
|
globalIO++; |
799 |
|
} |
800 |
|
} |
801 |
< |
|
801 |
> |
cerr << "ioi2io:\n"; |
802 |
> |
for (int i = 0; i < IOIndexToIntegrableObject.size(); i++) { |
803 |
> |
if (IOIndexToIntegrableObject[i] != NULL) { |
804 |
> |
cerr << "i = " << i << "globalIOindex = " << IOIndexToIntegrableObject[i]->getGlobalIntegrableObjectIndex() << "\n"; |
805 |
> |
} |
806 |
> |
} |
807 |
> |
|
808 |
|
info->setIOIndexToIntegrableObject(IOIndexToIntegrableObject); |
809 |
|
|
810 |
|
} |