| 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 |
|
|
| 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 |
|
|
| 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 |
|
|
| 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 |
|
|
| 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 |
|
|
| 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 |
|
|
| 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 |
|
|
| 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 |
|
|
| 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 |
|
|
| 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 |
|
|
| 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 |
|
|
| 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 |
|
|
| 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 |
|
|
| 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 |
|
} |