-
Notifications
You must be signed in to change notification settings - Fork 0
Get Started
Adrian edited this page Sep 13, 2021
·
1 revision
The following steps are necessary to get started with the PPL project.
The first step is to set up the environment, which includes the following tools to be installed:
- Java Development Kit (JDK).
- Java Runtime Environment (JRE).
- IntelliJ IDEA: As an University member, you may be able to obtain the ultimate licence, which includes profiling tools.
- 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.
- Install Maven
- 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
- Use Maven to generate your dependencies for the Project.
mvn initialize
- 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+
The second step is to configure the project for the first use:
- Clone the repository.
- Open IntelliJ and select the Open or Import wizard to import the project.
- Select the pom.xml located within the PPL-Sources directory and confirm by selecting Open as Project.
- Open the Maven menu (on the right side of the window), select the PPL-Sources project and execute a compile under the lifecycle category.
The third step is to compile your first PPL program:
- Ensure that the benchmark and Rodinia-PPL folders are present in the repository.
- Open the PPL project in IntelliJ again and navigate to the test cases defined in the Pattern-OPT project.
- Execute the test cases to validate the setup.
- The mapping results will be generated as an optimization report within the benchmark repository.
- User alternative If you are only using the tool, you can download the OPTReport.jar file. Explained here.
The fourth step is to compile the Tool into an executable .jar file.
- Go to the pom.xml file within the package that contains the tool definition.
- 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>
- Use the install function of the maven lifecycle to generate the .jar file.
- Find the .jar in the target folder of the same package you changed the pom.xml and defined the Mainclass in.