9 |
|
#include "SRI.hpp" |
10 |
|
#include "simError.h" |
11 |
|
|
12 |
– |
|
12 |
|
// Declare the structures that will be passed by the parser and MPI |
13 |
|
|
14 |
|
typedef struct{ |
24 |
|
int parseAtomLJ( char *lineBuffer, int lineNum, atomStruct &info ); |
25 |
|
|
26 |
|
#ifdef IS_MPI |
28 |
– |
|
27 |
|
#include "mpiForceField.h" |
28 |
|
|
29 |
|
MPI_Datatype mpiAtomStructType; |
71 |
|
// begins the actual forcefield stuff. |
72 |
|
//**************************************************************** |
73 |
|
|
74 |
+ |
|
75 |
|
LJ_FF::LJ_FF(){ |
76 |
|
|
77 |
|
char fileName[200]; |
350 |
|
"LJ_FF atom structures read successfully." ); |
351 |
|
MPIcheckPoint(); |
352 |
|
|
353 |
< |
currentAtomType = headAtomType; |
353 |
> |
currentAtomType = headAtomType->next; //skip the first element who is a place holder. |
354 |
|
while( currentAtomType != NULL ){ |
355 |
|
currentAtomType->duplicate( info ); |
356 |
+ |
|
357 |
+ |
|
358 |
+ |
|
359 |
|
sendFrcStruct( &info, mpiAtomStructType ); |
360 |
+ |
|
361 |
+ |
sprintf( checkPointMsg, |
362 |
+ |
"successfully sent lJ force type: \"%s\"\n", |
363 |
+ |
info.name ); |
364 |
+ |
MPIcheckPoint(); |
365 |
+ |
|
366 |
|
currentAtomType = currentAtomType->next; |
367 |
|
} |
368 |
|
info.last = 1; |
378 |
|
|
379 |
|
headAtomType = new LinkedType; |
380 |
|
recieveFrcStruct( &info, mpiAtomStructType ); |
381 |
+ |
|
382 |
|
while( !info.last ){ |
383 |
+ |
|
384 |
+ |
|
385 |
|
|
386 |
|
headAtomType->add( info ); |
387 |
+ |
|
388 |
+ |
MPIcheckPoint(); |
389 |
+ |
|
390 |
|
recieveFrcStruct( &info, mpiAtomStructType ); |
391 |
|
} |
392 |
|
} |
452 |
|
|
453 |
|
#ifdef IS_MPI |
454 |
|
double tempBig = bigSigma; |
455 |
< |
MPI::COMM_WORLD::Allreduce( &tempBig, &bigSigma, 1, MPI_DOUBLE, MPI_MAX ); |
455 |
> |
MPI::COMM_WORLD.Allreduce( &tempBig, &bigSigma, 1, MPI_DOUBLE, MPI_MAX ); |
456 |
|
#endif //is_mpi |
457 |
|
|
458 |
|
//calc rCut and rList |