-
Notifications
You must be signed in to change notification settings - Fork 2
MPI_T Events
Marc-Andre Hermanns edited this page Apr 27, 2017
·
21 revisions
- Should cover the capabilities of current MPI Peruse implementations
- Should be thread safe
- When a callback is invoked, it is undefined whether the MPI library is under a lock or not and the callback code should not make any assumptions about the lock state of the MPI library
- Callbacks should be prepared to be invoked from different threads when used with MPI implementations with independent progress engine using internal system threads
- Callbacks should be signal safe as some MPI libraries use signals for their progress engine and the callback could be invoked from within a signal handler
- Callbacks should not make any MPI library calls with the exception of MPI timing routines (
MPI_Wtime()
,MPI_Wtick()
, and potential successors) and event data queries. - Callbacks should not hold any locks that are placed around MPI calls in the main code.
- Callbacks should be limited to read-only operations on MPI_T event handles.
- Event information could be encoded as an array of datatypes.
- Callback info must enable unambiguous identification to which thread/process it belongs to
- The callback information should contain pointer (void*) to tool-specific storage that was provided to MPI by the tool during event registration
- Event subsystem is initialized with
MPI_T_init_thread
- Event subsystem is finalized with
MPI_T_finalize
- Support buffered events
- Callback functions are triggered by the runtime system
- Event meta data may include a timestamp for a buffered event
- Tool queries
MPI_T_event_get_time
to either get the buffered timestamp or generate a new one on the fly - Querying event time is transparent for tool
- Should we semantically connect events through the definition of stages? How would those stages be queried?
void my_event_read_handler( MPI_T_event event,
MPI_T_cb_safety cb_safety,
void* data) {
// cast user-data point back to its correct type
MyTool_data* tool_data = (MyTool_data*) data;
// Query time of event
MPI_Time mytime;
MPI_T_event_get_time(event, &mytime);
// Query source of event
int event_source;
MPI_T_event_get_source( event, &event_source );
// Identify event
int event_index;
MPI_T_event_get_index_by_handle( event, &event_index );
// dispatch handler
switch (event_index) {
...
case 42:
int rank, tag;
MPI_T_event_read( event, 0, &rank );
MPI_T_event_read( event, 1, &tag );
MyTool_write_event_42( mydata, source, time, rank, tag );
break;
...
default:
// handle unknown event
};
}
- April 13, 2017 Meetings Notes
- March 30, 2017 Meeting Notes
- March 16, 2017 Meeting Notes
- February 28, 2017 Forum WG Meeting Notes
- January 19, 2017 Meeting Notes
- January 5, 2017 Meeting Notes
- December 6, 2016 Meeting Notes
- September 21, 2016 Meeting Notes
- Aug 4, 2016 Meeting Notes
- July 21, 2016 Meeting Notes
- June 7, 2016 Forum WG Meeting Notes
- May 26, 2016 Meeting Notes
- May 12, 2016 Meeting Notes
- April 14, 2016 Meeting Notes
- March 24, 2016 Meeting Notes
- March 1, 2016 Forum WG Meeting Notes