Immediately after running runRDV or mpiboot i get something like:
Version 49 means that P2P-MPI is compiled with a 1.5 JDK while The JVM you are using is unable to interpret this code.
We recommend that you upgrade to a JDK 1.5 (also called JDK 5.0).
Note that it is possible to generate code compatible with older JVM by using the -target option in java
(see http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html).
However, we use the JDK 1.5 format for sake of performances.
P2P-MPI lists the available network interfaces on your computers that have a suitable IP and select arbitrarily one of them. You can set IFACE= in the configuration file to say which one you prefer. You will typically use IFACE=eth0 or IFACE=eth1 (linux), IFACE=en0 or IFACE=en1 (MacOSX), but on Windows, you will need the whole interface description as returned by the command ipconfig, e.g IFACE=Broadcom Ethernet Card.
My program starts on my local host, the other peers have accepted their job but it seems they cannot run it.
This situation may currently happen because P2P-MPI does not check the "java" settings of peers.
So when a peer accepts a job, it may have a , e.g., java 1.5 installed while the class files you send
are produced by a JDK 1.6 (version 50 class files), and the remote peer might be unable to run it.
Remember that a remote peer just issue "java classname" upon receipt of transfered files.
Actually, mismatch between 1.5 and 1.6 is currently the only potential problematic case,
since a JDK >= 1.5 is required to run P2P-MPI.
We plan in a near future, to advertize the java settings of peers to avoid such mismatches.
After running mpiboot my Linux box always seems to bind to the address 127.0.0.1.
Is there a way to force mpiboot to use a particular IP address ?
This happens with some Linux distributions that set the /etc/hosts file so that you can read something like:
My computer has a private IP (and i have a router doing NAT). Can i participate in a P2P-MPI group with computers having normal IPs ?
Yes. You have to set EXTERNAL_IP in P2P-MPI.conf to the public IP of your router doing NAT and take care to configure your router to do appropriate port forwarding (i.e. when packets are sent to your router on ports used by P2P-MPI, it should redirect it to the private IP).
Can i limit the number of jobs that my computer can run simultaneously ?
Yes, from version 0.17.0, you can specify in your configuration file NUMTASK_SIMULTANEOUS=x,
where x is the maximum number of jobs run simultaneously on your computer (if x > 0).
x=0 means you do not limit the number of jobs, and is the default.
Can i deny access to my machine to some visitors ?
Yes, from version 0.17.0, you can specify in your configuration file HOST_DENY=x1,x2,...
where x1, x2 are network IP or first digits of IPs of hosts you want to deny access.
Valid examples are
Can I tell P2P-MPI to use a specific configuration file (other than $P2PMPI_HOME/P2P-MPI.conf) ?
Yes, from version 0.27.0, you can set the environment variable P2PMPI_CONF_FILE.
By setting this variable to a filename (absolute pathname) you override the default $P2PMPI_HOME/P2P-MPI.conf.
This can be handy if you share your p2pmpi installation over NFS, and you want specific settings for the various
hosts. You can setup for example two different configuration files cluster-node-type1.conf and cluster-node-type2.conf
and assign P2PMPI_CONF_FILE (e.g. in .bashrc) with the correct config name based on the cluster name (e.g. hostname).
In fact, MPDs catch I/O from System.out.println() and redirect these to rank 0 (the submitter host, where you run p2pmpirun). However, i/o are buffered, waiting on a newline char to transmit. The solution is therefore to make a System.out.println() somewhere in your program to flush the buffer.
How to send a 2D matrix with MPI.Send ?
Because java treats 2-Dimension matrix as an object, you have to use the MPI primitive MPI.OBJECT
.
MPI.OBJECT
:
import p2pmpi.mpi.*; public class SendMatrix2D { public static void main(String[] args) { int x[][] = new int[10][10]; int y[][] = new int[10][10]; MPI.Init(args); int rank = MPI.COMM_WORLD.Rank(); int size = MPI.COMM_WORLD.Size(); if(size != 2) { System.out.println("Please run test with -n 2 option"); MPI.Finalize(); } //Generate value for matrix X for(int i = 0; i < 10; i++) { for(int j = 0; j < 10; j++) { x[i][j] = i; y[i][j] = 0; } } //Rank 0 sends matrix X, and Rank 1 store it in Y //Test to send 2 lines each time for(int i = 0; i < 10; i+=2) { if(rank == 0) { MPI.COMM_WORLD.Send(x, i, 2, MPI.OBJECT, 1, 10); } else { MPI.COMM_WORLD.Recv(y, i, 2, MPI.OBJECT, 0, 10); } } //Display value of matrix Y on Rank 1 if(rank != 0) { for(int i = 0; i < 10; i++) { System.out.println("y["+i+"][5] = " + y[i][5]); } } MPI.Finalize(); } }
I cannot access my command line arguments as usually because 'p2pmpirun' and its arguments precedes those of my own program. For instance args[0] is 'p2pmpirun' and not my program name.
MPI.Init() returns your normal program arguments, i.e without the extra command arguments required to launch the
paralell program. Below is an illustration showing how to get 'myArgs' which are the real program arguments.
Copyright © 2010, TAG