ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/src/oose.cpp
Revision: 888
Committed: Fri Dec 19 18:53:43 2003 UTC (20 years, 7 months ago) by mmeineke
File size: 1509 byte(s)
Log Message:
the profiling commands work now. Will start adding PROFILE ifdefs into the code

File Contents

# User Rev Content
1 mmeineke 377 #ifndef IS_MPI
2     #include <iostream>
3     #include <fstream>
4     #include <cstdlib>
5     #include <cmath>
6     #include <cstring>
7    
8 mmeineke 888 #ifdef PROFILE
9     #include "mdProfile.hpp"
10     #endif //profile
11    
12 mmeineke 377 #include "simError.h"
13     #include "SimSetup.hpp"
14     #include "SimInfo.hpp"
15     #include "Atom.hpp"
16     #include "Integrator.hpp"
17     #include "Thermo.hpp"
18     #include "ReadWrite.hpp"
19    
20     char* program_name;
21     using namespace std;
22    
23     int main(int argc,char* argv[]){
24    
25     char* in_name;
26     SimSetup* startMe;
27     SimInfo* entry_plug;
28    
29    
30     // first things first, all of the initializations
31    
32     printf("Initializing stuff ....\n");
33     srand48( 1337 ); // the random number generator.
34     initSimError(); // the error handler
35    
36 mmeineke 888 #ifdef PROFILE
37     initProfile();
38     #endif //profile
39    
40 mmeineke 377 program_name = argv[0]; /*save the program name in case we need it*/
41     if( argc < 2 ){
42     sprintf( painCave.errMsg,
43     "Error, bass file is needed to run.\n" );
44     painCave.isFatal = 1;
45     simError();
46     }
47    
48    
49     in_name = argv[1];
50     entry_plug = new SimInfo();
51    
52     startMe = new SimSetup();
53     startMe->setSimInfo( entry_plug );
54 mmeineke 888
55     #ifdef PROFILE
56     startProfile( pro1 );
57     #endif //profile
58    
59 mmeineke 377 startMe->parseFile( in_name );
60 mmeineke 888
61     #ifdef PROFILE
62     endProfile( pro1 );
63    
64     startProfile( pro2 );
65     #endif //profile
66    
67 mmeineke 377 startMe->createSim();
68     delete startMe;
69    
70 mmeineke 888 #ifdef PROFILE
71     endProfile( pro2 );
72    
73     startProfile( pro3 );
74     #endif //profile
75    
76 mmeineke 377 entry_plug->the_integrator->integrate();
77    
78 mmeineke 888 #ifdef PROFILE
79     endProfile( pro3 );
80    
81     writeProfiles();
82     #endif //profile
83    
84 mmeineke 377 return 0 ;
85     }
86    
87     #endif