A Java MPI/MPJ-Express parallel programming project setup in conjunction with Maven
Clone, read the code and scripts!
cd installmpj
install.bat
mvn clean package
run.bat
If you want to setup MPJ project with maven, try these steps.
-
You first manually install the
mpj.jar
to your local.m2
maven repository. This can be done by:1.1 Download latest mpj-express. Extract folder. Go to
mpj-v0_44\lib
and grabmpj.jar
, put in sometmp
folder.1.2 Inside
tmp
folder, launchcmd.exe
and type these:
mvn install:install-file -Dfile=mpj.jar -DgroupId=mpj -DartifactId=mpj -Dversion=0.44 -Dpackaging=jar
Assuming you have already installed maven and mvn
command is in your path.
- Now go to your project
pom.xml
and add this to one of yourdependencies
node.
<dependency>
<groupId>mpj</groupId>
<artifactId>mpj</artifactId>
<version>0.44</version>
<scope>provided</scope>
</dependency>
-
Use
maven-assembly-plugin
to create executable jar file akajar-with-dependencies
. -
Then run
mpjrun.bat
using-jar
flag.
mpjrun.bat -np 4 -jar target/mpj-maven-1.0-SNAPSHOT-jar-with-dependencies.jar