ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/src/oopse.cpp
Revision: 568
Committed: Mon Jun 30 22:04:01 2003 UTC (21 years ago) by mmeineke
File size: 1560 byte(s)
Log Message:
Updated the ChangeLog, and Converted most of the SImInfo to use non-Isotropic
boxes. wrapVector needs to be finished.

File Contents

# User Rev Content
1 mmeineke 377 #ifdef IS_MPI
2     #include <iostream>
3     #include <fstream>
4     #include <cstdlib>
5     #include <cmath>
6     #include <cstring>
7     #include <mpi.h>
8    
9     #include "simError.h"
10     #include "SimSetup.hpp"
11     #include "SimInfo.hpp"
12     #include "Atom.hpp"
13     #include "Integrator.hpp"
14     #include "Thermo.hpp"
15     #include "ReadWrite.hpp"
16    
17     char* program_name;
18     using namespace std;
19    
20     int main(int argc,char* argv[]){
21    
22     int i;
23     unsigned int n_atoms, eo, xo;
24     char* in_name;
25     SimSetup* startMe;
26     SimInfo* entry_plug;
27    
28    
29     // first things first, all of the initializations
30    
31     MPI_Init( &argc, &argv ); // the MPI communicators
32 mmeineke 568
33     cerr << "Hello from MPI!\n";
34    
35 mmeineke 377 initSimError(); // the error handler
36     srand48( 1337 ); // the random number generator.
37    
38    
39     // check command line arguments, and set the input file
40    
41     program_name = argv[0]; // save the program name in case we need it
42    
43     if( worldRank == 0 ){
44     if( argc < 2 ){
45     strcpy( painCave.errMsg, "Error, bass file is needed to run.\n" );
46     painCave.isFatal = 1;
47     simError();
48     }
49     }
50    
51     in_name = argv[1];
52    
53     strcpy( checkPointMsg, "Successful number of arguments" );
54     MPIcheckPoint();
55    
56    
57     // create the simulation objects, and get the show on the road
58    
59     entry_plug = new SimInfo;
60     startMe = new SimSetup;
61    
62     startMe->setSimInfo( entry_plug );
63     startMe->parseFile( in_name );
64     startMe->createSim();
65    
66     delete startMe;
67    
68     entry_plug->the_integrator->integrate();
69    
70     strcpy( checkPointMsg, "Oh what a lovely Tea Party!" );
71     MPIcheckPoint();
72    
73     MPI_Finalize();
74     return 0 ;
75     }
76    
77     #endif