Commit ff472619 authored by Iulian Grindeanu's avatar Iulian Grindeanu

do not redefine assert

use assert.h
parent 838dbf92
......@@ -9,7 +9,7 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <vector>
#include <set>
#include <map>
......@@ -153,24 +153,6 @@ void VALGRIND_MAKE_VEC_UNDEFINED(std::vector<T>& v) {
#define END_SERIAL
#endif
#ifdef NDEBUG
#undef assert
#define assert
#else
#undef assert
#define assert(A) \
if (!(A)) \
do_assert(__FILE__, __LINE__, #A)
static void do_assert(const char* file, int line, const char* condstr)
{
int rank;
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
fprintf(stderr, "[%d] Assert(%s) failed at %s:%d\n", rank, condstr, file, line);
fflush(stderr);
abort();
}
#endif
static int my_Gatherv(void* sendbuf,
int sendcount,
MPI_Datatype sendtype,
......
Markdown is supported
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