7#ifndef CCTOOLS_CATEGORY_H
8#define CCTOOLS_CATEGORY_H
17#include "bucketing_manager.h"
83 struct itable *histograms;
92 int64_t completions_since_last_reset;
95 int64_t max_concurrent;
101 uint64_t average_task_time;
109 struct hash_table *mf_variables;
113void category_specify_allocation_mode(
struct category *c,
int mode);
115int category_enable_auto_resource(
struct category *c,
const char *resource_name,
int autolabel);
117void category_specify_max_allocation(
struct category *c,
const struct rmsummary *s);
118void category_specify_min_allocation(
struct category *c,
const struct rmsummary *s);
119void category_specify_first_allocation_guess(
struct category *c,
const struct rmsummary *s);
121struct category *category_create(
const char *name);
122struct category *category_lookup_or_create(
struct hash_table *categories,
const char *name);
123void category_delete(
struct hash_table *categories,
const char *name);
124void categories_initialize(
struct hash_table *categories,
struct rmsummary *top,
const char *summaries_file);
128int category_bucketing_accumulate_summary(
struct category *c,
const struct rmsummary *rs,
const struct rmsummary *max_worker,
int taskid,
int success);
130int category_in_bucketing_mode(
struct category* c);
132int category_update_first_allocation(
struct category *c,
const struct rmsummary *max_worker);
134int category_in_steady_state(
struct category *c);
category_allocation_t
Valid states for the lifetime of automatic resource allocations for a single task.
Definition category.h:22
@ CATEGORY_ALLOCATION_FIRST
No automatic allocation, or using first step value of the two-step policy.
Definition category.h:23
@ CATEGORY_ALLOCATION_GREEDY_BUCKETING
Use the greedy bucketing algorithm to label resources.
Definition category.h:27
@ CATEGORY_ALLOCATION_AUTO
Same as FIRST, FIRST is deprecated.
Definition category.h:24
@ CATEGORY_ALLOCATION_EXHAUSTIVE_BUCKETING
Use the exhaustive bucketing algorithm to label resources.
Definition category.h:28
@ CATEGORY_ALLOCATION_MAX
Using max of category.
Definition category.h:25
@ CATEGORY_ALLOCATION_ERROR
No valid resources could be found.
Definition category.h:26
category_mode_t
Valid modes for computing automatic resource allocations.
Definition category.h:35
@ CATEGORY_ALLOCATION_MODE_MIN_WASTE
As above, but tasks are first tried with an automatically computed allocation to minimize resource wa...
Definition category.h:55
@ CATEGORY_ALLOCATION_MODE_FIXED
When monitoring is disabled, all tasks run as WORK_QUEUE_ALLOCATION_MODE_FIXED.
Definition category.h:36
@ CATEGORY_ALLOCATION_MODE_GREEDY_BUCKETING
Use the greedy bucketing algorithm to label resources.
Definition category.h:61
@ CATEGORY_ALLOCATION_MODE_EXHAUSTIVE_BUCKETING
Use the exhaustive bucketing algorithm to label resources.
Definition category.h:64
@ CATEGORY_ALLOCATION_MODE_MAX_THROUGHPUT
As above, but maximizing throughput.
Definition category.h:59
@ CATEGORY_ALLOCATION_MODE_MAX
When monitoring is enabled, tasks are tried with maximum specified values of cores,...
Definition category.h:43
A general purpose hash table.
Keep counts of doubles that fall in some given bucket size.
An integer-indexed hash table.
Definition bucketing_manager.h:13
Definition rmsummary.h:27
Statistics describing a manager.
Definition taskvine.h:151
Statistics describing a work queue.
Definition work_queue.h:226
Portable routines for high resolution timing.