1 |
+ |
|
2 |
|
#include <cstring> |
3 |
|
#include <cstdio> |
4 |
|
#include <cstdlib> |
6 |
|
#include "SimSetup.hpp" |
7 |
|
#include "Globals.hpp" |
8 |
|
#include "BASS_interface.h" |
9 |
+ |
#include "simError.h" |
10 |
|
|
11 |
|
#ifdef IS_MPI |
12 |
< |
#include "mpiInterface.h" |
12 |
> |
#include "mpiBASS.h" |
13 |
|
#endif |
14 |
|
|
15 |
|
|
263 |
|
block_stack_ptr++; |
264 |
|
|
265 |
|
if( block_stack_ptr >= MAX_NEST ){ |
266 |
< |
fprintf( stderr, "Event blocks nested too deeply\n" ); |
266 |
> |
sprintf( painCave.errMsg, |
267 |
> |
"Event blocks nested too deeply\n" ); |
268 |
> |
painCave.isFatal = 1; |
269 |
> |
simError(); |
270 |
> |
|
271 |
|
#ifdef IS_MPI |
272 |
< |
mpiInterfaceExit(); |
273 |
< |
#endif |
268 |
< |
exit(1); |
272 |
> |
if( worldRank == 0 ) mpiInterfaceExit(); |
273 |
> |
#endif //is_mpi |
274 |
|
} |
275 |
|
|
276 |
|
else current_block = new_block; |
283 |
|
|
284 |
|
if( block_stack_ptr < 0 ){ |
285 |
|
|
286 |
< |
fprintf( stderr, "Too many event blocks closed\n" ); |
286 |
> |
sprintf( painCave.errMsg, |
287 |
> |
"Too many event blocks closed\n" ); |
288 |
> |
painCave.isFatal = 1; |
289 |
> |
simError(); |
290 |
> |
|
291 |
|
#ifdef IS_MPI |
292 |
< |
mpiInterfaceExit(); |
293 |
< |
#endif |
294 |
< |
exit(1); |
292 |
> |
if( worldRank == 0 ) mpiInterfaceExit(); |
293 |
> |
#endif //is_mpi |
294 |
> |
|
295 |
|
} |
296 |
|
|
297 |
|
else current_block = block_stack[block_stack_ptr]; |