cctools
taskvine.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2022- The University of Notre Dame
3 This software is distributed under the GNU General Public License.
4 See the file COPYING for details.
5 */
6 
7 #ifndef TASKVINE_H
8 #define TASKVINE_H
9 
10 #include "category.h"
11 #include "rmsummary.h"
12 #include "timestamp.h"
13 #include <sys/types.h>
14 
15 struct vine_manager;
16 struct vine_task;
17 struct vine_file;
18 
37 #define VINE_DEFAULT_PORT 9123
38 #define VINE_RANDOM_PORT 0
39 #define VINE_WAIT_FOREVER -1
43 typedef enum {
47  VINE_WATCH = 2,
56 
58 typedef enum {
64 
66 typedef enum {
72 
74 typedef enum {
83 
88 typedef enum {
94  VINE_RESULT_SIGNAL = 1 << 3,
103  8 << 3,
112 } vine_result_t;
113 
116 typedef enum {
121 
130 
134 
137 
138  VINE_ALLOCATION_MODE_GREEDY_BUCKETING = CATEGORY_ALLOCATION_MODE_GREEDY_BUCKETING,
139 
140  VINE_ALLOCATION_MODE_EXHAUSTIVE_BUCKETING = CATEGORY_ALLOCATION_MODE_EXHAUSTIVE_BUCKETING
142 
144 typedef enum {
145  VINE_FILE = 1,
151 
152 
154 struct vine_stats {
155  /* Stats for the current state of workers: */
163  /* Cumulative stats for workers: */
174  /* Stats for the current state of tasks: */
181  /* Cumulative stats for tasks: */
190  /* All times in microseconds */
191  /* A time_when_* refers to an instant in time, otherwise it refers to a length of time. */
192 
193  /* Master time statistics: */
211  /* Workers time statistics: */
218  /* BW statistics */
219  int64_t bytes_sent;
221  int64_t bytes_received;
223  double bandwidth;
226  /* resources statistics */
238  int64_t total_cores;
239  int64_t total_memory;
240  int64_t total_disk;
241  int64_t total_gpus;
243  int64_t committed_cores;
245  int64_t committed_disk;
246  int64_t committed_gpus;
248  int64_t max_cores;
249  int64_t max_memory;
250  int64_t max_disk;
251  int64_t max_gpus;
253  int64_t min_cores;
254  int64_t min_memory;
255  int64_t min_disk;
256  int64_t min_gpus;
258  int64_t inuse_cache;
259 };
260 
264 
273 struct vine_task *vine_task_create(const char *full_command);
274 
279 void vine_task_delete(struct vine_task *t);
280 
286 void vine_task_set_command(struct vine_task *t, const char *cmd);
287 
292 void vine_task_set_library_required(struct vine_task *t, const char *name);
293 
298 const char *vine_task_get_library_required(struct vine_task *t);
299 
304 void vine_task_set_library_provided(struct vine_task *t, const char *name);
305 
310 const char *vine_task_get_library_provided(struct vine_task *t);
311 
317 void vine_task_set_function_slots(struct vine_task *t, int nslots);
318 
326 void vine_task_set_function_exec_mode_from_string(struct vine_task *t, const char *exec_mode);
327 
337 int vine_task_add_input(struct vine_task *t, struct vine_file *f, const char *remote_name, vine_mount_flags_t flags);
338 
347 int vine_task_add_output(struct vine_task *t, struct vine_file *f, const char *remote_name, vine_mount_flags_t flags);
348 
356 void vine_task_set_retries(struct vine_task *t, int64_t max_retries);
357 
365 void vine_task_set_max_forsaken(struct vine_task *t, int64_t max_retries);
366 
372 void vine_task_set_memory(struct vine_task *t, int64_t memory);
373 
379 void vine_task_set_disk(struct vine_task *t, int64_t disk);
380 
386 void vine_task_set_cores(struct vine_task *t, int cores);
387 
393 void vine_task_set_gpus(struct vine_task *t, int gpus);
394 
402 void vine_task_set_time_end(struct vine_task *t, int64_t useconds);
403 
411 void vine_task_set_time_start(struct vine_task *t, int64_t useconds);
412 
420 void vine_task_set_time_max(struct vine_task *t, int64_t seconds);
421 
428 void vine_task_set_time_min(struct vine_task *t, int64_t seconds);
429 
436 void vine_task_set_tag(struct vine_task *t, const char *tag);
437 
443 void vine_task_set_category(struct vine_task *t, const char *category);
444 
450 void vine_task_add_feature(struct vine_task *t, const char *name);
451 
458 void vine_task_set_priority(struct vine_task *t, double priority);
459 
465 void vine_task_set_env_var(struct vine_task *t, const char *name, const char *value);
466 
472 void vine_task_set_scheduler(struct vine_task *t, vine_schedule_t algorithm);
473 
481 int vine_task_set_monitor_output(struct vine_task *t, const char *monitor_output);
482 
488 const char *vine_task_get_state(struct vine_task *t);
489 
495 const char *vine_task_get_command(struct vine_task *t);
496 
502 const char *vine_task_get_tag(struct vine_task *t);
503 
509 const char *vine_task_get_category(struct vine_task *t);
510 
516 int vine_task_get_id(struct vine_task *t);
517 
529 vine_result_t vine_task_get_result(struct vine_task *t);
530 
535 const char *vine_result_string(vine_result_t result);
536 
545 int vine_task_get_exit_code(struct vine_task *t);
546 
554 const char *vine_task_get_stdout(struct vine_task *t);
555 
563 const char *vine_task_get_addrport(struct vine_task *t);
564 
572 const char *vine_task_get_hostname(struct vine_task *t);
573 
592 int64_t vine_task_get_metric(struct vine_task *t, const char *name);
593 
599 void vine_task_set_resources(struct vine_task *t, const struct rmsummary *rm);
600 
607 const struct rmsummary *vine_task_get_resources(struct vine_task *t, const char *name);
608 
659 int vine_task_set_snapshot_file(struct vine_task *t, struct vine_file *monitor_snapshot_file);
660 
669 int vine_task_add_starch_package(struct vine_task *t, struct vine_file *f);
670 
679 int vine_task_add_poncho_package(struct vine_task *t, struct vine_file *f);
680 
696 int vine_task_add_execution_context(struct vine_task *t, struct vine_file *f);
697 
698 /* Deprecated alias for vine_task_add_execution_context. */
699 int vine_task_add_environment(struct vine_task *t, struct vine_file *f);
700 
702 
706 
714 const char *vine_file_contents(struct vine_file *f);
715 
720 size_t vine_file_size(struct vine_file *f);
721 
727 const char *vine_file_source(struct vine_file *f);
728 
733 vine_file_type_t vine_file_type(struct vine_file *f);
734 
740 int vine_file_replica_count(struct vine_manager *m, struct vine_file *f);
741 
753 struct vine_file *vine_declare_file(
754  struct vine_manager *m, const char *source, vine_cache_level_t cache, vine_file_flags_t flags);
755 
767 struct vine_file *vine_declare_url(
768  struct vine_manager *m, const char *url, vine_cache_level_t cache, vine_file_flags_t flags);
769 
786 struct vine_file *vine_declare_xrootd(struct vine_manager *m, const char *source, struct vine_file *proxy,
787  struct vine_file *env, vine_cache_level_t cache, vine_file_flags_t flags);
788 
804 struct vine_file *vine_declare_chirp(struct vine_manager *m, const char *server, const char *source,
805  struct vine_file *ticket, struct vine_file *env, vine_cache_level_t cache, vine_file_flags_t flags);
806 
813 struct vine_file *vine_declare_temp(struct vine_manager *m);
814 
827 struct vine_file *vine_declare_buffer(struct vine_manager *m, const char *buffer, size_t size, vine_cache_level_t cache,
828  vine_file_flags_t flags);
829 
847 struct vine_file *vine_declare_mini_task(struct vine_manager *m, struct vine_task *mini_task, const char *name,
849 
863 struct vine_file *vine_declare_untar(
864  struct vine_manager *m, struct vine_file *f, vine_cache_level_t cache, vine_file_flags_t flags);
865 
877 struct vine_file *vine_declare_poncho(
878  struct vine_manager *m, struct vine_file *f, vine_cache_level_t cache, vine_file_flags_t flags);
879 
891 struct vine_file *vine_declare_starch(
892  struct vine_manager *m, struct vine_file *f, vine_cache_level_t cache, vine_file_flags_t flags);
893 
902 void vine_file_set_mode( struct vine_file *f, int mode );
903 
915 const char *vine_fetch_file(struct vine_manager *m, struct vine_file *f);
916 
926 void vine_undeclare_file(struct vine_manager *m, struct vine_file *f);
927 
935 int vine_prune_file(struct vine_manager *m, struct vine_file *f);
936 
938 
942 
966 struct vine_manager *vine_create(int port);
967 
978 struct vine_manager *vine_ssl_create(int port, const char *key, const char *cert);
979 
984 void vine_delete(struct vine_manager *m);
985 
995 int vine_submit(struct vine_manager *m, struct vine_task *t);
996 
1003 void vine_manager_install_library(struct vine_manager *m, struct vine_task *t, const char *name);
1004 
1009 void vine_manager_remove_library(struct vine_manager *m, const char *name);
1010 
1015 struct vine_task *vine_manager_find_library_template(struct vine_manager *m, const char *library_name);
1016 
1035 struct vine_task *vine_wait(struct vine_manager *m, int timeout);
1036 
1048 struct vine_task *vine_wait_for_tag(struct vine_manager *m, const char *tag, int timeout);
1049 
1061 struct vine_task *vine_wait_for_task_id(struct vine_manager *m, int task_id, int timeout);
1062 
1074 int vine_hungry(struct vine_manager *m);
1075 
1083 int vine_empty(struct vine_manager *m);
1084 
1091 int vine_port(struct vine_manager *m);
1092 
1097 void vine_set_name(struct vine_manager *m, const char *name);
1098 
1103 const char *vine_get_name(struct vine_manager *m);
1104 
1114 int vine_enable_monitoring(struct vine_manager *m, int watchdog, int time_series);
1115 
1117 int vine_enable_peer_transfers(struct vine_manager *m);
1118 
1120 int vine_disable_peer_transfers(struct vine_manager *m);
1121 
1129 int vine_enable_proportional_resources(struct vine_manager *m);
1130 
1135 int vine_disable_proportional_resources(struct vine_manager *m);
1136 
1147 int vine_set_task_id_min(struct vine_manager *m, int minid);
1148 
1153 void vine_block_host(struct vine_manager *m, const char *hostname);
1154 
1162 void vine_block_host_with_timeout(struct vine_manager *m, const char *hostname, time_t seconds);
1163 
1168 void vine_unblock_host(struct vine_manager *m, const char *hostname);
1169 
1173 void vine_unblock_all(struct vine_manager *m);
1174 
1179 void vine_get_stats(struct vine_manager *m, struct vine_stats *s);
1180 
1186 void vine_get_stats_category(struct vine_manager *m, const char *c, struct vine_stats *s);
1187 
1192 char *vine_get_status(struct vine_manager *m, const char *request);
1193 
1199 struct rmsummary **vine_summarize_workers(struct vine_manager *m);
1200 
1205 void vine_set_bandwidth_limit(struct vine_manager *m, const char *bandwidth);
1206 
1211 double vine_get_effective_bandwidth(struct vine_manager *m);
1212 
1223 int vine_enable_disconnect_slow_workers(struct vine_manager *m, double multiplier);
1224 
1234 int vine_enable_disconnect_slow_workers_category(struct vine_manager *m, const char *category, double multiplier);
1235 
1244 int vine_set_draining_by_hostname(struct vine_manager *m, const char *hostname, int drain_flag);
1245 
1253 int vine_set_category_mode(struct vine_manager *m, const char *category, vine_category_mode_t mode);
1254 
1261 void vine_set_category_max_concurrent(struct vine_manager *m, const char *category, int max_concurrent);
1262 
1271 int vine_enable_category_resource(struct vine_manager *m, const char *category, const char *resource, int autolabel);
1272 
1278 void vine_set_scheduler(struct vine_manager *m, vine_schedule_t algorithm);
1279 
1284 void vine_set_priority(struct vine_manager *m, int priority);
1285 
1294 void vine_set_tasks_left_count(struct vine_manager *m, int ntasks);
1295 
1300 void vine_set_catalog_servers(struct vine_manager *m, const char *hosts);
1301 
1302 /* Send updates to the catalog server.
1303 @param m A manager object
1304 */
1305 void vine_update_catalog(struct vine_manager *m);
1306 
1317 void vine_set_property(struct vine_manager *m, const char *name, const char *value);
1318 
1325 int vine_cancel_by_task_id(struct vine_manager *m, int id);
1326 
1333 int vine_cancel_by_task_tag(struct vine_manager *m, const char *tag);
1334 
1340 int vine_cancel_all(struct vine_manager *m);
1341 
1348 int vine_enable_debug_log(const char *logfile);
1349 
1355 int vine_enable_perf_log(struct vine_manager *m, const char *logfile);
1356 
1362 int vine_enable_transactions_log(struct vine_manager *m, const char *logfile);
1363 
1369 int vine_enable_taskgraph_log(struct vine_manager *m, const char *logfile);
1370 
1376 int vine_workers_shutdown(struct vine_manager *m, int n);
1377 
1383 void vine_set_password(struct vine_manager *m, const char *password);
1384 
1391 int vine_set_password_file(struct vine_manager *m, const char *file);
1392 
1397 void vine_set_keepalive_interval(struct vine_manager *m, int interval);
1398 
1403 void vine_set_keepalive_timeout(struct vine_manager *m, int timeout);
1404 
1411 void vine_set_manager_preferred_connection(struct vine_manager *m, const char *preferred_connection);
1412 
1457 int vine_tune(struct vine_manager *m, const char *name, double value);
1458 
1464 void vine_set_resources_max(struct vine_manager *m, const struct rmsummary *rm);
1465 
1471 void vine_set_resources_min(struct vine_manager *m, const struct rmsummary *rm);
1472 
1478 void vine_set_category_resources_max(struct vine_manager *m, const char *category, const struct rmsummary *rm);
1479 
1485 void vine_set_category_resources_min(struct vine_manager *m, const char *category, const struct rmsummary *rm);
1486 
1492 void vine_set_category_first_allocation_guess(struct vine_manager *m, const char *category, const struct rmsummary *rm);
1493 
1499 void vine_initialize_categories(struct vine_manager *m, struct rmsummary *max, const char *summaries_file);
1500 
1504 void vine_set_runtime_info_path(const char *path);
1505 
1509 void vine_set_runtime_info_template(const char *dir);
1510 
1515 void vine_log_debug_app(struct vine_manager *m, const char *entry);
1516 
1521 void vine_log_txn_app(struct vine_manager *m, const char *entry);
1522 
1526 void vine_counters_print();
1527 
1531 char *vine_version_string();
1532 
1538 char *vine_get_path_log(struct vine_manager *m, const char *path);
1539 
1545 char *vine_get_path_staging(struct vine_manager *m, const char *path);
1546 
1552 char *vine_get_path_library_log(struct vine_manager *m, const char *path);
1553 
1559 char *vine_get_path_cache(struct vine_manager *m, const char *path);
1560 
1562 
1563 #endif
vine_cancel_by_task_id
int vine_cancel_by_task_id(struct vine_manager *m, int id)
Cancel a submitted task using its task id.
vine_hungry
int vine_hungry(struct vine_manager *m)
Determine whether the manager is 'hungry' for more tasks.
vine_task_set_resources
void vine_task_set_resources(struct vine_task *t, const struct rmsummary *rm)
Set the expected resource consumption of a task before execution.
vine_stats::max_memory
int64_t max_memory
The largest memory size in MB observed among the connected workers.
Definition: taskvine.h:249
VINE_MOUNT_MKDIR
@ VINE_MOUNT_MKDIR
Create this empty output directory in the task sandbox prior to execution.
Definition: taskvine.h:54
category.h
vine_task_get_addrport
const char * vine_task_get_addrport(struct vine_task *t)
Get the address and port of the worker on which the task ran.
VINE_RESULT_SUCCESS
@ VINE_RESULT_SUCCESS
The task ran successfully, and its Unix exit code is given by vine_task_get_exit_code.
Definition: taskvine.h:89
vine_log_debug_app
void vine_log_debug_app(struct vine_manager *m, const char *entry)
Adds a custom APPLICATION entry to the debug log.
vine_fetch_file
const char * vine_fetch_file(struct vine_manager *m, struct vine_file *f)
Fetch the contents of a file.
vine_task_set_gpus
void vine_task_set_gpus(struct vine_task *t, int gpus)
Specify the number of gpus required by a task.
vine_stats::time_scheduling
timestamp_t time_scheduling
Total time spend matching tasks to workers.
Definition: taskvine.h:209
vine_set_runtime_info_template
void vine_set_runtime_info_template(const char *dir)
Sets the directory where a workflow-specific runtime logs are directly written into.
VINE_FAILURE_ONLY
@ VINE_FAILURE_ONLY
Only return this output file if the task failed.
Definition: taskvine.h:48
vine_set_draining_by_hostname
int vine_set_draining_by_hostname(struct vine_manager *m, const char *hostname, int drain_flag)
Set the draining mode per worker hostname.
vine_stats::time_internal
timestamp_t time_internal
Total time the manager spents in internal processing.
Definition: taskvine.h:205
vine_block_host_with_timeout
void vine_block_host_with_timeout(struct vine_manager *m, const char *hostname, time_t seconds)
Block workers in hostname from a manager, but remove block after timeout seconds.
vine_empty
int vine_empty(struct vine_manager *m)
Determine whether the manager is empty.
vine_stats::workers_slow
int workers_slow
Total number of workers disconnected for being too slow.
Definition: taskvine.h:168
vine_stats::time_status_msgs
timestamp_t time_status_msgs
Total time spent sending and receiving status messages to and from workers, including workers' standa...
Definition: taskvine.h:202
vine_wait_for_task_id
struct vine_task * vine_wait_for_task_id(struct vine_manager *m, int task_id, int timeout)
Wait for a task with a given task_id to complete.
vine_task_create
struct vine_task * vine_task_create(const char *full_command)
Create a new task object.
vine_enable_perf_log
int vine_enable_perf_log(struct vine_manager *m, const char *logfile)
Add a performance log file that records cummulative statistics of the connected workers and submitted...
VINE_TRANSFER_ALWAYS
@ VINE_TRANSFER_ALWAYS
Always transfer this file when needed.
Definition: taskvine.h:44
VINE_MOUNT_SYMLINK
@ VINE_MOUNT_SYMLINK
Permit this directory to be mounted via symlink instead of hardlink.
Definition: taskvine.h:53
vine_declare_file
struct vine_file * vine_declare_file(struct vine_manager *m, const char *source, vine_cache_level_t cache, vine_file_flags_t flags)
Declare a file object from a local file.
vine_set_category_max_concurrent
void vine_set_category_max_concurrent(struct vine_manager *m, const char *category, int max_concurrent)
Set a maximum number of tasks of this category that can execute concurrently.
category
Definition: category.h:69
vine_enable_category_resource
int vine_enable_category_resource(struct vine_manager *m, const char *category, const char *resource, int autolabel)
Turn on or off first-allocation labeling for a given category and resource.
vine_declare_xrootd
struct vine_file * vine_declare_xrootd(struct vine_manager *m, const char *source, struct vine_file *proxy, struct vine_file *env, vine_cache_level_t cache, vine_file_flags_t flags)
Create a file object of a remote file accessible from an xrootd server.
VINE_UNLINK_WHEN_DONE
@ VINE_UNLINK_WHEN_DONE
Whether to delete the file when its reference count is 0.
Definition: taskvine.h:69
vine_enable_transactions_log
int vine_enable_transactions_log(struct vine_manager *m, const char *logfile)
Add a log file that records the states of the connected workers and tasks.
vine_stats::workers_joined
int workers_joined
Total number of worker connections that were established to the manager.
Definition: taskvine.h:164
vine_enable_disconnect_slow_workers
int vine_enable_disconnect_slow_workers(struct vine_manager *m, double multiplier)
Enable disconnect slow workers functionality for a given manager for tasks without an explicit catego...
vine_set_task_id_min
int vine_set_task_id_min(struct vine_manager *m, int minid)
Set the minimum task_id of future submitted tasks.
vine_stats::tasks_dispatched
int tasks_dispatched
Total number of tasks dispatch to workers.
Definition: taskvine.h:183
vine_wait
struct vine_task * vine_wait(struct vine_manager *m, int timeout)
Wait for a task to complete.
vine_file_type_t
vine_file_type_t
The type of an input or output file to attach to a task.
Definition: taskvine.h:144
vine_stats::workers_released
int workers_released
Total number of worker connections that were asked by the manager to disconnect.
Definition: taskvine.h:166
vine_submit
int vine_submit(struct vine_manager *m, struct vine_task *t)
Submit a task to a manager.
VINE_RESULT_OUTPUT_TRANSFER_ERROR
@ VINE_RESULT_OUTPUT_TRANSFER_ERROR
The task failed because an output could be transfered to the manager (not enough disk space,...
Definition: taskvine.h:104
VINE_RESULT_LIBRARY_EXIT
@ VINE_RESULT_LIBRARY_EXIT
Task is a library that has terminated.
Definition: taskvine.h:109
VINE_RESULT_MISSING_LIBRARY
@ VINE_RESULT_MISSING_LIBRARY
The task is a function requiring a library that does not exist.
Definition: taskvine.h:111
vine_stats::total_memory
int64_t total_memory
Total memory in MB aggregated across the connected workers.
Definition: taskvine.h:239
vine_enable_peer_transfers
int vine_enable_peer_transfers(struct vine_manager *m)
Enable taskvine peer transfers to be scheduled by the manager.
vine_task_set_tag
void vine_task_set_tag(struct vine_task *t, const char *tag)
Attach a user defined string tag to the task.
vine_declare_untar
struct vine_file * vine_declare_untar(struct vine_manager *m, struct vine_file *f, vine_cache_level_t cache, vine_file_flags_t flags)
Create a file object by unpacking a tar archive.
VINE_RESULT_RESOURCE_EXHAUSTION
@ VINE_RESULT_RESOURCE_EXHAUSTION
The task used more resources than requested.
Definition: taskvine.h:95
vine_stats::time_application
timestamp_t time_application
Total time spent outside vine_wait.
Definition: taskvine.h:208
VINE_SCHEDULE_FCFS
@ VINE_SCHEDULE_FCFS
Select worker on a first-come-first-serve basis.
Definition: taskvine.h:76
vine_ssl_create
struct vine_manager * vine_ssl_create(int port, const char *key, const char *cert)
Create a new manager using SSL.
vine_task_set_library_provided
void vine_task_set_library_provided(struct vine_task *t, const char *name)
Set the library name provided by this task.
vine_result_string
const char * vine_result_string(vine_result_t result)
Explain result codes from tasks.
vine_stats::capacity_instantaneous
int capacity_instantaneous
The estimated number of tasks that this manager can support considering only the most recently comple...
Definition: taskvine.h:233
vine_set_resources_max
void vine_set_resources_max(struct vine_manager *m, const struct rmsummary *rm)
Sets the maximum resources a task without an explicit category ("default" category).
vine_stats::tasks_cancelled
int tasks_cancelled
Total number of tasks cancelled.
Definition: taskvine.h:187
vine_task_set_disk
void vine_task_set_disk(struct vine_task *t, int64_t disk)
Specify the amount of disk space required by a task.
vine_task_add_starch_package
int vine_task_add_starch_package(struct vine_task *t, struct vine_file *f)
Add a Starch package as an execution context.
vine_file_replica_count
int vine_file_replica_count(struct vine_manager *m, struct vine_file *f)
Get the number of replicas of a file.
vine_task_set_command
void vine_task_set_command(struct vine_task *t, const char *cmd)
Indicate the command to be executed.
vine_stats::recovery_tasks_submitted
int recovery_tasks_submitted
Total number of recovery tasks submitted since the manager started.
Definition: taskvine.h:179
CATEGORY_ALLOCATION_MODE_MAX_THROUGHPUT
@ CATEGORY_ALLOCATION_MODE_MAX_THROUGHPUT
As above, but maximizing throughput.
Definition: category.h:59
vine_set_resources_min
void vine_set_resources_min(struct vine_manager *m, const struct rmsummary *rm)
Sets the minimum resources a task without an explicit category ("default" category).
vine_cancel_all
int vine_cancel_all(struct vine_manager *m)
Cancel all submitted tasks and remove them from the manager.
vine_get_effective_bandwidth
double vine_get_effective_bandwidth(struct vine_manager *m)
Get current manager bandwidth.
vine_stats::tasks_waiting
int tasks_waiting
Number of tasks waiting to be dispatched.
Definition: taskvine.h:175
VINE_RESULT_MAX_RETRIES
@ VINE_RESULT_MAX_RETRIES
Currently unused.
Definition: taskvine.h:99
vine_workers_shutdown
int vine_workers_shutdown(struct vine_manager *m, int n)
Shut down workers connected to the manager.
vine_enable_monitoring
int vine_enable_monitoring(struct vine_manager *m, int watchdog, int time_series)
Enables resource monitoring for tasks.
vine_get_path_cache
char * vine_get_path_cache(struct vine_manager *m, const char *path)
Returns path relative to the cache runtime directory.
vine_task_set_max_forsaken
void vine_task_set_max_forsaken(struct vine_task *t, int64_t max_retries)
Specify the total number of times this task can be return to the manager without being executed.
vine_stats::inuse_cache
int64_t inuse_cache
Used disk space of declared files in MB aggregated across the connected workers.
Definition: taskvine.h:258
vine_unblock_host
void vine_unblock_host(struct vine_manager *m, const char *hostname)
Unblock host from a manager.
vine_task_add_input
int vine_task_add_input(struct vine_task *t, struct vine_file *f, const char *remote_name, vine_mount_flags_t flags)
Add a general file object as a input to a task.
VINE_RESULT_FORSAKEN
@ VINE_RESULT_FORSAKEN
The task failed, but it was not a task error.
Definition: taskvine.h:98
VINE_FILE
@ VINE_FILE
A file or directory present at the manager.
Definition: taskvine.h:145
vine_task_set_retries
void vine_task_set_retries(struct vine_task *t, int64_t max_retries)
Specify the number of times this task is retried on worker errors.
CATEGORY_ALLOCATION_MODE_GREEDY_BUCKETING
@ CATEGORY_ALLOCATION_MODE_GREEDY_BUCKETING
Use the greedy bucketing algorithm to label resources.
Definition: category.h:61
vine_task_set_time_max
void vine_task_set_time_max(struct vine_task *t, int64_t seconds)
Specify the maximum time (in seconds) the task is allowed to run in a worker.
vine_log_txn_app
void vine_log_txn_app(struct vine_manager *m, const char *entry)
Adds a custom APPLICATION entry to the transactions log.
vine_declare_mini_task
struct vine_file * vine_declare_mini_task(struct vine_manager *m, struct vine_task *mini_task, const char *name, vine_cache_level_t cache, vine_file_flags_t flags)
Create a file object produced from a mini-task Attaches a task definition to produce an input file by...
VINE_PEER_NOSHARE
@ VINE_PEER_NOSHARE
Schedule this file to be shared between peers where available.
Definition: taskvine.h:67
VINE_SCHEDULE_FILES
@ VINE_SCHEDULE_FILES
Select worker that has the most data required by the task.
Definition: taskvine.h:77
vine_get_status
char * vine_get_status(struct vine_manager *m, const char *request)
Get manager information as json.
VINE_RESULT_OUTPUT_MISSING
@ VINE_RESULT_OUTPUT_MISSING
The task ran but failed to generate a specified output file.
Definition: taskvine.h:92
VINE_RETRACT_ON_RESET
@ VINE_RETRACT_ON_RESET
Remove this file from the mount lists if the task is reset.
Definition: taskvine.h:51
vine_enable_taskgraph_log
int vine_enable_taskgraph_log(struct vine_manager *m, const char *logfile)
Add an output log that produces the taskgraph in Grapvhiz Dot format.
vine_unblock_all
void vine_unblock_all(struct vine_manager *m)
Unblock all host.
vine_task_get_library_provided
const char * vine_task_get_library_provided(struct vine_task *t)
Get the library name provided by this task.
VINE_RESULT_FIXED_LOCATION_MISSING
@ VINE_RESULT_FIXED_LOCATION_MISSING
The task failed because no worker could satisfy the fixed location input file requirements.
Definition: taskvine.h:106
vine_stats::capacity_cores
int capacity_cores
The estimated number of workers' cores that this manager can effectively support.
Definition: taskvine.h:228
vine_counters_print
void vine_counters_print()
Display internal reference counts for troubleshooting purposes.
vine_task_add_output
int vine_task_add_output(struct vine_task *t, struct vine_file *f, const char *remote_name, vine_mount_flags_t flags)
Add a general file object as a output of a task.
vine_stats::committed_cores
int64_t committed_cores
Committed number of cores aggregated across the connected workers.
Definition: taskvine.h:243
vine_stats::workers_idle
int workers_idle
Number of workers that are not running a task.
Definition: taskvine.h:159
vine_task_set_function_exec_mode_from_string
void vine_task_set_function_exec_mode_from_string(struct vine_task *t, const char *exec_mode)
Set the execution mode of functions inside a library.
vine_undeclare_file
void vine_undeclare_file(struct vine_manager *m, struct vine_file *f)
Un-declare a file that was created by vine_declare_file or similar functions.
VINE_SCHEDULE_TIME
@ VINE_SCHEDULE_TIME
Select worker that has the fastest execution time on previous tasks.
Definition: taskvine.h:78
vine_stats::time_workers_execute_exhaustion
timestamp_t time_workers_execute_exhaustion
Total time workers spent executing tasks that exhausted resources.
Definition: taskvine.h:215
vine_stats::workers_idled_out
int workers_idled_out
Total number of worker that disconnected for being idle.
Definition: taskvine.h:167
VINE_ALLOCATION_MODE_MAX
@ VINE_ALLOCATION_MODE_MAX
When monitoring is enabled, tasks are tried with maximum specified values of cores,...
Definition: taskvine.h:129
vine_task_set_cores
void vine_task_set_cores(struct vine_task *t, int cores)
Specify the number of cores required by a task.
VINE_RESULT_STDOUT_MISSING
@ VINE_RESULT_STDOUT_MISSING
The task ran but its stdout has been truncated.
Definition: taskvine.h:93
vine_stats::tasks_submitted
int tasks_submitted
Total number of tasks submitted to the manager.
Definition: taskvine.h:182
VINE_ALLOCATION_MODE_MIN_WASTE
@ VINE_ALLOCATION_MODE_MIN_WASTE
As above, but tasks are first tried with an automatically computed allocation to minimize resource wa...
Definition: taskvine.h:133
vine_stats::capacity_disk
int capacity_disk
The estimated number of workers' MB of disk that this manager can effectively support.
Definition: taskvine.h:231
vine_task_add_poncho_package
int vine_task_add_poncho_package(struct vine_task *t, struct vine_file *f)
Add a Poncho package as an execution context.
vine_stats::time_polling
timestamp_t time_polling
Total time blocking waiting for worker communications (i.e., manager idle waiting for a worker messag...
Definition: taskvine.h:206
vine_stats::total_cores
int64_t total_cores
Total number of cores aggregated across the connected workers.
Definition: taskvine.h:238
vine_create
struct vine_manager * vine_create(int port)
Create a new manager.
vine_manager_remove_library
void vine_manager_remove_library(struct vine_manager *m, const char *name)
Indicate the library to be removed from all connected workers.
vine_declare_buffer
struct vine_file * vine_declare_buffer(struct vine_manager *m, const char *buffer, size_t size, vine_cache_level_t cache, vine_file_flags_t flags)
Create a file object from a data buffer.
VINE_CACHE_LEVEL_TASK
@ VINE_CACHE_LEVEL_TASK
Do not cache file at worker.
Definition: taskvine.h:59
vine_task_get_stdout
const char * vine_task_get_stdout(struct vine_task *t)
Get the standard output of the task.
vine_set_manager_preferred_connection
void vine_set_manager_preferred_connection(struct vine_manager *m, const char *preferred_connection)
Set the preference for using hostname over IP address to connect.
vine_stats::time_when_started
timestamp_t time_when_started
Absolute time at which the manager started.
Definition: taskvine.h:194
vine_mount_flags_t
vine_mount_flags_t
Select optional handling for input and output files: caching, unpacking, watching,...
Definition: taskvine.h:43
VINE_SCHEDULE_UNSET
@ VINE_SCHEDULE_UNSET
Internal use only.
Definition: taskvine.h:75
vine_task_set_scheduler
void vine_task_set_scheduler(struct vine_task *t, vine_schedule_t algorithm)
Select the scheduling algorithm for a single task.
vine_stats::tasks_failed
int tasks_failed
Total number of tasks completed and returned to user with result other than VINE_RESULT_SUCCESS.
Definition: taskvine.h:185
vine_task_set_monitor_output
int vine_task_set_monitor_output(struct vine_task *t, const char *monitor_output)
Specify a custom name for the monitoring summary.
vine_set_password_file
int vine_set_password_file(struct vine_manager *m, const char *file)
Add a mandatory password file that each worker must present.
VINE_MINI_TASK
@ VINE_MINI_TASK
A file obtained by executing a Unix command line.
Definition: taskvine.h:149
CATEGORY_ALLOCATION_MODE_FIXED
@ CATEGORY_ALLOCATION_MODE_FIXED
When monitoring is disabled, all tasks run as WORK_QUEUE_ALLOCATION_MODE_FIXED.
Definition: category.h:36
vine_stats::min_gpus
int64_t min_gpus
The smallest number of gpus observed among the connected workers.
Definition: taskvine.h:256
vine_enable_debug_log
int vine_enable_debug_log(const char *logfile)
Turn on the debugging log output and send to the named file.
vine_set_priority
void vine_set_priority(struct vine_manager *m, int priority)
Change the priority for a given manager.
vine_stats::max_cores
int64_t max_cores
The highest number of cores observed among the connected workers.
Definition: taskvine.h:248
vine_declare_starch
struct vine_file * vine_declare_starch(struct vine_manager *m, struct vine_file *f, vine_cache_level_t cache, vine_file_flags_t flags)
Create a file object by unpacking a starch package.
vine_task_set_time_start
void vine_task_set_time_start(struct vine_task *t, int64_t useconds)
Specify the minimum start time allowed for the task (in microseconds since the Epoch).
vine_set_category_resources_min
void vine_set_category_resources_min(struct vine_manager *m, const char *category, const struct rmsummary *rm)
Sets the minimum resources a task in the category may use.
vine_schedule_t
vine_schedule_t
Select overall scheduling algorithm for matching tasks to workers.
Definition: taskvine.h:74
VINE_CACHE_LEVEL_WORKER
@ VINE_CACHE_LEVEL_WORKER
File remains in cache of worker until worker terminates.
Definition: taskvine.h:61
vine_stats::bytes_sent
int64_t bytes_sent
Total number of file bytes (not including protocol control msg bytes) sent out to the workers by the ...
Definition: taskvine.h:219
vine_stats::capacity_gpus
int capacity_gpus
The estimated number of workers' GPUs that this manager can effectively support.
Definition: taskvine.h:232
vine_stats::time_receive_good
timestamp_t time_receive_good
Total time spent in sending data to workers for tasks with result VINE_RESULT_SUCCESS.
Definition: taskvine.h:200
vine_enable_disconnect_slow_workers_category
int vine_enable_disconnect_slow_workers_category(struct vine_manager *m, const char *category, double multiplier)
Enable disconnect slow workers functionality for a given category.
vine_prune_file
int vine_prune_file(struct vine_manager *m, struct vine_file *f)
Prune a file among the cluster.
vine_stats::tasks_exhausted_attempts
int tasks_exhausted_attempts
Total number of task executions that failed given resource exhaustion.
Definition: taskvine.h:188
vine_task_get_id
int vine_task_get_id(struct vine_task *t)
Get the unique ID of the task.
vine_file_type
vine_file_type_t vine_file_type(struct vine_file *f)
Get the type of file.
vine_disable_proportional_resources
int vine_disable_proportional_resources(struct vine_manager *m)
Disable proportional resources.
vine_stats::time_workers_execute
timestamp_t time_workers_execute
Total time workers spent executing done tasks.
Definition: taskvine.h:212
vine_file_flags_t
vine_file_flags_t
Control sharing and garbage collection behavior of file objects.
Definition: taskvine.h:66
vine_file_source
const char * vine_file_source(struct vine_file *f)
Get the filename of the file if the file is local to the manager.
vine_task_set_memory
void vine_task_set_memory(struct vine_task *t, int64_t memory)
Specify the amount of disk space required by a task.
VINE_FIXED_LOCATION
@ VINE_FIXED_LOCATION
Never transfer input files with this flag to a worker for execution.
Definition: taskvine.h:45
vine_stats::time_send
timestamp_t time_send
Total time spent in sending tasks to workers (tasks descriptions, and input files....
Definition: taskvine.h:195
rmsummary
Definition: rmsummary.h:26
buffer
Definition: buffer.h:26
vine_task_set_time_min
void vine_task_set_time_min(struct vine_task *t, int64_t seconds)
Specify the minimum time (in seconds) the task is expected to run in a worker.
vine_set_password
void vine_set_password(struct vine_manager *m, const char *password)
Add a mandatory password that each worker must present.
vine_declare_poncho
struct vine_file * vine_declare_poncho(struct vine_manager *m, struct vine_file *f, vine_cache_level_t cache, vine_file_flags_t flags)
Create a file object by unpacking a poncho package.
vine_stats::total_gpus
int64_t total_gpus
Total number of gpus aggregated across the connected workers.
Definition: taskvine.h:241
vine_stats::workers_busy
int workers_busy
Number of workers that are running at least one task.
Definition: taskvine.h:160
vine_manager_find_library_template
struct vine_task * vine_manager_find_library_template(struct vine_manager *m, const char *library_name)
Find a library template on the manager.
vine_task_get_state
const char * vine_task_get_state(struct vine_task *t)
Get the state line of the task.
vine_enable_proportional_resources
int vine_enable_proportional_resources(struct vine_manager *m)
When enabled, resources to tasks in are assigned in proportion to the size of the worker.
vine_stats::bandwidth
double bandwidth
Average network bandwidth in MB/S observed by the manager when transferring to workers.
Definition: taskvine.h:223
VINE_URL
@ VINE_URL
A file obtained by downloading from a URL.
Definition: taskvine.h:146
timestamp_t
UINT64_T timestamp_t
A type to hold the current time, in microseconds since January 1st, 1970.
Definition: timestamp.h:20
vine_set_scheduler
void vine_set_scheduler(struct vine_manager *m, vine_schedule_t algorithm)
Change the worker selection algorithm.
vine_get_path_log
char * vine_get_path_log(struct vine_manager *m, const char *path)
Returns path relative to the logs runtime directory.
vine_stats::min_cores
int64_t min_cores
The lowest number of cores observed among the connected workers.
Definition: taskvine.h:253
vine_set_bandwidth_limit
void vine_set_bandwidth_limit(struct vine_manager *m, const char *bandwidth)
Limit the manager bandwidth when transferring files to and from workers.
vine_declare_url
struct vine_file * vine_declare_url(struct vine_manager *m, const char *url, vine_cache_level_t cache, vine_file_flags_t flags)
Declare a file object from a remote URL.
vine_task_set_time_end
void vine_task_set_time_end(struct vine_task *t, int64_t useconds)
Specify the maximum end time allowed for the task (in microseconds since the Epoch).
VINE_BUFFER
@ VINE_BUFFER
A file obtained from data in the manager's memory space.
Definition: taskvine.h:148
VINE_RESULT_MAX_WALL_TIME
@ VINE_RESULT_MAX_WALL_TIME
The task ran for more than the specified time (relative since running in a worker).
Definition: taskvine.h:100
vine_stats::workers_able
int workers_able
Number of workers on which the largest task can run.
Definition: taskvine.h:161
vine_manager_install_library
void vine_manager_install_library(struct vine_manager *m, struct vine_task *t, const char *name)
Indicate the library to be installed on all workers connected to the manager.
vine_get_path_library_log
char * vine_get_path_library_log(struct vine_manager *m, const char *path)
Returns path relative to the library logs runtime directory.
vine_task_add_feature
void vine_task_add_feature(struct vine_task *t, const char *name)
Label the task with a user-defined feature.
vine_stats::min_memory
int64_t min_memory
The smallest memory size in MB observed among the connected workers.
Definition: taskvine.h:254
vine_stats::workers_init
int workers_init
Number of workers connected, but that have not send their available resources report yet.
Definition: taskvine.h:157
vine_stats::total_disk
int64_t total_disk
Total disk space in MB aggregated across the connected workers.
Definition: taskvine.h:240
vine_get_path_staging
char * vine_get_path_staging(struct vine_manager *m, const char *path)
Returns path relative to the staging runtime directory.
vine_stats::max_disk
int64_t max_disk
The largest disk space in MB observed among the connected workers.
Definition: taskvine.h:250
VINE_RESULT_UNKNOWN
@ VINE_RESULT_UNKNOWN
The result could not be classified.
Definition: taskvine.h:97
vine_set_keepalive_timeout
void vine_set_keepalive_timeout(struct vine_manager *m, int timeout)
Change the keepalive timeout for identifying dead workers for a given manager.
vine_stats::workers_removed
int workers_removed
Total number of worker connections that were terminated.
Definition: taskvine.h:165
VINE_RESULT_SANDBOX_EXHAUSTION
@ VINE_RESULT_SANDBOX_EXHAUSTION
The task used more disk than the allowed sandbox.
Definition: taskvine.h:110
vine_stats::workers_blocked
int workers_blocked
Total number of workers blocked by the manager.
Definition: taskvine.h:170
vine_summarize_workers
struct rmsummary ** vine_summarize_workers(struct vine_manager *m)
Summary data for all workers in buffer.
vine_stats::capacity_weighted
int capacity_weighted
The estimated number of tasks that this manager can support placing greater weight on the most recent...
Definition: taskvine.h:235
vine_set_keepalive_interval
void vine_set_keepalive_interval(struct vine_manager *m, int interval)
Change the keepalive interval for a given manager.
vine_stats::tasks_running
int tasks_running
Number of tasks currently executing at some worker.
Definition: taskvine.h:177
CATEGORY_ALLOCATION_MODE_EXHAUSTIVE_BUCKETING
@ CATEGORY_ALLOCATION_MODE_EXHAUSTIVE_BUCKETING
Use the exhaustive bucketing algorithm to label resources.
Definition: category.h:64
vine_stats::tasks_with_results
int tasks_with_results
Number of tasks with retrieved results and waiting to be returned to user.
Definition: taskvine.h:178
vine_set_category_resources_max
void vine_set_category_resources_max(struct vine_manager *m, const char *category, const struct rmsummary *rm)
Sets the maximum resources a task in the category may use.
vine_initialize_categories
void vine_initialize_categories(struct vine_manager *m, struct rmsummary *max, const char *summaries_file)
Initialize first value of categories.
vine_port
int vine_port(struct vine_manager *m)
Get the listening port of the manager.
vine_task_get_exit_code
int vine_task_get_exit_code(struct vine_task *t)
Get the Unix exit code of the task.
vine_stats::workers_lost
int workers_lost
Total number of worker connections that were unexpectedly lost.
Definition: taskvine.h:171
vine_task_get_library_required
const char * vine_task_get_library_required(struct vine_task *t)
Get the library name required by this task.
vine_task_get_metric
int64_t vine_task_get_metric(struct vine_task *t, const char *name)
Get a performance metric of a completed task.
vine_stats::committed_gpus
int64_t committed_gpus
Committed number of gpus aggregated across the connected workers.
Definition: taskvine.h:246
vine_result_t
vine_result_t
Possible outcomes for a task, returned by vine_task_get_result.
Definition: taskvine.h:88
vine_task_delete
void vine_task_delete(struct vine_task *t)
Delete a task.
vine_wait_for_tag
struct vine_task * vine_wait_for_tag(struct vine_manager *m, const char *tag, int timeout)
Wait for a task with a given task to complete.
vine_set_runtime_info_path
void vine_set_runtime_info_path(const char *path)
Sets the path where runtime info directories (logs and staging) are created.
vine_task_set_function_slots
void vine_task_set_function_slots(struct vine_task *t, int nslots)
Set the number of concurrent functions a library can run.
vine_stats::committed_disk
int64_t committed_disk
Committed disk space in MB aggregated across the connected workers.
Definition: taskvine.h:245
vine_file_set_mode
void vine_file_set_mode(struct vine_file *f, int mode)
Set the Unix mode permission bits of a declared file.
VINE_ALLOCATION_MODE_FIXED
@ VINE_ALLOCATION_MODE_FIXED
When monitoring is disabled, all tasks run as VINE_ALLOCATION_MODE_FIXED.
Definition: taskvine.h:120
vine_stats::time_workers_execute_good
timestamp_t time_workers_execute_good
Total time workers spent executing done tasks with result VINE_RESULT_SUCCESS.
Definition: taskvine.h:213
vine_task_set_library_required
void vine_task_set_library_required(struct vine_task *t, const char *name)
Set the library name required by this task.
VINE_TEMP
@ VINE_TEMP
A temporary file created as an output of a task.
Definition: taskvine.h:147
vine_file_contents
const char * vine_file_contents(struct vine_file *f)
Get the contents of a vine file.
vine_category_mode_t
vine_category_mode_t
Select how to allocate resources for similar tasks with vine_set_category_mode.
Definition: taskvine.h:116
vine_task_set_priority
void vine_task_set_priority(struct vine_task *t, double priority)
Specify the priority of this task relative to others in the manager.
vine_get_stats
void vine_get_stats(struct vine_manager *m, struct vine_stats *s)
Get manager statistics (only from manager)
VINE_SUCCESS_ONLY
@ VINE_SUCCESS_ONLY
Only return this output file if the task succeeded.
Definition: taskvine.h:50
VINE_ALLOCATION_MODE_MAX_THROUGHPUT
@ VINE_ALLOCATION_MODE_MAX_THROUGHPUT
As above, but maximizing throughput.
Definition: taskvine.h:136
vine_delete
void vine_delete(struct vine_manager *m)
Delete a manager.
vine_stats::max_gpus
int64_t max_gpus
The highest number of gpus observed among the connected workers.
Definition: taskvine.h:251
vine_set_property
void vine_set_property(struct vine_manager *m, const char *name, const char *value)
Add a global property to the manager which will be included in periodic reports to the catalog server...
VINE_RESULT_SIGNAL
@ VINE_RESULT_SIGNAL
The task was terminated with a signal.
Definition: taskvine.h:94
vine_cache_level_t
vine_cache_level_t
Control caching and sharing behavior of file objects.
Definition: taskvine.h:58
VINE_RESULT_CANCELLED
@ VINE_RESULT_CANCELLED
The task was cancelled by the caller.
Definition: taskvine.h:108
vine_stats::bytes_received
int64_t bytes_received
Total number of file bytes (not including protocol control msg bytes) received from the workers by th...
Definition: taskvine.h:221
vine_task_get_result
vine_result_t vine_task_get_result(struct vine_task *t)
Get the end result of the task.
vine_stats::time_send_good
timestamp_t time_send_good
Total time spent in sending data to workers for tasks with result VINE_RESULT_SUCCESS.
Definition: taskvine.h:198
vine_tune
int vine_tune(struct vine_manager *m, const char *name, double value)
Tune advanced parameters for manager.
vine_task_set_snapshot_file
int vine_task_set_snapshot_file(struct vine_task *t, struct vine_file *monitor_snapshot_file)
When monitoring, indicates a json-encoded file that instructs the monitor to take a snapshot of the t...
vine_get_stats_category
void vine_get_stats_category(struct vine_manager *m, const char *c, struct vine_stats *s)
Get the task statistics for the given category.
VINE_WATCH
@ VINE_WATCH
Watch the output file and send back changes as the task runs.
Definition: taskvine.h:47
vine_set_category_mode
int vine_set_category_mode(struct vine_manager *m, const char *category, vine_category_mode_t mode)
Turn on or off first-allocation labeling for a given category.
CATEGORY_ALLOCATION_MODE_MAX
@ CATEGORY_ALLOCATION_MODE_MAX
When monitoring is enabled, tasks are tried with maximum specified values of cores,...
Definition: category.h:43
VINE_SCHEDULE_DISK
@ VINE_SCHEDULE_DISK
Select the worker with the largest free disk space.
Definition: taskvine.h:81
vine_stats::tasks_done
int tasks_done
Total number of tasks completed and returned to user.
Definition: taskvine.h:184
vine_task_set_env_var
void vine_task_set_env_var(struct vine_task *t, const char *name, const char *value)
Specify an environment variable to be added to the task.
VINE_SCHEDULE_WORST
@ VINE_SCHEDULE_WORST
Select the worst fit worker (the worker with more unused resources).
Definition: taskvine.h:80
VINE_RESULT_INPUT_MISSING
@ VINE_RESULT_INPUT_MISSING
The task cannot be run due to a missing input file.
Definition: taskvine.h:91
vine_task_get_tag
const char * vine_task_get_tag(struct vine_task *t)
Get the tag associated with the task.
vine_task_get_category
const char * vine_task_get_category(struct vine_task *t)
Get the category associated with the task.
vine_task_get_command
const char * vine_task_get_command(struct vine_task *t)
Get the command line of the task.
vine_declare_temp
struct vine_file * vine_declare_temp(struct vine_manager *m)
Create a scratch file object.
vine_block_host
void vine_block_host(struct vine_manager *m, const char *hostname)
Block workers in hostname from working for manager q.
vine_cancel_by_task_tag
int vine_cancel_by_task_tag(struct vine_manager *m, const char *tag)
Cancel a submitted task using its tag and remove it from manager.
vine_set_category_first_allocation_guess
void vine_set_category_first_allocation_guess(struct vine_manager *m, const char *category, const struct rmsummary *rm)
Set the initial guess for resource autolabeling for the given category.
vine_stats
Statistics describing a manager.
Definition: taskvine.h:154
VINE_SCHEDULE_RAND
@ VINE_SCHEDULE_RAND
Select a random worker.
Definition: taskvine.h:79
vine_disable_peer_transfers
int vine_disable_peer_transfers(struct vine_manager *m)
Disable taskvine peer transfers to be scheduled by the manager.
VINE_RESULT_MAX_END_TIME
@ VINE_RESULT_MAX_END_TIME
The task ran after the specified (absolute since epoch) end time.
Definition: taskvine.h:96
vine_task_get_hostname
const char * vine_task_get_hostname(struct vine_task *t)
Get the hostname of the worker on which the task ran.
VINE_CACHE_LEVEL_WORKFLOW
@ VINE_CACHE_LEVEL_WORKFLOW
File remains in cache of worker until workflow ends.
Definition: taskvine.h:60
vine_set_catalog_servers
void vine_set_catalog_servers(struct vine_manager *m, const char *hosts)
Specify the catalog server(s) the manager should report to.
vine_task_add_execution_context
int vine_task_add_execution_context(struct vine_task *t, struct vine_file *f)
Adds an execution context to the task.
vine_set_tasks_left_count
void vine_set_tasks_left_count(struct vine_manager *m, int ntasks)
Specify the number of tasks not yet submitted to the manager.
timestamp.h
vine_stats::workers_connected
int workers_connected
Number of workers currently connected to the manager.
Definition: taskvine.h:156
vine_version_string
char * vine_version_string()
Return a string with the current version of taskvine.
VINE_RESULT_RMONITOR_ERROR
@ VINE_RESULT_RMONITOR_ERROR
The task failed because the monitor did not produce a summary report.
Definition: taskvine.h:102
vine_set_name
void vine_set_name(struct vine_manager *m, const char *name)
Change the project name for a given manager.
vine_stats::capacity_memory
int capacity_memory
The estimated number of workers' MB of RAM that this manager can effectively support.
Definition: taskvine.h:229
vine_stats::capacity_tasks
int capacity_tasks
The estimated number of tasks that this manager can effectively support.
Definition: taskvine.h:227
vine_stats::committed_memory
int64_t committed_memory
Committed memory in MB aggregated across the connected workers.
Definition: taskvine.h:244
vine_stats::tasks_on_workers
int tasks_on_workers
Number of tasks currently dispatched to some worker.
Definition: taskvine.h:176
vine_declare_chirp
struct vine_file * vine_declare_chirp(struct vine_manager *m, const char *server, const char *source, struct vine_file *ticket, struct vine_file *env, vine_cache_level_t cache, vine_file_flags_t flags)
Create a file object of a remote file accessible from a chirp server.
vine_file_size
size_t vine_file_size(struct vine_file *f)
Get the length of a vine file.
vine_stats::min_disk
int64_t min_disk
The smallest disk space in MB observed among the connected workers.
Definition: taskvine.h:255
VINE_CACHE_LEVEL_FOREVER
@ VINE_CACHE_LEVEL_FOREVER
File remains at execution site when worker terminates.
Definition: taskvine.h:62
vine_task_set_category
void vine_task_set_category(struct vine_task *t, const char *category)
Label the task with the given category.
vine_task_get_resources
const struct rmsummary * vine_task_get_resources(struct vine_task *t, const char *name)
Get resource information (e.g., cores, memory, and disk) of a completed task.
CATEGORY_ALLOCATION_MODE_MIN_WASTE
@ 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
vine_stats::time_receive
timestamp_t time_receive
Total time spent in receiving results from workers (output files.).
Definition: taskvine.h:197
vine_get_name
const char * vine_get_name(struct vine_manager *m)
Get the project name of the manager.