dis_macros.h File Reference

Go to the source code of this file.

## Namespaces

| rheolef
| This file is part of Rheolef.

## Macros

#define | fatal_macro(message)
#define | error_macro(message) fatal_macro(message)
#define | warning_macro(message)
#define | dis_warning_macro(message)
#define | trace_macro(message)
#define | dis_trace_macro(message)
#define | assert_macro(ok_condition, message)

## Macro Definition Documentation

## fatal_macro

#define fatal_macro | ( |  | message | ) |

Value:
{ \
if (mpi::environment::initialized() && !mpi::environment::finalized()) { \
std::cerr << "fatal{" << mpi::communicator().rank() << "}(" \
<< __FILE__ << "," << __LINE__ << "): " \
<< message << std::endl << std::flush; \
mpi::environment::abort (1); \
} else { \
std::cerr << "fatal(" \
<< __FILE__ << "," << __LINE__ << "): " \
<< message << std::endl << std::flush; \
exit(1); \
} \
}

Definition at line 33 of file dis_macros.h.

## error_macro

#define error_macro | ( |  | message | ) | fatal_macro(message)

Definition at line 49 of file dis_macros.h.

## warning_macro

#define warning_macro | ( |  | message | ) |

Value:
{ \
if (mpi::environment::initialized() && !mpi::environment::finalized()) { \
std::cerr << "warning{"<< mpi::communicator().rank() << "}(" \
<< __FILE__ << "," << __LINE__ << "): " \
<< message << std::endl << std::flush; \
} else { \
std::cerr << "warning(" \
<< __FILE__ << "," << __LINE__ << "): " \
<< message << std::endl << std::flush; \
} \
}

Definition at line 53 of file dis_macros.h.

## dis_warning_macro

#define dis_warning_macro | ( |  | message | ) |

Value:
{ \
if (mpi::environment::initialized() && !mpi::environment::finalized()) { \
mpi::communicator().barrier(); \
derr << "warning(" << __FILE__ << "," << __LINE__ \
<< "): " << message << std::endl << std::flush; \
mpi::communicator().barrier(); \
} else { \
std::cerr << "warning(" \
<< __FILE__ << "," << __LINE__ << "): " \
<< message << std::endl << std::flush; \
} \
}

Definition at line 66 of file dis_macros.h.

## trace_macro

#define trace_macro | ( |  | message | ) |

Definition at line 111 of file dis_macros.h.

## dis_trace_macro

#define dis_trace_macro | ( |  | message | ) |

Definition at line 112 of file dis_macros.h.

## assert_macro

#define assert_macro | ( |  | ok_condition,
|  |  | message
| ) |  |

Definition at line 113 of file dis_macros.h.