Chapter 6. Running Cetus

Table of Contents

Quick Start
Command Line Options

Quick Start

  1. Locate JAR files for ANTLR and Cetus and add them to your CLASSPATH variable.

    $ export CLASSPATH=$ANTLR_jar_location:$Cetus_jar_location

  2. Run Cetus by invoking the driver's main method.

    $ java cetus.exec.Driver [option] [files]

NOTE: The build script (or build.xml) provides a target that encapsulates the above processes to a wrapper script called "cetus". See more details in build.sh and build.xml. Cetus can simply be run as follows using the script.



$ cetus [option] [files]

Sample invocations of Cetus:

  • Parallelize outermost loops in the input source. This automatically generates OpenMP pragmas. Output source file is stored in directory "cetus_output" by default.

    $ cetus -parallelize-loops=2 -report-parallel test.c

  • Instrument the output source in order to obtain a profile of the loops that are parallelized by Cetus from the above invocation.

    $ cetus -profile-loops=4 cetus_output/test.c