ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/mpiSimulation.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/mpiSimulation.cpp (file contents):
Revision 1203 by gezelter, Thu May 27 18:59:17 2004 UTC vs.
Revision 1217 by gezelter, Tue Jun 1 21:45:22 2004 UTC

# Line 236 | Line 236 | void mpiSimulation::divideLabor( ){
236  
237      // Spray out this nonsense to all other processors:
238  
239 +    //std::cerr << "node 0 mol2proc = \n";
240 +    //for (i = 0; i < parallelData->nMolGlobal; i++)
241 +    //  std::cerr << i << "\t" << MolToProcMap[i] << "\n";
242 +
243      MPI_Bcast(MolToProcMap, parallelData->nMolGlobal,
244                MPI_INT, 0, MPI_COMM_WORLD);
245  
# Line 394 | Line 398 | void mpiSimulation::mpiRefresh( void ){
398   void mpiSimulation::mpiRefresh( void ){
399  
400    int isError, i;
401 <  int *globalAtomIndex = new int[parallelData->nAtomsLocal];
402 <
399 <  // Fortran indexing needs to be increased by 1 in order to get the 2 languages to
400 <  // not barf
401 >  int *localToGlobalAtomIndex = new int[parallelData->nAtomsLocal];
402 >  int *localToGlobalGroupIndex = new int[parallelData->nGroupsLocal];
403  
404 <  for(i=0; i<parallelData->nAtomsLocal; i++) globalAtomIndex[i] = entryPlug->atoms[i]->getGlobalIndex()+1;
404 >  // Fortran indexing needs to be increased by 1 in order to get the 2
405 >  // languages to not barf
406 >
407 >  for(i = 0; i < parallelData->nAtomsLocal; i++)
408 >    localToGlobalAtomIndex[i] = globalAtomIndex[i] + 1;
409 >
410 >  for(i = 0; i < parallelData->nGroupsLocal; i++)
411 >    localToGlobalGroupIndex[i] = globalGroupIndex[i] + 1;
412    
413    isError = 0;
414 <  setFsimParallel( parallelData, &(entryPlug->n_atoms), globalAtomIndex, &isError );
414 >
415 >  setFsimParallel( parallelData,
416 >                   &(parallelData->nAtomsLocal), localToGlobalAtomIndex,
417 >                   &(parallelData->nGroupsLocal),  localToGlobalGroupIndex,
418 >                   &isError );
419 >
420    if( isError ){
421  
422      sprintf( painCave.errMsg,
# Line 411 | Line 425 | void mpiSimulation::mpiRefresh( void ){
425      simError();
426    }
427  
428 <  delete[] globalAtomIndex;
428 >  delete[] localToGlobalGroupIndex;
429 >  delete[] localToGlobalAtomIndex;
430  
431  
432    sprintf( checkPointMsg,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines