UniMCI User Documentation

ZIH Logo

unimci-core.h File Reference

Header for UniMCI core functions. More...

#include "unimci-message.h"
Include dependency graph for unimci-core.h:
This graph shows which files directly or indirectly include this file:

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.

Detailed Description

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.

Author:
Tobias Hilbrich
Date:
03.12.2008

Typedef Documentation

typedef int(* UNIMCI_MSG_CALLBACK)(UNIMCI_MSG *msg)

Type that describes the UniMCI call-back function.

See also:
UNIMCI_register_msg_callback

Enumeration Type Documentation

Enumerates the MPI binding languages.

Enumerator:
UNIMCI_LANGUAGE_C 

MPI C bindings are used.

UNIMCI_LANGUAGE_FORTRAN 

MPI Fortran bindings are used.


Function Documentation

const char* UNIMCI_get_checker_name ( void   ) 

Returns the name of the back-end MPI checker.

Returns:
string with the name of the MPI checker.
const char* UNIMCI_get_checker_version ( void   ) 

Returns the version of the MPI checker.

Returns:
string with the name 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;
Parameters:
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.

Returns:
number of outstanding messages.
int UNIMCI_has_msg ( void   ) 

Returns whether the MPI checker has a not yet queried message.

Returns:
1 if a not yet returned message exists, 0 otherwise.
void UNIMCI_off ( void   ) 

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.

See also:
UNIMCI_on
void UNIMCI_on ( void   ) 

Turns UniMCI and its used MPI correctness checker on.

Starts as switched on.

See also:
UNIMCI_off
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);
Parameters:
msg_record address of a pointer which will be set to contain the retrieved record.
Returns:
0 if the call was successfull, 1 if an error occurred or no message is available.
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.

Parameters:
callback the call-back function passed to UniMCI.
Returns:
0 if the call was successful, 1 otherwise.
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.

See also:
UNIMCI_BINDING_LANGUAGE
Parameters:
language the new binding language.

Generated on Tue May 18 10:09:18 2010 for UniMCI by  doxygen 1.6.1