| 273 |
|
int *MolToProcMap = mpiSim->getMolToProcMap(); |
| 274 |
|
int localIndex; |
| 275 |
|
int nCurObj; |
| 276 |
+ |
int nitems; |
| 277 |
|
|
| 278 |
+ |
nTotObjs = simnfo->getTotIntegrableObjects(); |
| 279 |
|
haveError = 0; |
| 280 |
|
if (worldRank == 0) { |
| 281 |
|
fsetpos(inFile, framePos[whichFrame]); |
| 288 |
|
simError(); |
| 289 |
|
} |
| 290 |
|
|
| 291 |
< |
nTotObjs = atoi( read_buffer ); |
| 291 |
> |
nitems = atoi( read_buffer ); |
| 292 |
|
|
| 293 |
|
// Check to see that the number of integrable objects in the intial configuration file is the |
| 294 |
|
// same as declared in simBass. |
| 295 |
|
|
| 296 |
< |
if( nTotObjs != simnfo->getTotIntegrableObjects()){ |
| 296 |
> |
if( nTotObjs != nitems){ |
| 297 |
|
sprintf( painCave.errMsg, |
| 298 |
|
"DumpReadererror. %s n_atoms, %d, " |
| 299 |
|
"does not match the BASS file's n_atoms, %d.\n", |
| 356 |
|
|
| 357 |
|
if(haveError) nodeZeroError(); |
| 358 |
|
|
| 359 |
< |
parseDumpLine(read_buffer, integrableObjects[i]); |
| 359 |
> |
parseDumpLine(read_buffer, integrableObjects[j]); |
| 360 |
|
|
| 361 |
|
} |
| 362 |
|
|
| 365 |
|
else{ |
| 366 |
|
//molecule belongs to slave nodes |
| 367 |
|
|
| 368 |
< |
MPI_Recv(&nCurObj, 1, MPI_INT, 0, |
| 368 |
> |
MPI_Recv(&nCurObj, 1, MPI_INT, which_node, |
| 369 |
|
TAKE_THIS_TAG_INT, MPI_COMM_WORLD, &istatus); |
| 370 |
|
|
| 371 |
|
for(j=0; j < integrableObjects.size(); j++){ |
| 395 |
|
} |
| 396 |
|
else{ |
| 397 |
|
//actions taken at slave nodes |
| 398 |
+ |
MPI_Bcast(read_buffer, BUFFERSIZE, MPI_CHAR, 0, MPI_COMM_WORLD); |
| 399 |
+ |
|
| 400 |
+ |
parseErr = parseCommentLine( read_buffer, simnfo); |
| 401 |
+ |
|
| 402 |
+ |
if( parseErr != NULL ){ |
| 403 |
+ |
strcpy( painCave.errMsg, parseErr ); |
| 404 |
+ |
haveError = 1; |
| 405 |
+ |
simError(); |
| 406 |
+ |
} |
| 407 |
+ |
|
| 408 |
|
for (i=0 ; i < mpiSim->getTotNmol(); i++) { |
| 409 |
|
which_node = MolToProcMap[i]; |
| 410 |
|
|
| 423 |
|
|
| 424 |
|
nCurObj = integrableObjects.size(); |
| 425 |
|
|
| 426 |
< |
MPI_Recv(&nCurObj, 1, MPI_INT, 0, |
| 427 |
< |
TAKE_THIS_TAG_INT, MPI_COMM_WORLD, &istatus); |
| 426 |
> |
MPI_Send(&nCurObj, 1, MPI_INT, 0, |
| 427 |
> |
TAKE_THIS_TAG_INT, MPI_COMM_WORLD); |
| 428 |
|
|
| 429 |
|
for(j = 0; j < integrableObjects.size(); j++){ |
| 430 |
|
|