Scioto API
This page is currently under construction
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 shrb_size, MPI_Comm comm)
- Create a new task collection. (collective)
-
- returns - Portable reference to the task collection
- max_body_size - Maximum body size for any task in this collection. Tasks with a larger body size cannot be added to the collection.
- shrb_size - Size of the work queue in number of tasks for this process
- comm - MPI Communicator that this collection should run on (usually MPI_COMM_WORLD)
- void gtc_destroy(gtc_t gtc)
- Destroy a task collection. (collective)
- gtc - Reference to the task collection
- void gtc_reset(gtc_t gtc)
- Reset a task collection so that it can be used again. (collective)
-
- gtc - Reference to the task collection
Populating and Execution
- int gtc_add(gtc_t gtc, task_t *task, int master)
- Add a task to the task collection.
- gtc - Reference to the task collection
- task - Local task object
- master - Process to add the task to.
- void gtc_process(gtc_t gtc)
- Execute all tasks in the task collection. (collective)
- gtc - Task collection to process
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.
- task_class_t gtc_task_class_register(int body_size, void (*cb_execute)(gtc_t gtc, task_t *descriptor))
- Register a new task class. (collective)
- 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);