Material: Java Programme

API Dokumentation mit javadoc.

Matrix Multiplikation

Vector Multiplikation

Konten und Buchungen

Semaphore und Deque

Thread pools, java.util.concurrent

Travelling Salesman Problem (TSP) mit Listen

Travelling Salesman Problem (TSP) mit byte[]

Travelling Salesman Problem (TSP) mit byte[] und local


new IO

Travelling Salesman Problem (TSP) verteilt


OpenMP and Eclipse

Using JOMP with Eclipse, copied from:

1. Add MatrixMultiply.jomp to your project

2. Add a new class to your project (this file will
   be overwritten by jomp)

3. copy jomp1.0b.jar to your project directory

4. Preferences: Add a file association for *.jomp as java files (for
   syntax highlighting and auto completion)

5. Project properties: Add jomp1.0b.jar to your project's build path

6. Project properties: Add a new builder for jomp.
 - Main Tab:
      Location: Full path to java
      Working Directory: ${workspace_loc:/project_name}
      Arguments: -classpath jomp1.0b.jar jomp.compiler.Jomp src/MatrixMultiply
 - Refresh Tab:
      Check "Refresh resources upon completion"
 - Build Options Tab:
      Check "During auto builds"
      Check "Specify working set of relevant resources"
      Click "Specify Resources" and select MatrixMultiply.jomp

Now jomp will be invoked each time you save MatrixMultiply.jomp. And
syntax highlighting etc. also works.

MPI, MPP und MPJ Express

MPJ Express and Eclipse

Using MPJ Express with Eclipse, contained in: mpj-v0_38/doc/DebuggingWithEclipseIDE.pdf

1. prepare an Eclipse project

2. in project properties, "Java Build Path", "Libraries", add the mpj.jar from 
   the lib path of MPJ 

3. to run an MPJ Express program:
   in project properties, "Run/Debug Settings", in launch configurations select your
   MPJ program and edit launch configuration
 - in the "Environment" tab, "new"  
   add "MPJ_HOME" and as value give the path to your MPJ installation directory
 - in the "Arguments" tab 
   add "-jar ${MPJ_HOME}/lib/starter.jar" to VM arguments
   add "-np 8" to Program arguments, 8 is the number of MPJ processes
 - select a "variables" button, select "edit varibles", select "new" and 
   add "MPJ_HOME" and as value give the path to your MPJ installation directory
 - run your MPJ program, the output will appear in the "Console" window

Travelling Salesman Problem (TSP) mit GUI

Umfang der Implementierungen:

lines (factor)bytes (factor)Implementierung
188 (1.0)4464 (1.0)
379 (2.0)9398 (2.1)
992 (5.3)26178 (5.9)

Heinz Kredel
Last modified: Sun May 1 13:34:53 CEST 2011