Scioto API
This page provides documentation on the Scioto Global Task Collection (GTC) API intended for use at the application level.
Contents |
Task Collection Types
These are the types that can be used by an application programmer. A portable type can be transferred over the network and is valid on all processes. It can also be embedded in a task descriptor and copied via simple assignment.
gtc_t - Portable reference to a task collection
task_t - Local buffer containing a task descriptor
task_class_t - Portable reference to a task class
clod_key_t - Portable reference to a common local object
Task Collection API
Creation and Destruction
gtc_t gtc_create(int max_body_size, int chunk_size, int shrb_size, MPI_Comm comm);
void gtc_destroy(gtc_t gtc);
void gtc_reset(gtc_t gtc);
Populating and Execution
int gtc_add(gtc_t gtc, task_t *task, int master); void gtc_process(gtc_t gtc);
Diagnostic/Performance Functions
void gtc_print_stats(gtc_t gtc);
void gtc_print_config(gtc_t gtc);
void gtc_set_chunk_size(gtc_t gtc, int cs);
void gtc_enable_stealing(gtc_t gtc);
void gtc_disable_stealing(gtc_t gtc);
Task Object API
A task collection contains a set of task objects. Every task object has a class associated with it that defines the properties of that task, including the size of the task object's body and how the task should be executed. A task class is required when creating a task, so the programmer must register task classes before creating tasks.
Task Classes
Task classes live outside of any particular task collection and persist throughout the entire computation. Thus, for a given program, a task class need only be created once.
- body_size - The size of the task's body
- cb_execute - The function that should be invoked to execute this task. This function gets a reference to the task collection as well as a pointer to a local copy of the task descriptor.
Task Object Management
task_t *gtc_task_create(task_class_t tclass);
void gtc_task_destroy(task_t *task);
void gtc_task_reuse(task_t *task);
void gtc_task_set_affinity(task_t *task, int affinity);
task_class_t gtc_task_get_class(task_t *task);
int gtc_task_body_size(task_t *task);
void *gtc_task_body(task_t *task);
Common Local Object (CLO) Database API
clod_key_t gtc_clo_associate(gtc_t gtc, void *ptr);
void *gtc_clo_lookup(gtc_t gtc, clod_key_t id);
void gtc_clo_assign(gtc_t gtc, clod_key_t id, void *ptr);
void gtc_clo_reset(gtc_t gtc);