LibCircle 0.3.0
A simple interface for processing workloads using an automatically distributed global queue.
|
Functions | |
void | CIRCLE_bcast_abort (void) |
void | CIRCLE_abort_check (CIRCLE_state_st *st, int cleanup) |
int | CIRCLE_check_for_term (CIRCLE_state_st *st) |
void | CIRCLE_get_next_proc (CIRCLE_state_st *st) |
int8_t | CIRCLE_extend_offsets (CIRCLE_state_st *st, int32_t size) |
Extend the offset arrays. | |
int32_t | CIRCLE_request_work (CIRCLE_internal_queue_t *qp, CIRCLE_state_st *st, int cleanup) |
Requests work from other ranks. | |
void | CIRCLE_send_no_work (int dest) |
void | CIRCLE_workreceipt_check (CIRCLE_internal_queue_t *qp, CIRCLE_state_st *st) |
void | CIRCLE_workreq_check (CIRCLE_internal_queue_t *qp, CIRCLE_state_st *st, int cleanup) |
void | CIRCLE_print_offsets (uint32_t *offsets, int32_t count) |
Variables | |
CIRCLE_input_st | CIRCLE_INPUT_ST |
Handles features of libcircle related to tokens (for self stabilization).
void CIRCLE_abort_check | ( | CIRCLE_state_st * | st, |
int | cleanup ) |
Check whether we have received abort signal.
Check whether we have received abort signal from the calling process or from an abort request message sent by another process, forward abort messages on tree if needed.
void CIRCLE_bcast_abort | ( | void | ) |
Sends an abort message to all ranks.
This function is used to send a 'poisoned' work request to each rank, so that they will know to abort.
References CIRCLE_global_rank.
Referenced by CIRCLE_abort().
int CIRCLE_check_for_term | ( | CIRCLE_state_st * | st | ) |
Checks for incoming tokens, determines termination conditions.
When the master rank is idle, it generates a token that is initially white. When a node is idle, and can't get work for one loop iteration, then it checks for termination. It checks to see if the token has been passed to it, additionally checking for the termination token. If a rank receives a black token then it forwards a black token. Otherwise it forwards its own color.
All nodes start out in the white state. State is not the same thing as the token. If a node j sends work to a rank i (i < j) then its state turns black. It then turns the token black when it comes around, forwards it, and turns its state back to white.
st | the libcircle state struct. |
|
inline |
This returns a rank (not yourself).
Referenced by CIRCLE_request_work().
void CIRCLE_print_offsets | ( | uint32_t * | offsets, |
int32_t | count ) |
Print the offsets of a copied queue.
int32_t CIRCLE_request_work | ( | CIRCLE_internal_queue_t * | qp, |
CIRCLE_state_st * | st, | ||
int | cleanup ) |
Requests work from other ranks.
Request work from a random rank. If it receives no work in the work reply from that process, a different rank will be asked during the next iteration.
References CIRCLE_get_next_proc().
void CIRCLE_send_no_work | ( | int | dest | ) |
Sends a no work reply to someone requesting work.
References CIRCLE_INPUT_ST.
Referenced by CIRCLE_workreq_check().
void CIRCLE_workreceipt_check | ( | CIRCLE_internal_queue_t * | qp, |
CIRCLE_state_st * | st ) |
Checks for outstanding work requests
void CIRCLE_workreq_check | ( | CIRCLE_internal_queue_t * | qp, |
CIRCLE_state_st * | st, | ||
int | cleanup ) |
Checks for outstanding work requests
References CIRCLE_send_no_work().
|
extern |
A struct which holds a reference to all input given through the API.