ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/BASS_parse/interface.c
(Generate patch)

Comparing trunk/mdtools/BASS_parse/interface.c (file contents):
Revision 118 by chuckv, Wed Sep 25 22:51:14 2002 UTC vs.
Revision 163 by mmeineke, Tue Nov 5 22:04:42 2002 UTC

# Line 4 | Line 4
4  
5   #include "interface.h"
6   #include "../headers/BASS_interface.h"
7 + #include "../headers/simError.h"
8 + #ifdef IS_MPI
9 + #include "../headers/mpiBASS.h"
10 + #endif
11  
12   void interface_error( event* the_event );
13  
# Line 17 | Line 21 | void init_component( int comp_index ){
21    the_event->evt.blk_index = comp_index;
22  
23    if( !event_handler( the_event ) ) interface_error( the_event );
24 < #ifdef MPI
24 > #ifdef IS_MPI
25    throwMPIEvent(the_event);
26   #endif
27  
# Line 34 | Line 38 | void init_molecule( int mol_index ){
38    the_event->evt.blk_index = mol_index;
39  
40    if( !event_handler( the_event ) ) interface_error( the_event );
41 < #ifdef MPI
41 > #ifdef IS_MPI
42    throwMPIEvent(the_event);
43   #endif
44    
# Line 51 | Line 55 | void init_atom( int atom_index ){
55    the_event->evt.blk_index = atom_index;
56  
57    if( !event_handler( the_event ) ) interface_error( the_event );
58 < #ifdef MPI
58 > #ifdef IS_MPI
59    throwMPIEvent(the_event);
60   #endif
61    
# Line 68 | Line 72 | void init_bond( int bond_index ){
72    the_event->evt.blk_index = bond_index;
73  
74    if( !event_handler( the_event ) ) interface_error( the_event );
75 < #ifdef MPI
75 > #ifdef IS_MPI
76    throwMPIEvent(the_event);
77   #endif
78    
# Line 85 | Line 89 | void init_bend( int bend_index ){
89    the_event->evt.blk_index = bend_index;
90  
91    if( !event_handler( the_event ) ) interface_error( the_event );
92 < #ifdef MPI
92 > #ifdef IS_MPI
93    throwMPIEvent(the_event);
94   #endif
95    
# Line 102 | Line 106 | void init_torsion( int torsion_index ){
106    the_event->evt.blk_index = torsion_index;
107  
108    if( !event_handler( the_event ) ) interface_error( the_event );
109 < #ifdef MPI
109 > #ifdef IS_MPI
110    throwMPIEvent(the_event);
111   #endif
112    
# Line 128 | Line 132 | void init_members( struct node_tag* the_node,
132    the_event->evt.mbr.d = the_node->the_data.mbr.d;
133  
134    if( !event_handler( the_event ) ) interface_error( the_event );
135 < #ifdef MPI
135 > #ifdef IS_MPI
136    throwMPIEvent(the_event);
137   #endif
138    
# Line 146 | Line 150 | void init_constraint( struct node_tag* the_node,
150    the_event->evt.cnstr = the_node->the_data.cnstr.constraint_val;
151  
152    if( !event_handler( the_event ) ) interface_error( the_event );
153 < #ifdef MPI
153 > #ifdef IS_MPI
154    throwMPIEvent(the_event);
155   #endif
156    
# Line 183 | Line 187 | void init_assignment( struct node_tag* the_node,
187    }
188  
189    if( !event_handler( the_event ) ) interface_error( the_event );
190 < #ifdef MPI
190 > #ifdef IS_MPI
191    throwMPIEvent(the_event);
192   #endif
193    
# Line 203 | Line 207 | void init_position( struct node_tag* the_node,
207    the_event->evt.pos.z = the_node->the_data.pos.z;
208  
209    if( !event_handler( the_event ) ) interface_error( the_event );
210 < #ifdef MPI
210 > #ifdef IS_MPI
211    throwMPIEvent(the_event);
212   #endif
213    
# Line 223 | Line 227 | void init_orientation( struct node_tag* the_node,
227    the_event->evt.ornt.z = the_node->the_data.ort.z;
228  
229    if( !event_handler( the_event ) ) interface_error( the_event );
230 < #ifdef MPI
230 > #ifdef IS_MPI
231    throwMPIEvent(the_event);
232   #endif
233    
# Line 240 | Line 244 | void end_of_block( void ){
244    the_event->err_msg = NULL;
245  
246    if( !event_handler( the_event ) ) interface_error( the_event );
247 < #ifdef MPI
247 > #ifdef IS_MPI
248    throwMPIEvent(the_event);
249   #endif
250    
# Line 249 | Line 253 | void interface_error( event* the_event ){
253  
254   void interface_error( event* the_event ){
255  
256 <  fprintf( stderr,
256 >  sprintf( painCave.errMsg,
257             "**Interface event error**\n"
258             "%s\n",
259             the_event->err_msg );
260 <  exit(1);
260 >  simError();
261 >  mpiInterfaceExit();
262   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines