LibCircle
0.2.1-rc.1
A simple interface for processing workloads using an automatically distributed global queue.
|
Functions | |
void | CIRCLE_bcast_abort (void) |
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. More... | |
void | CIRCLE_send_no_work (int dest) |
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_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, and CIRCLE_INPUT_ST.
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).
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.
Somewhat complicated, but essentially it requests work from a random rank. If it doesn't receive work, a different rank will be asked during the next iteration.
void CIRCLE_send_no_work | ( | int | dest | ) |
Sends a no work reply to someone requesting work.
void CIRCLE_workreq_check | ( | CIRCLE_internal_queue_t * | qp, |
CIRCLE_state_st * | st, | ||
int | cleanup | ||
) |
Checks for outstanding work requests
CIRCLE_input_st CIRCLE_INPUT_ST |
A struct which holds a reference to all input given through the API.
Referenced by CIRCLE_bcast_abort().