UniMCI User Documentation |
![]() |
---|
Header for UniMCI core functions. More...
#include "unimci-message.h"
Typedefs | |
typedef int(* | UNIMCI_MSG_CALLBACK )(UNIMCI_MSG *msg) |
Type that describes the UniMCI call-back function. | |
Enumerations | |
enum | UNIMCI_BINDING_LANGUAGE { UNIMCI_LANGUAGE_C = 0, UNIMCI_LANGUAGE_FORTRAN } |
Enumerates the MPI binding languages. More... | |
Functions | |
void | UNIMCI_on (void) |
Turns UniMCI and its used MPI correctness checker on. | |
void | UNIMCI_off (void) |
Turns UniMCI and its used MPI correctness checker off. | |
void | UNIMCI_set_binding_language (UNIMCI_BINDING_LANGUAGE language) |
Sets the currently used MPI binding language. | |
int | UNIMCI_register_msg_callback (UNIMCI_MSG_CALLBACK callback) |
Registers the given function as a call-back that is used to return messages that were generated asynchronously. | |
int | UNIMCI_has_msg (void) |
Returns whether the MPI checker has a not yet queried message. | |
int | UNIMCI_get_num_msgs (void) |
Returns number of outstanding messages. | |
int | UNIMCI_pop_msg (UNIMCI_MSG **msg_record) |
Returns the first not yet queried message. | |
int | UNIMCI_get_msgs (UNIMCI_MSG ***out_msgs, int *out_num_msgs) |
Returns all messages. | |
const char * | UNIMCI_get_checker_name (void) |
Returns the name of the back-end MPI checker. | |
const char * | UNIMCI_get_checker_version (void) |
Returns the version of the MPI checker. |
Header for UniMCI core functions.
The core function include function to retrieve and query messages, to set a call-back function, and to switch UniMCI on or off.
typedef int(* UNIMCI_MSG_CALLBACK)(UNIMCI_MSG *msg) |
Type that describes the UniMCI call-back function.
const char* UNIMCI_get_checker_name | ( | void | ) |
Returns the name of the back-end MPI checker.
const char* UNIMCI_get_checker_version | ( | void | ) |
Returns the version of the MPI checker.
int UNIMCI_get_msgs | ( | UNIMCI_MSG *** | out_msgs, | |
int * | out_num_msgs | |||
) |
Returns all messages.
UNIMCI_MSG **msgs = NULL; int num_msgs, i; UNIMCI_get_msgs (&msgs, &num_msgs); for (i = 0; i < num_msgs; i++) { //do something with msgs[i] UNIMCI_msg_free (&(msgs[i])); } if (msgs) free (msgs); msgs = NULL;
out_msgs | Pre: address of a UNIMCI_MSG** pointer, Post: array with pointers to the individual messages. | |
out_num_msgs | number of messages in the array, equals UNIMCI_get_num_msgs. |
int UNIMCI_get_num_msgs | ( | void | ) |
Returns number of outstanding messages.
int UNIMCI_has_msg | ( | void | ) |
Returns whether the MPI checker has a not yet queried message.
Turns UniMCI and its used MPI correctness checker off.
Starts as switched on. Use this call and UNIMCI_on to hide your own MPI calls from UniMCI.
int UNIMCI_pop_msg | ( | UNIMCI_MSG ** | msg_record | ) |
Returns the first not yet queried message.
Usage Example:
UNIMCI_MSG *msg = NULL; UNIMCI_pop_msg (&msg); //do something with the msg UNIMCI_msg_free (&msg);
msg_record | address of a pointer which will be set to contain the retrieved record. |
int UNIMCI_register_msg_callback | ( | UNIMCI_MSG_CALLBACK | callback | ) |
Registers the given function as a call-back that is used to return messages that were generated asynchronously.
Must be called directly after UNIMCI_check_post__MPI_Init*. Usage of this function is optional, if no call-back is given all asynchronous messages can be retrieved with UNIMCI_pop_msg. However, for some errors, e.g., deadlock, it may be impossible to perform such a call. If a call-back function is given it may be called by another thread, so the user code may need extra mutual exclusion code.
callback | the call-back function passed to UniMCI. |
void UNIMCI_set_binding_language | ( | UNIMCI_BINDING_LANGUAGE | language | ) |
Sets the currently used MPI binding language.
As all UniMCI calls are in C style it can't differentiate whether the Fortran or C bindings of MPI are used. Thus, the current binding language may be set with this call. The default is that the C language is used.
language | the new binding language. |