@@ -2455,9 +2455,8 @@ cores, memory and disk have modifiers `~` and `>` as follows:
24552455
24562456## Logging, Plotting, and Tuning
24572457
2458- A TaskVine manager produces several logs: ` debug ` , ` taskgraph ` , ` performance ` ,
2459- and ` transactions ` . These logs are always enabled, and appear in the current
2460- working directory in the subdirectories:
2458+ A TaskVine manager produces several logs: ` performance ` , ` taskgraph ` , ` debug ` , and ` transactions ` .
2459+ These logs are always enabled, and appear in the current working directory in the subdirectories:
24612460
24622461``` sh
24632462vine-run-info/YYYY-mm-ddTHH:MM:SS/vine-logs
@@ -2487,24 +2486,24 @@ If set, the environment variable `VINE_RUNTIME_INFO_DIR` determines the logging
24872486directory. If ` VINE_RUNTIME_INFO_DIR ` is not an absolute path, then it is taken
24882487relative to the current logging prefix (i.e. ` vine-run-info/ ` by default).
24892488
2490-
24912489### Debug Log
24922490
24932491The debug log prints unstructured messages as the manager transfers files and
24942492tasks, workers connect and report resources, etc. This is specially useful to
2495- find failures, bugs, and other errors. It is located by default at:
2493+ find failures, bugs, and other errors when your workflow isn't running as expected.
2494+ It is located by default at:
24962495
24972496``` sh
24982497vine-run-info/%Y-%m-%dT%H:%M:%S/vine-logs/debug
24992498```
25002499
2501- To enable debugging at the worker, set the ` -d ` option:
2502-
2500+ To view the debug log of the manager:
25032501``` sh
2504- $ vine_worker -d all -o worker.debug -M myproject
2502+ less vine-run-info/most-recent/vine-logs/debug
25052503```
25062504
2507- Custom APPLICATION messages can be added to the log with the calls:
2505+ When writing an application, you may find it helpful to add your
2506+ own application-level messages to the log with code like this:
25082507
25092508=== "Python"
25102509 ```python
@@ -2515,29 +2514,42 @@ Custom APPLICATION messages can be added to the log with the calls:
25152514 ```
25162515 vine_log_debug_app("your custom log message")
25172516 ```
2517+ You may also find it helpful to view the debug log of a worker,
2518+ when running it locally. To enable debugging at the worker, add
2519+ the ` -d all ` option:
2520+
2521+ ``` sh
2522+ $ vine_worker -d all -o worker.debug -M myproject
2523+ ```
2524+
2525+ And then view the debug output of the worker process:
2526+ ``` sh
2527+ less worker.debug
2528+ ```
25182529
25192530### Performance Log
25202531
25212532The performance log contains a time series of the statistics collected by the manager,
25222533such as number of tasks waiting and completed, number of workers busy,
2523- total number of cores available, etc. The log is located by default at:
2534+ total number of cores available, etc.
2535+ It is located by default at:
25242536
25252537``` sh
25262538vine-run-info/%Y-%m-%dT%H:%M:%S/vine-logs/performance
25272539```
25282540
2529- Install gnuplot to enable the use of ` vine_graph_log `
2530-
2531- ``` sh
2532- conda install conda-forge::gnuplot
2533- ```
2541+ !!! note
2542+ To use ` vine_graph_log ` , you must first install the ` gnuplot ` package like this:
2543+ ```
2544+ conda install conda-forge::gnuplot
2545+ ```
25342546
2535- The script ` vine_graph_log ` is a wrapper for ` gnuplot ` , and with it you
2536- can plot some of the statistics, such as total time spent transferring tasks,
2537- number of tasks running, and workers connected. For example, this command:
2547+ ` vine_graph_log ` will plot a wide variety of statistics from the performance log,
2548+ such as total time spent transferring tasks, number of tasks running, and workers connected.
2549+ For example, this command:
25382550
25392551``` sh
2540- $ vine_graph_log -o myplots my.stats.log
2552+ $ vine_graph_log -o myplots vine-run-info/most-recent/vine-logs/performance
25412553```
25422554
25432555produces the following graphs:
@@ -2546,11 +2558,41 @@ produces the following graphs:
25462558
25472559- [ Performance Log File Format Details] ( log-file-formats.md#performance-log-format )
25482560
2561+ ### Taskgraph Log
2562+
2563+ The ` taskgraph ` log file captures the graph relationship between every task and file in a workflow as it runs.
2564+ To generate a visual graph from the log file, run ` vine_plot_taskgraph ` :
2565+ It is located by default at:
2566+
2567+ ``` sh
2568+ vine-run-info/%Y-%m-%dT%H:%M:%S/vine-logs/taskgraph
2569+ ```
2570+
2571+ !!! note
2572+ To use ` vine_plot_taskgraph ` , you must first install the ` graphviz ` package like this:
2573+ ```
2574+ conda install conda-forge::graphviz
2575+ ```
2576+
2577+ ``` sh
2578+ vine_plot_taskgraph vine-run-info/most-recent/vine-logs/taskgraph --output taskgraph.pdf
2579+ ```
2580+
2581+ Which produces a graph like the following:
2582+
2583+ ![ Example Task Graph] ( images/plot-taskgraph.png )
2584+
2585+ Note that very large task graphs may take a long time to render, and make be impractical to display
2586+ if there are a large number of edges to be rendered.
2587+
2588+ - [ Taskgraph Log File Format Details] ( log-file-formats.md#taskgraph-log-format )
2589+
25492590### Transactions Log
25502591
25512592The transactions log records the lifetime of tasks and workers. It is
25522593specially useful for tracking the resources requested, allocated, and used by
2553- specific tasks. It is located by default at:
2594+ specific tasks.
2595+ It is located by default at:
25542596
25552597``` sh
25562598vine-run-info/%Y-%m-%dT%H:%M:%S/vine-logs/transactions
@@ -2570,7 +2612,6 @@ to produce a visualization of how tasks are packed into workers like this:
25702612
25712613- [ Transactions Log File Format Details] ( log-file-formats.md#transactions-log-format )
25722614
2573-
25742615Custom APPLICATION messages can be added to the log with the calls:
25752616
25762617=== "Python"
@@ -2667,28 +2708,6 @@ For the *workers* file:
26672708| ` disk ` | Total disk space in MB available at the worker.|
26682709| ` gpus ` | Total number of gpus available at the worker.|
26692710
2670- ### Task Graph Log
2671-
2672- The complete graph of tasks and files is recorded in ` taskgraph `
2673- using the [ Graphviz] ( https://graphviz.org ) Dot file format. With the ` dot ` tool installed, you
2674- can visualize the task graph as follows:
2675-
2676- ``` sh
2677- dot -Tpng vine-run-info/most-recent/vine-logs/taskgraph > taskgraph.png
2678- ```
2679-
2680- This can produce results like this:
2681-
2682- ![ Example Task Graph] ( images/plot-taskgraph.png )
2683-
2684- Note that very large task graphs may be impractical to graph at this level of detail.
2685-
2686- !!! note
2687- You may need to install Graphviz Dot separately like this:
2688- ```
2689- conda install -c conda-forge graphviz
2690- ```
2691-
26922711### TaskVine Report Tool
26932712
26942713The [ TaskVine Report Tool] ( https://github.com/cooperative-computing-lab/taskvine-report-tool ) is a separate repository maintained by our team that provides web-based visualization capabilities. It is highly optimized for parsing large log files and generating informative visualizations. Here are some screenshots of this tool:
0 commit comments