| 71 |
|
|
| 72 |
|
char *eof_test; // ptr to see when we reach the end of the file |
| 73 |
|
char *parseErr; |
| 74 |
+ |
int procIndex; |
| 75 |
|
|
| 75 |
– |
|
| 76 |
|
entry_plug = the_entry_plug; |
| 77 |
|
|
| 78 |
|
|
| 207 |
|
|
| 208 |
|
sprintf(checkPointMsg, |
| 209 |
|
"Node 0 has successfully read positions from input file."); |
| 210 |
< |
mpiCheckPoint(); |
| 210 |
> |
MPIcheckPoint(); |
| 211 |
|
|
| 212 |
< |
for (procIndex = 1; procIndex < entryPlug->mpiSim->getNumberProcessors(); |
| 212 |
> |
for (procIndex = 1; procIndex < mpiSim->getNumberProcessors(); |
| 213 |
|
procIndex++){ |
| 214 |
|
if (worldRank == 0) { |
| 215 |
|
|
| 233 |
|
sendError = 0; |
| 234 |
|
mpiErr = MPI_Send(&sendError,1,MPI_INT,procIndex,MPI_ANY_TAG,MPI_COMM_WORLD); |
| 235 |
|
|
| 236 |
< |
for ( i = nodeAtomStart; i <= nodeAtomEnd, i++){ |
| 236 |
> |
for ( i = nodeAtomsStart; i <= nodeAtomsEnd; i++){ |
| 237 |
|
eof_test = fgets(read_buffer, sizeof(read_buffer), c_in_file); |
| 238 |
|
if(eof_test == NULL){ |
| 239 |
|
|
| 252 |
|
mpiErr = MPI_Send(read_buffer,BUFFERSIZE,MPI_CHAR,procIndex,MPI_ANY_TAG,MPI_COMM_WORLD); |
| 253 |
|
mpiErr = MPI_Recv(&sendError,1,MPI_INT,procIndex,MPI_ANY_TAG,MPI_COMM_WORLD, |
| 254 |
|
istatus); |
| 255 |
< |
if (sendError) mpiCheckpoint(); |
| 255 |
> |
if (sendError) MPIcheckPoint(); |
| 256 |
|
|
| 257 |
|
masterIndex++; |
| 258 |
|
} |
| 260 |
|
|
| 261 |
|
|
| 262 |
|
else if(worldRank == procIndex){ |
| 263 |
< |
nodeAtomStart = mpiSim->getMyAtomStart(); |
| 264 |
< |
nodeAtomEnd = mpiSim->getMyAtomEnd(); |
| 263 |
> |
nodeAtomsStart = mpiSim->getMyAtomStart(); |
| 264 |
> |
nodeAtomsEnd = mpiSim->getMyAtomEnd(); |
| 265 |
|
mpiErr = MPI_Send(&nodeAtomsStart,1,MPI_INT,0,MPI_ANY_TAG,MPI_COMM_WORLD); |
| 266 |
|
mpiErr = MPI_Send(&nodeAtomsEnd,1,MPI_INT,0,MPI_ANY_TAG,MPI_COMM_WORLD); |
| 267 |
|
|
| 268 |
|
mpiErr = MPI_Recv(&sendError,1,MPI_INT,0,MPI_ANY_TAG,MPI_COMM_WORLD, |
| 269 |
|
istatus); |
| 270 |
< |
if (sendError) mpiCheckpoint(); |
| 270 |
> |
if (sendError) MPIcheckPoint(); |
| 271 |
|
|
| 272 |
< |
for ( i = 0; i < entry_plug->n_atoms, i++){ |
| 272 |
> |
for ( i = 0; i < entry_plug->n_atoms; i++){ |
| 273 |
|
|
| 274 |
|
mpiErr = MPI_Recv(&read_buffer,BUFFERSIZE,MPI_CHAR,0,MPI_ANY_TAG,MPI_COMM_WORLD, |
| 275 |
|
istatus); |
| 276 |
|
|
| 277 |
< |
if(!strcmp(read_buffer, "ERROR")) mpiCheckPoint(); |
| 277 |
> |
if(!strcmp(read_buffer, "ERROR")) MPIcheckPoint(); |
| 278 |
|
|
| 279 |
|
parseErr = parseDumpLine( read_buffer, i ); |
| 280 |
|
if( parseErr != NULL ){ |
| 291 |
|
} |
| 292 |
|
} |
| 293 |
|
sprintf(checkPointMsg,"Node %d received initial configuration.",procIndex); |
| 294 |
< |
mpiCheckPoint(); |
| 294 |
> |
MPIcheckPoint(); |
| 295 |
|
} |
| 296 |
|
|
| 297 |
|
#endif |