Commit fa1c714d authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

die in an MPI-conformant way when running with MPI.


Former-commit-id: 600e09db0adf4742d48ed3ea66caaaec8a2d52cc
parent 10025b12
......@@ -27,7 +27,7 @@
*/
#ifdef WITH_MPI
extern int engine_rank;
#define error(s, ...) { fprintf( stderr , "[%03i] %s:%s():%i: " s "\n" , engine_rank , __FILE__ , __FUNCTION__ , __LINE__ , ##__VA_ARGS__ ); abort(); }
#define error(s, ...) { fprintf( stderr , "[%03i] %s:%s():%i: " s "\n" , engine_rank , __FILE__ , __FUNCTION__ , __LINE__ , ##__VA_ARGS__ ); MPI_Abort(MPI_COMM_WORLD, -1); }
#else
#define error(s, ...) { fprintf( stderr , "%s:%s():%i: " s "\n" , __FILE__ , __FUNCTION__ , __LINE__ , ##__VA_ARGS__ ); abort(); }
#endif
......
......@@ -27,6 +27,9 @@
#include <string.h>
#include <stddef.h>
#include <math.h>
#ifdef WITH_MPI
#include <mpi.h>
#endif
#include "const.h"
#include "cycle.h"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment