LibCircle
0.2.1-rc.1
A simple interface for processing workloads using an automatically distributed global queue.
|
Functions | |
CIRCLE_handle * | CIRCLE_get_handle () |
__inline__ int32_t | CIRCLE_init (int argc, char *argv[], int user_options) |
__inline__ void | CIRCLE_cb_create (CIRCLE_cb func) |
void | CIRCLE_set_options (int user_options) |
__inline__ void | CIRCLE_cb_process (CIRCLE_cb func) |
__inline__ void | CIRCLE_cb_reduce_init (CIRCLE_cb_reduce_init_fn func) |
__inline__ void | CIRCLE_cb_reduce_op (CIRCLE_cb_reduce_op_fn func) |
__inline__ void | CIRCLE_cb_reduce_fini (CIRCLE_cb_reduce_fini_fn func) |
__inline__ void | CIRCLE_reduce (const void *buf, size_t size) |
__inline__ void | CIRCLE_begin (void) |
__inline__ void | CIRCLE_checkpoint (void) |
__inline__ void | CIRCLE_read_restarts (void) |
__inline__ void | CIRCLE_abort (void) |
__inline__ void | CIRCLE_finalize (void) |
__inline__ void | CIRCLE_enable_logging (enum CIRCLE_loglevel level) |
__inline__ double | CIRCLE_wtime (void) |
Variables | |
FILE * | CIRCLE_debug_stream |
enum CIRCLE_loglevel | CIRCLE_debug_level |
int32_t | CIRCLE_global_rank |
char | CIRCLE_WORK_COMM_NAME [32] = "Libcircle Work Comm" |
CIRCLE_input_st | CIRCLE_INPUT_ST |
CIRCLE_handle | queue_handle |
The library source contains the internal implementation of each API hook.
__inline__ void CIRCLE_abort | ( | void | ) |
Call this function to have all ranks dump a checkpoint file and exit.
References CIRCLE_bcast_abort().
__inline__ void CIRCLE_begin | ( | void | ) |
Once you've defined and told libcircle about your callbacks, use this to execute your program.
References CIRCLE_worker().
__inline__ void CIRCLE_cb_create | ( | CIRCLE_cb | func | ) |
Processing and creating work is done through callbacks. Here's how we tell libcircle about our function which creates an initial workload. This call is optional.
func | the callback to be used in the creation stage. |
References CIRCLE_INPUT_ST.
__inline__ void CIRCLE_cb_process | ( | CIRCLE_cb | func | ) |
After you give libcircle a way to create work, you need to tell it how that work should be processed.
func | the callback to be used in the process stage. |
References CIRCLE_INPUT_ST.
__inline__ void CIRCLE_cb_reduce_fini | ( | CIRCLE_cb_reduce_fini_fn | func | ) |
This function will be invoked on the root (rank 0) to provide the final result of the reduction.
func | the callback to be provide reduction output on root. |
References CIRCLE_INPUT_ST.
__inline__ void CIRCLE_cb_reduce_init | ( | CIRCLE_cb_reduce_init_fn | func | ) |
This function will be invoked on all processes to get initial input data for the reduction.
func | the callback to be used to provide data for reduction. |
References CIRCLE_INPUT_ST.
__inline__ void CIRCLE_cb_reduce_op | ( | CIRCLE_cb_reduce_op_fn | func | ) |
This function will be invoked on processes to execute the reduction tree.
func | the callback to be used to combine data during reduction. |
References CIRCLE_INPUT_ST.
__inline__ void CIRCLE_checkpoint | ( | void | ) |
Call this function to checkpoint libcircle's distributed queue. Each rank writes a file called circle<rank>.txt
References _CIRCLE_checkpoint().
__inline__ void CIRCLE_enable_logging | ( | enum CIRCLE_loglevel | level | ) |
Set the logging level that libcircle should use.
level | the logging level that libcircle should output. |
References CIRCLE_debug_level.
__inline__ void CIRCLE_finalize | ( | void | ) |
After your program has executed, give libcircle a chance to clean up after itself by calling this. This should be called after all libcircle API calls.
References CIRCLE_INPUT_ST, and CIRCLE_internal_queue_free().
CIRCLE_handle* CIRCLE_get_handle | ( | void | ) |
Function to return a pointer to the handle. Useful for threaded applications. You are responsible for maintaining mutual exclusion.
References queue_handle.
__inline__ int32_t CIRCLE_init | ( | int | argc, |
char * | argv[], | ||
int | user_options | ||
) |
Initialize internal state needed by libcircle. This should be called before any other libcircle API call.
argc | the number of arguments passed into the program. |
argv | the vector of arguments passed into the program. |
References CIRCLE_debug_level, CIRCLE_debug_stream, CIRCLE_INPUT_ST, and CIRCLE_set_options().
__inline__ void CIRCLE_read_restarts | ( | void | ) |
Call this function to read in libcircle restart files.
References _CIRCLE_read_restarts().
__inline__ void CIRCLE_reduce | ( | const void * | buf, |
size_t | size | ||
) |
Call this function to give libcircle initial reduction data.
buf | pointer to buffer holding reduction data |
size | size of buffer in bytes |
void CIRCLE_set_options | ( | int | user_options | ) |
Change run time flags
References CIRCLE_INPUT_ST.
Referenced by CIRCLE_init().
__inline__ double CIRCLE_wtime | ( | void | ) |
Returns an elapsed time on the calling processor for benchmarking purposes.
enum CIRCLE_loglevel CIRCLE_debug_level |
The current log level of library logging output.
Referenced by CIRCLE_enable_logging(), and CIRCLE_init().
FILE* CIRCLE_debug_stream |
The debug stream for all logging messages.
Referenced by CIRCLE_init().
int32_t CIRCLE_global_rank |
The rank value of the current node.
Referenced by _CIRCLE_checkpoint(), _CIRCLE_read_restarts(), and CIRCLE_bcast_abort().
CIRCLE_input_st CIRCLE_INPUT_ST |
A struct which holds a reference to all input given through the API.
Referenced by _CIRCLE_checkpoint(), _CIRCLE_read_restarts(), CIRCLE_bcast_abort(), CIRCLE_cb_create(), CIRCLE_cb_process(), CIRCLE_cb_reduce_fini(), CIRCLE_cb_reduce_init(), CIRCLE_cb_reduce_op(), CIRCLE_finalize(), CIRCLE_init(), and CIRCLE_set_options().
char CIRCLE_WORK_COMM_NAME[32] = "Libcircle Work Comm" |
Communicator names
CIRCLE_handle queue_handle |
Handle to the queue
Referenced by CIRCLE_get_handle(), and CIRCLE_worker().