86 |
|
int *MolToProcMap; |
87 |
|
MolToProcMap = mpiSim->getMolToProcMap(); |
88 |
|
|
89 |
< |
for(int i = 0; i < parameters->size(); i++){ |
89 |
> |
for(int i = 0; i < (int)(parameters->size()); i++){ |
90 |
|
|
91 |
|
globalIndexOfCurMol = (*parameters)[i].zconsIndex; |
92 |
|
whichNode = MolToProcMap[globalIndexOfCurMol]; |
107 |
|
status = RequesPosAndForce; |
108 |
|
MPI_Send(&status, 1, MPI_INT, whichNode, tag, MPI_COMM_WORLD); |
109 |
|
MPI_Send(&globalIndexOfCurMol, 1, MPI_INT, whichNode, tag, MPI_COMM_WORLD); |
110 |
< |
MPI_Recv(&force, 1, MPI_DOUBLE_PRECISION, whichNode, tag, MPI_COMM_WORLD, &ierr); |
111 |
< |
MPI_Recv(&pos, 1, MPI_DOUBLE_PRECISION, whichNode, tag, MPI_COMM_WORLD, &ierr); |
110 |
> |
MPI_Recv(&force, 1, MPI_DOUBLE, whichNode, tag, MPI_COMM_WORLD, &ierr); |
111 |
> |
MPI_Recv(&pos, 1, MPI_DOUBLE, whichNode, tag, MPI_COMM_WORLD, &ierr); |
112 |
|
} |
113 |
|
|
114 |
|
output << globalIndexOfCurMol << "\t" << force << "\t" << pos << endl; |
142 |
|
break; |
143 |
|
} |
144 |
|
|
145 |
< |
MPI_Send(&fz[localIndex], 1, MPI_DOUBLE_PRECISION, 0, tag, MPI_COMM_WORLD); |
146 |
< |
MPI_Send(&curZPos[localIndex], 1, MPI_DOUBLE_PRECISION, 0, tag, MPI_COMM_WORLD); |
145 |
> |
MPI_Send(&fz[localIndex], 1, MPI_DOUBLE, 0, tag, MPI_COMM_WORLD); |
146 |
> |
MPI_Send(&curZPos[localIndex], 1, MPI_DOUBLE, 0, tag, MPI_COMM_WORLD); |
147 |
|
break; |
148 |
|
|
149 |
|
case EndOfRequest : |
171 |
|
|
172 |
|
output << parameters->size() << endl; |
173 |
|
|
174 |
< |
for(int i =0 ; i < parameters->size(); i++) |
174 |
> |
for(int i =0 ; i < (int)(parameters->size()); i++) |
175 |
|
output << (*parameters)[i].zconsIndex << "\t" << (*parameters)[i].zPos << endl; |
176 |
|
|
177 |
|
#ifdef IS_MPI |