Skip to content
Nick Vrvilo edited this page Sep 24, 2015 · 4 revisions

‼️ CnC-OCR has been incorporated into the Habanero CnC Framework. Please refer to habanero-rice/cnc-framework for the latest CnC-OCR source code and documentation.

Computation graph visualization guide

This page will describe usage of the included runtime graph visualization tool, CnCDebugGraph. The page assumes that you are already capable of compiling and running a program, which is outlined in Workflow.

1. Enable debug logging and run the program.

CFLAGS='-DCNC_DEBUG_LOG=\"./cnc_events.log\"' make clean run WORKLOAD_ARGS="args ..."

This invocation will clear out any previously compiled program and recompile with debug logging enabled, and then run it with the debug log written to the file "cnc_events.log".

2. Run the graph visualizer.

CnCDebugGraph cnc_events.log

The visualizer tool will construct the computation graph based on the runtime log of the program and output it in DOT format to standard out, which can be piped into GraphViz, for example. Assuming GraphViz is installed and available on the PATH, an animated version of the graph can be produced:

CnCDebugGraph cnc_events.log --html

This command will construct the computation graph, then call GraphViz to render it in SVG format, which is embeddd into HTML along with JavaScript code to animate the graph based on runtime ordering information. The entire standalone HTML is printed to standard out.

Other options can be examined by passing the -h argument. Example on 4 choose 2

Clone this wiki locally