| 160 |
|
|
| 161 |
|
#else // is_mpi |
| 162 |
|
|
| 163 |
+ |
cout << "master" <<endl; |
| 164 |
|
/* code to find maximum tag value */ |
| 165 |
< |
int *tagub, flag, MAXTAG; |
| 165 |
> |
|
| 166 |
> |
int tagub, flag, MAXTAG; |
| 167 |
|
MPI_Attr_get(MPI_COMM_WORLD, MPI_TAG_UB, &tagub, &flag); |
| 168 |
|
if (flag) { |
| 169 |
< |
MAXTAG = *tagub; |
| 169 |
> |
MAXTAG = tagub; |
| 170 |
|
} else { |
| 171 |
|
MAXTAG = 32767; |
| 172 |
|
} |
| 359 |
|
sprintf( checkPointMsg, |
| 360 |
|
"Sucessfully took a dump.\n"); |
| 361 |
|
MPIcheckPoint(); |
| 362 |
< |
|
| 362 |
> |
delete[] potatoes; |
| 363 |
|
} else { |
| 364 |
|
|
| 365 |
|
// worldRank != 0, so I'm a remote node. |
| 383 |
|
MPI_Recv(&myPotato, 1, MPI_INT, 0, 0, MPI_COMM_WORLD, &istatus); |
| 384 |
|
|
| 385 |
|
} |
| 386 |
< |
|
| 387 |
< |
local_index=-1; |
| 386 |
> |
which_atom = i; |
| 387 |
> |
local_index=-1; |
| 388 |
|
for (j=0; (j<mpiSim->getMyNlocal()) && (local_index < 0); j++) { |
| 389 |
|
if (atoms[j]->getGlobalIndex() == which_atom) local_index = j; |
| 390 |
|
} |
| 790 |
|
finalOut.flush(); |
| 791 |
|
sprintf( checkPointMsg, |
| 792 |
|
"Sucessfully took a dump.\n"); |
| 793 |
+ |
delete[] potatoes; |
| 794 |
+ |
|
| 795 |
|
MPIcheckPoint(); |
| 796 |
|
|
| 797 |
|
} else { |
| 817 |
|
MPI_Recv(&myPotato, 1, MPI_INT, 0, 0, MPI_COMM_WORLD, &istatus); |
| 818 |
|
|
| 819 |
|
} |
| 820 |
< |
|
| 820 |
> |
which_atom = i; |
| 821 |
|
local_index=-1; |
| 822 |
|
for (j=0; (j<mpiSim->getMyNlocal()) && (local_index < 0); j++) { |
| 823 |
|
if (atoms[j]->getGlobalIndex() == which_atom) local_index = j; |