ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/interface_implementation/SimSetup.cpp
(Generate patch)

Comparing trunk/mdtools/interface_implementation/SimSetup.cpp (file contents):
Revision 145 by mmeineke, Fri Oct 18 15:34:21 2002 UTC vs.
Revision 176 by mmeineke, Thu Nov 14 22:00:44 2002 UTC

# Line 6 | Line 6
6   #include "parse_me.h"
7   #include "LRI.hpp"
8   #include "Integrator.hpp"
9 + #include "simError.h"
10  
11   #ifdef IS_MPI
12   #include "mpiBASS.h"
# Line 15 | Line 16 | SimSetup::SimSetup(){
16   SimSetup::SimSetup(){
17    stamps = new MakeStamps();
18    globals = new Globals();
19 +  
20 + #ifdef IS_MPI
21 +  strcpy( checkPointMsg, "SimSetup creation successful" );
22 +  MPIcheckPoint();
23 + #endif // IS_MPI
24   }
25  
26   SimSetup::~SimSetup(){
# Line 24 | Line 30 | void SimSetup::parseFile( char* fileName ){
30  
31   void SimSetup::parseFile( char* fileName ){
32  
27  inFileName = fileName;
28  set_interface_stamps( stamps, globals );
33   #ifdef IS_MPI
34 <  mpiEventInit();
34 >  if( worldRank == 0 ){
35 > #endif // is_mpi
36 >    
37 >    inFileName = fileName;
38 >    set_interface_stamps( stamps, globals );
39 >    
40 > #ifdef IS_MPI
41 >    mpiEventInit();
42   #endif
43 <  yacc_BASS( fileName );
43 >
44 >    yacc_BASS( fileName );
45 >
46   #ifdef IS_MPI
47 <  throwMPIEvent(NULL);
47 >    throwMPIEvent(NULL);
48 >  }
49 >  else receiveParse();
50   #endif
51  
52   }
# Line 41 | Line 56 | void SimSetup::receiveParse(void){
56  
57      set_interface_stamps( stamps, globals );
58      mpiEventInit();
59 +    MPIcheckPoint();
60      mpiEventLoop();
61  
62   }
# Line 52 | Line 68 | void SimSetup::createSim( void ){
68    delete dumpMe;
69   }
70   #endif
71 +
72   void SimSetup::createSim( void ){
73  
74    MakeStamps *the_stamps;
# Line 76 | Line 93 | void SimSetup::createSim( void ){
93    else if( !strcmp( force_field, "DipoleTest" ) ) the_ff = new DipoleTestFF();
94    else if( !strcmp( force_field, "TraPPE_Ex" ) ) the_ff = new TraPPE_ExFF();
95    else{
96 <    std::cerr<< "SimSetup Error. Unrecognized force field -> "
97 <             << force_field << "\n";
98 <    exit(8);
96 >    sprintf( painCave.errMsg,
97 >             "SimSetup Error. Unrecognized force field -> %s\n",
98 >             force_field );
99 >    painCave.isFatal = 1;
100 >    simError();
101    }
102  
103 + #ifdef IS_MPI
104 +  strcpy( checkPointMsg, "ForceField creation successful" );
105 +  MPIcheckPoint();
106 + #endif // is_mpi
107 +
108    // get the components and calculate the tot_nMol and indvidual n_mol
109    the_components = the_globals->getComponents();
110    components_nmol = new int[n_components];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines