Manta path

From Manta Wiki
Jump to: navigation, search


The script reads commands from a text file and runs individual batch runs of a camera path. The result of these runs is plotted with gnuplot and the plot images (eps and png) are added to an html file automatically. The script also saves the raw data and plot command files.

Each line of the input file contains either a script directive or a command that data will be read from. The script appends a -ui camerapath(...) to the end of each command specified in the input file.

Often the script is used to measure scaling performance. Each plot in the output file is of an individual run (frame by frame along the x axis). The script reads in the output file generated by and constructs a scaling plot (e.g. number of processors varies along the x axis).

Command Line Options

% perl ../StandAlone/
-file       <manta commands file>
-prefix     <output png prefix>
-path       <camera path file>
-sync       <camera path sync>
-delta_t    <camera path delta t>
-delta_time <camera path delta time>
-interval   <m> <n>
-warmup     <n>
-title      <title>
-plot       <x> <y> (default column 2 and 5)
-columns    <n> (number of columns in manta output, default 5)
            Column info is passed to gnuplot, first column is 1 not 0.
-[no]keep   (keep temporary files, default on)

Each line of the command file is either a manta command or 
plot: [above args] to change args between runs
% perl ../StandAlone/ 
Must provide a label for each series.
Usage: -file <infile.html>
-file <infile.html>  -- Input file
-key <string>        -- Key to search for on x axis default "np"
-series <n>      -- Independent series inteleaved by n lines.
                    This means that the input is interleaved.
                    Default 1.
-label <label0> <label1>
                 -- Specify a label for each series. (required)

Script directives

The general form of a line containing a script directive is directive: arg0 arg1 ...

The "plot:" directive redefines a command line arg between runs. The additional "-subtitle name"

plot: ''any command line arg''

The "set:" directive assigns a value to a variable. Variable values are substituted using ${name} notation. Names are case sensitive. Variables, except for macro parameters have global scope.

set: ''name'' ''value (string my contain spaces)''
set: MANTA_CMD bin/manta -np 4 -imagedisplay null ${SCENE}

The "echo:" directive outputs whatever follows to stdout.

echo: ''string''

The "system:" directive runs the specified command. If the command returns non-zero the benchmark script will terminate with an error.

system: ''command and args''
system: gmake -sj 4

Macro are supported. Each macro may have one parameter and all of the variables in a macro have global scope. Variables are substituted at the time which the macro is invoked.

Macro definition:

begin_macro: ''name''(''parameter'')
''any number of directives or commands''

Macro invocation:

macro: ''name''(''parameter value'')

Lines may be commented with '#'.


Input Command File

The following example input file was used to test different ray packet sizes. The script reconfigures and recompiles manta between each run.

# Ray Packet size test.
plot: -sync 2 -interval 2 4 -warmup 1

# Specify the location of the dataset.
set: DATA_FILE /home/sci/abe/models/defender.v3c1

# Manta Command.
set: SCENE -scene "lib/ -file ${DATA_FILE} )"
set: MANTA_CMD bin/manta -np 4 -imagedisplay null ${SCENE}

# Run Macro.
begin_macro: RUN(SIZE)
plot: -subtitle Size ${SIZE}
echo: --------------------------------------------------${SIZE}
system: gmake -sj 4

# Run the benchmark.
macro: RUN(1)
macro: RUN(2)
macro: RUN(3)

Example output [1]


It is necessary to specify an input command file, a camera path, and an output prefix. -file scaling-bench.csh -path boeing777-path1.txt -prefix revenue-tests/101005-scaling-path1 -title "Scaling on revenue"

This will produce a web page similar to: scaling-path1.html.

Scaling performance may be plotted with the following command:

cd revenue-tests
perl ../../StandAlone/ -file 101005-scaling-path1.html -labels np

The plot would look similar to: 110905-scaling-glx-path1.html.png

These results are also appended to the input html file.

It is highly recommended to use a subdirectory for output since a large number of files are produced by the script.