ネットワークのパフォーマンスをテストしようとしていますが、質問があります
static public void main(String[] args)
{
MPI.Init(args);
int myrank = MPI.COMM_WORLD.Rank();
int tag = 99;
int maxlen = 104857600;
int minlen = 1; //1kb ?
char [] sendbuff = new char [maxlen];
char [] recvbuff = new char [maxlen];
long speedKbps;
long speedMbps;
if (myrank == 0)
{
for (int len = minlen; len <= maxlen; len *= 2)
{ //len=*2 doubles the ping size each time
long startTime = System.nanoTime();
MPI.COMM_WORLD.Send(sendbuff, 0, len, MPI.CHAR, 1, tag);
MPI.COMM_WORLD.Recv(recvbuff, 0, len, MPI.CHAR, 1, tag);
long endTime = System.nanoTime();
long duration = endTime - startTime;
System.out.println("Time for the ping to be sent and recived of " + len + " kb is " + duration + " nanoseconds");
double transferRate = (len/ duration ) ; //amount of data in kilobytes transferred in 1 second
System.out.println("transferRate: " + transferRate + "KB per second");
}
}
}
、これminlen = 1
はどのくらいのサイズですか? 1 KB、1 ビット、1 バイトですか?
ありがとう