Code snippets are shown in one of three ways throughout this environment:
- Code that looks like
thisis sample code snippets that is usually part of an explanation.
- Code that appears in box like the one below can be clicked on and it will automatically be typed in to the appropriate terminal window:
- Code appearing in windows like the one below is code that you should type in yourself. Usually there will be a unique ID or other bit your need to enter which we cannot supply. Items appearing in <> are the pieces you should substitute based on the instructions.
Add your name here - <name>
This is a tool which can automatically insert OpenMP pragmas into input serial C/C++ codes.
The goal of this tutorial is to learn how to use an automatic parallelizaiton tool, autoPar, built using ROSE. autoPar can automatically insert OpenMP directives into input serial C/C++ codes. For input programs with existing OpenMP directives, the tool can also double check the correctness when the right option is turned on.
- The source files are currently located in
- A standalone executable program (named
autoPar) is generated and installed to the installation tree of ROSE (under
- Test input files are located at
Similar to ROSE, autoPar is released under the BSD license.
B. Building and Installing autoPar
THe ROSE source code is provided in the sandbox. The building of librose has been completed as well. You now need to build and install autoPar by following the steps:
autoPar build folder.
Install the binaries
Then the binaries will be installed to
The tool can be tested by the following command. This step is optional and it can take a while.
make check -j4
To display command line options:
Additional useful ROSE flags:
-rose:skipfinalCompileStep // skip invoking the backend compiler to compile the transformed code, this is useful to workaround some bugs --edg:no_warnings // suppress warnings from the EDG C++ frontend
C. Usage Examples
Testing input files can be found at https://github.com/rose-compiler/rose/tree/master/projects/autoParallelization/tests
The corresponding generated testing output files can be found at: https://github.com/chunhualiao/autoPar-demo
We provide two samples below:
Without using annotations
Checkout the input:
Conduct auto parallelization:
autoPar -c $ROSE_SRC/projects/autoParallelization/tests/inner_only.c
Checkout the output:
For more information about this tool, please check
- There is a section in ROSE manual: 12.7 Automatic Parallelization pdf(http://rosecompiler.org/docs/snapshots/Edited%20ROSE-UserManual%209_10_231.pdf).