Skip to content

Get Started

Adrian edited this page Sep 13, 2021 · 1 revision

Get Started

The following steps are necessary to get started with the PPL project.

Step 1: Environment

The first step is to set up the environment, which includes the following tools to be installed:

  1. Java Development Kit (JDK).
  2. Java Runtime Environment (JRE).
  3. IntelliJ IDEA: As an University member, you may be able to obtain the ultimate licence, which includes profiling tools.
  4. Gurobi Optimizer: Register as an academic user and request an according licence. Refer to the quickstart guide to set up the environment variables and the licence key correctly.
  5. Install Maven
  6. Go to the GUROBI installation folder and use Maven to link the GUROBI java library to your a local repository. The "gurobi.jar" file can usually be found in the "lib" directory. The following command can be used to reference the gurobi library with Maven (For Windows you should replace "gurobi.jar" with ".\gurobi.jar":
mvn install:install-file -Dfile="gurobi.jar" -DgroupId="com.gurobi" -DartifactId=gurobi -Dversion="4.0" -Dpackaging=jar -DgeneratePom=true
  1. Use Maven to generate your dependencies for the Project.
mvn initialize

  1. User alternative If you are only using the tool, you can download the .jar file. Explained here. If you do that you are finished with the setup.

IMPORTANT!!! Please make sure that you use Gurobi Version 9.0.X, Java DK Version 11, 12 or 13 and Java RE Version 8+

Step 2: Project

The second step is to configure the project for the first use:

  1. Clone the repository.
  2. Open IntelliJ and select the Open or Import wizard to import the project.
  3. Select the pom.xml located within the PPL-Sources directory and confirm by selecting Open as Project.
  4. Open the Maven menu (on the right side of the window), select the PPL-Sources project and execute a compile under the lifecycle category.

Step 3: Test

The third step is to compile your first PPL program:

  1. Ensure that the benchmark and Rodinia-PPL folders are present in the repository.
  2. Open the PPL project in IntelliJ again and navigate to the test cases defined in the Pattern-OPT project.
  3. Execute the test cases to validate the setup.
  4. The mapping results will be generated as an optimization report within the benchmark repository.
  5. User alternative If you are only using the tool, you can download the OPTReport.jar file. Explained here.

Step 4: Build

The fourth step is to compile the Tool into an executable .jar file.

  1. Go to the pom.xml file within the package that contains the tool definition.
  2. Add your main file (the tool definition) to the plugins defined in the pom.xml within the same package as follows:
<plugins>
...
  <plugin>
     <artifactId>maven-assembly-plugin</artifactId>
     <configuration>
       <archive>
         <manifest>
           <mainClass>Path.toMain.Main</mainClass> <!-- this needs to be adopted for your Mainclass -->
         </manifest>
       </archive>
       <descriptorRefs>
         <descriptorRef>jar-with-dependencies</descriptorRef>
       </descriptorRefs>
     </configuration>
      <executions>
       <execution>
        <id>make-assembly</id> <!-- this is used for inheritance merges -->
        <phase>package</phase> <!-- bind to the packaging phase -->
        <goals>
          <goal>single./goal>
        </goals>
      </execution>
    </executions>
  </plugin>
...
./plugins>
  1. Use the install function of the maven lifecycle to generate the .jar file.
  2. Find the .jar in the target folder of the same package you changed the pom.xml and defined the Mainclass in.