5 |
|
#include <cmath> |
6 |
|
#include <cstring> |
7 |
|
#include <mpi.h> |
8 |
– |
#include <mpi++.h> |
8 |
|
|
9 |
+ |
#ifdef PROFILE |
10 |
+ |
#include "mdProfile.hpp" |
11 |
+ |
#endif // PROFILE |
12 |
+ |
|
13 |
|
#include "simError.h" |
14 |
|
#include "SimSetup.hpp" |
15 |
|
#include "SimInfo.hpp" |
23 |
|
|
24 |
|
int main(int argc,char* argv[]){ |
25 |
|
|
23 |
– |
int i; |
24 |
– |
unsigned int n_atoms, eo, xo; |
26 |
|
char* in_name; |
27 |
|
SimSetup* startMe; |
28 |
|
SimInfo* entry_plug; |
31 |
|
// first things first, all of the initializations |
32 |
|
|
33 |
|
MPI_Init( &argc, &argv ); // the MPI communicators |
34 |
+ |
|
35 |
|
initSimError(); // the error handler |
36 |
|
srand48( 1337 ); // the random number generator. |
37 |
|
|
38 |
+ |
#ifdef PROFILE |
39 |
+ |
initProfile(); |
40 |
+ |
#endif //profile |
41 |
|
|
42 |
|
// check command line arguments, and set the input file |
43 |
|
|
63 |
|
startMe = new SimSetup; |
64 |
|
|
65 |
|
startMe->setSimInfo( entry_plug ); |
66 |
+ |
|
67 |
+ |
|
68 |
|
startMe->parseFile( in_name ); |
69 |
+ |
|
70 |
+ |
|
71 |
|
startMe->createSim(); |
72 |
|
|
73 |
|
delete startMe; |
74 |
+ |
|
75 |
|
|
76 |
|
entry_plug->the_integrator->integrate(); |
77 |
|
|
78 |
+ |
#ifdef PROFILE |
79 |
+ |
writeProfiles(); |
80 |
+ |
#endif //profile |
81 |
+ |
|
82 |
|
strcpy( checkPointMsg, "Oh what a lovely Tea Party!" ); |
83 |
|
MPIcheckPoint(); |
84 |
|
|