How to send a fixed size message (1kb - 1gb)
<p>how can i send a message with a fixed size, i.e. 1kb instead of a message ?</p>

<p>currently i have :</p>

<pre><code>import mpi.* ;

class Hello {

  static public void main(String[] args) {
    MPI.Init(args);
int myrank = MPI.COMM_WORLD.Rank();
long startTime = System.currentTimeMillis();
if (myrank == 0) {
    char[] mess = " test ".toCharArray();
    MPI.COMM_WORLD.Send(mess, 0, mess.length, MPI.CHAR, 1, 99);
} else {
    char[] mess = new char[20];
    MPI.COMM_WORLD.Recv(mess, 0, 20, MPI.CHAR, 0, 99);
    System.out.println("received:" + new String(mess));
}

long endTime = System.currentTimeMillis();
long duration = endTime - startTime;
System.out.println(duration);
    MPI.Finalize();
  }
}   
</code></pre>

<p>but as you can see i am sending the message test to the machine and back again, but is it possible to send a message of say 1kb to that machine and back again ?</p>

<p>i want the limit to be 1 Gb</p>

<p>would a loop system like this work ?</p>

<pre><code>for (j = 0; j &lt;= 1024; j ++) {
    System.out.println(j);
}
</code></pre>

<p>}</p>

<p>need fixed size messages, to help benchmark results for example i am looking to compare the increase in time taken to send a 1kb message, 1mb, 20mb ........ 1gb etc</p>
