ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/src/oopse.cpp
(Generate patch)

Comparing:
branches/mmeineke/OOPSE/src/oopse.cpp (file contents), Revision 377 by mmeineke, Fri Mar 21 17:42:12 2003 UTC vs.
trunk/OOPSE/src/oopse.cpp (file contents), Revision 1173 by gezelter, Wed May 12 20:14:21 2004 UTC

# Line 5 | Line 5
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"
# Line 14 | Line 17
17   #include "Integrator.hpp"
18   #include "Thermo.hpp"
19   #include "ReadWrite.hpp"
20 + #include "OOPSEMinimizer.hpp"
21  
22   char* program_name;
23   using namespace std;
24  
25   int main(int argc,char* argv[]){
26    
23  int i;
24  unsigned int n_atoms, eo, xo;
27    char* in_name;
28    SimSetup* startMe;
29    SimInfo* entry_plug;
30 <
29 <  
30 >  
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    
44    program_name = argv[0]; // save the program name in case we need it
45    
46    if( worldRank == 0 ){
47 +    std::cerr <<
48 +      "+--------------------------------------------------------------------+\n" <<
49 +      "|    ____  ____  ____  _____ ______  The OpenSource, Object-oriented |\n" <<
50 +      "|   / __ \\/ __ \\/ __ \\/ ___// ____/  Parallel Simulation Engine.     |\n" <<
51 +      "|  / / / / / / / /_/ /\\__ \\/ __/                                     |\n" <<
52 +      "| / /_/ / /_/ / ____/___/ / /___     Copyright 2004 by the           |\n" <<
53 +      "| \\____/\\____/_/    /____/_____/     University of Notre Dame.       |\n" <<
54 +      "|                                    http://maul.chem.nd.edu/OOPSE   |\n" <<
55 +      "+--------------------------------------------------------------------+\n" <<
56 +      "\n";
57 +
58      if( argc < 2 ){
59        strcpy( painCave.errMsg, "Error, bass file is needed to run.\n" );
60        painCave.isFatal = 1;
# Line 50 | Line 66 | int main(int argc,char* argv[]){
66  
67    strcpy( checkPointMsg, "Successful number of arguments" );
68    MPIcheckPoint();
69 <  
54 <  
69 >    
70    // create the simulation objects, and get the show on the road
71      
72    entry_plug = new SimInfo;
73    startMe = new SimSetup;
74    
75    startMe->setSimInfo( entry_plug );
76 +
77 +
78    startMe->parseFile( in_name );
79 +
80 +
81    startMe->createSim();
82  
83    delete startMe;
84 +
85 +  if (!entry_plug->has_minimizer)
86 +    entry_plug->the_integrator->integrate();
87 +  else
88 +    entry_plug->the_minimizer->minimize();
89    
90 <  entry_plug->the_integrator->integrate();
91 <  
90 > #ifdef PROFILE
91 >  writeProfiles();
92 > #endif //profile
93 >
94    strcpy( checkPointMsg, "Oh what a lovely Tea Party!" );
95    MPIcheckPoint();
96    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines