84 |
|
|
85 |
|
void DumpReader::scanFile( void ){ |
86 |
|
|
87 |
< |
int vectorSize; |
88 |
< |
int i, j, k; |
87 |
> |
int i, j; |
88 |
|
int lineNum = 0; |
89 |
|
char readBuffer[2000]; |
91 |
– |
char* foo; |
90 |
|
fpos_t *currPos; |
93 |
– |
double time; |
91 |
|
|
95 |
– |
|
96 |
– |
|
92 |
|
#ifdef IS_MPI |
93 |
|
if( worldRank == 0 ){ |
94 |
|
#endif // is_mpi |
171 |
|
|
172 |
|
void DumpReader :: readSet( int whichFrame ){ |
173 |
|
|
174 |
< |
int i, j; |
174 |
> |
int i; |
175 |
> |
unsigned int j; |
176 |
|
|
177 |
|
#ifdef IS_MPI |
178 |
|
int done, which_node, which_atom; // loop counter |
323 |
|
simError(); |
324 |
|
} |
325 |
|
|
326 |
< |
for (i=0 ; i < mpiSim->getTotNmol(); i++) { |
326 |
> |
for (i=0 ; i < mpiSim->getNMolGlobal(); i++) { |
327 |
|
which_node = MolToProcMap[i]; |
328 |
|
if(which_node == 0){ |
329 |
|
//molecules belong to master node |
401 |
|
simError(); |
402 |
|
} |
403 |
|
|
404 |
< |
for (i=0 ; i < mpiSim->getTotNmol(); i++) { |
404 |
> |
for (i=0 ; i < mpiSim->getNMolGlobal(); i++) { |
405 |
|
which_node = MolToProcMap[i]; |
406 |
|
|
407 |
|
if(which_node == worldRank){ |
611 |
|
// check that the quaternion vector is normalized |
612 |
|
|
613 |
|
qSqr = (q[0] * q[0]) + (q[1] * q[1]) + (q[2] * q[2]) + (q[3] * q[3]); |
614 |
+ |
|
615 |
+ |
if (fabs(qSqr) < 1e-6) { |
616 |
+ |
sprintf(painCave.errMsg, |
617 |
+ |
"initial quaternion error (q0^2 + q1^2 + q2^2 + q3^2 ~ 0).\n"); |
618 |
+ |
return strdup(painCave.errMsg); |
619 |
+ |
} |
620 |
|
|
621 |
|
qLength = sqrt( qSqr ); |
622 |
|
q[0] = q[0] / qLength; |
746 |
|
int j, myStatus; |
747 |
|
|
748 |
|
myStatus = 0; |
749 |
< |
for (j = 0; j < mpiSim->getNprocessors(); j++) { |
749 |
> |
for (j = 0; j < mpiSim->getNProcessors(); j++) { |
750 |
|
MPI_Send( &myStatus, 1, MPI_INT, j, |
751 |
|
TAKE_THIS_TAG_INT, MPI_COMM_WORLD); |
752 |
|
} |