7 #ifndef CCTOOLS_CATEGORY_H
8 #define CCTOOLS_CATEGORY_H
75 struct itable *histograms;
80 int64_t completions_since_last_reset;
86 uint64_t average_task_time;
91 struct hash_table *mf_variables;
95 void category_specify_allocation_mode(
struct category *c,
int mode);
97 int category_enable_auto_resource(
struct category *c,
const char *resource_name,
int autolabel);
99 void category_specify_max_allocation(
struct category *c,
const struct rmsummary *s);
100 void category_specify_min_allocation(
struct category *c,
const struct rmsummary *s);
101 void category_specify_first_allocation_guess(
struct category *c,
const struct rmsummary *s);
103 struct category *category_create(
const char *name);
104 struct category *category_lookup_or_create(
struct hash_table *categories,
const char *name);
105 void category_delete(
struct hash_table *categories,
const char *name);
106 void categories_initialize(
struct hash_table *categories,
struct rmsummary *top,
const char *summaries_file);
109 int category_update_first_allocation(
struct category *c,
const struct rmsummary *max_worker);
111 int category_in_steady_state(
struct category *c);
When monitoring is enabled, tasks are tried with maximum specified values of cores, memory, disk or gpus until enough statistics are collected.
Definition: category.h:40
Portable routines for high resolution timing.
category_mode_t
Valid modes for computing automatic resource allocations.
Definition: category.h:32
Same as FIRST, FIRST is deprecated.
Definition: category.h:23
Using max of category.
Definition: category.h:24
No valid resources could be found.
Definition: category.h:25
category_allocation_t
Valid states for the lifetime of automatic resource allocations for a single task.
Definition: category.h:21
As above, but maximizing throughput.
Definition: category.h:56
Statistics describing a work queue.
Definition: work_queue.h:217
Definition: rmsummary.h:26
As above, but tasks are first tried with an automatically computed allocation to minimize resource wa...
Definition: category.h:52
A general purpose hash table.
Keep counts of doubles that fall in some given bucket size.
An integer-indexed hash table.
When monitoring is disabled, all tasks run as WORK_QUEUE_ALLOCATION_MODE_FIXED.
Definition: category.h:33
Definition: category.h:61
No automatic allocation, or using first step value of the two-step policy.
Definition: category.h:22