175 |
|
int *MolToProcMap = mpiSim->getMolToProcMap(); |
176 |
|
int localIndex; |
177 |
|
int nCurObj; |
178 |
+ |
int nItems; |
179 |
|
|
180 |
+ |
nTotObjs = simnfo->getTotIntegrableObjects(); |
181 |
|
haveError = 0; |
182 |
|
if (worldRank == 0) { |
183 |
|
|
189 |
|
simError(); |
190 |
|
} |
191 |
|
|
192 |
< |
nTotObjs = atoi( read_buffer ); |
192 |
> |
nItems = atoi( read_buffer ); |
193 |
|
|
194 |
|
// Check to see that the number of integrable objects in the intial configuration file is the |
195 |
|
// same as declared in simBass. |
196 |
|
|
197 |
< |
if( nTotObjs != simnfo->getTotIntegrableObjects()){ |
197 |
> |
if( nTotObjs != nItems){ |
198 |
|
sprintf( painCave.errMsg, |
199 |
|
"Initialize from File error. %s n_atoms, %d, " |
200 |
|
"does not match the BASS file's n_atoms, %d.\n", |
257 |
|
|
258 |
|
if(haveError) nodeZeroError(); |
259 |
|
|
260 |
< |
parseDumpLine(read_buffer, integrableObjects[i]); |
260 |
> |
parseDumpLine(read_buffer, integrableObjects[j]); |
261 |
|
|
262 |
|
} |
263 |
|
|
266 |
|
else{ |
267 |
|
//molecule belongs to slave nodes |
268 |
|
|
269 |
< |
MPI_Recv(&nCurObj, 1, MPI_INT, 0, |
269 |
> |
MPI_Recv(&nCurObj, 1, MPI_INT, which_node, |
270 |
|
TAKE_THIS_TAG_INT, MPI_COMM_WORLD, &istatus); |
271 |
|
|
272 |
|
for(j=0; j < integrableObjects.size(); j++){ |
296 |
|
} |
297 |
|
else{ |
298 |
|
//actions taken at slave nodes |
299 |
+ |
|
300 |
+ |
MPI_Bcast(read_buffer, BUFFERSIZE, MPI_CHAR, 0, MPI_COMM_WORLD); |
301 |
+ |
|
302 |
+ |
parseErr = parseCommentLine( read_buffer, simnfo); |
303 |
+ |
|
304 |
+ |
if( parseErr != NULL ){ |
305 |
+ |
strcpy( painCave.errMsg, parseErr ); |
306 |
+ |
haveError = 1; |
307 |
+ |
simError(); |
308 |
+ |
} |
309 |
+ |
|
310 |
|
for (i=0 ; i < mpiSim->getTotNmol(); i++) { |
311 |
|
which_node = MolToProcMap[i]; |
312 |
|
|
325 |
|
|
326 |
|
nCurObj = integrableObjects.size(); |
327 |
|
|
328 |
< |
MPI_Recv(&nCurObj, 1, MPI_INT, 0, |
329 |
< |
TAKE_THIS_TAG_INT, MPI_COMM_WORLD, &istatus); |
328 |
> |
MPI_Send(&nCurObj, 1, MPI_INT, 0, |
329 |
> |
TAKE_THIS_TAG_INT, MPI_COMM_WORLD); |
330 |
|
|
331 |
|
for(j = 0; j < integrableObjects.size(); j++){ |
332 |
|
|
630 |
|
|
631 |
|
//push eta into SimInfo::properties which can be |
632 |
|
//retrieved by integrator later |
633 |
< |
//entry_plug->setBoxM( theBoxMat3 ); |
633 |
> |
|
634 |
|
DoubleArrayData* etaValue = new DoubleArrayData(); |
635 |
|
etaValue->setID(ETAVALUE_ID); |
636 |
|
etaValue->setData(eta, 9); |