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

Comparing trunk/OOPSE-1.0/libmdtools/mpiSimulation.cpp (file contents):
Revision 1334 by gezelter, Fri Jul 16 18:58:03 2004 UTC vs.
Revision 1411 by gezelter, Mon Jul 26 14:36:05 2004 UTC

# Line 84 | Line 84 | void mpiSimulation::divideLabor( ){
84    parallelData->nGroupsGlobal = entryPlug->ngroup;
85    parallelData->nMolGlobal = entryPlug->n_mol;
86  
87 <  myRandom = new randomSPRNG( baseSeed );
87 >  if (parallelData->nProcessors > parallelData->nMolGlobal) {
88 >    sprintf( painCave.errMsg,
89 >             "nProcessors (%d) > nMol (%d)\n"
90 >             "\tThe number of processors is larger than\n"
91 >             "\tthe number of molecules.  This will not result in a \n"
92 >             "\tusable division of atoms for force decomposition.\n"
93 >             "\tEither try a smaller number of processors, or run the\n"
94 >             "\tsingle-processor version of OOPSE.\n",
95 >             parallelData->nProcessors, parallelData->nMolGlobal );
96 >    painCave.isFatal = 1;
97 >    simError();
98 >  }
99  
100 +  myRandom = new randomSPRNG( baseSeed );  
101 +
102 +
103    a = 3.0 * (double)parallelData->nMolGlobal / (double)parallelData->nAtomsGlobal;
104  
105    // Initialize things that we'll send out later:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines