[MPICH] Variable length size of message
Jarosław Bułat
kwant at agh.edu.pl
Mon Feb 4 15:02:17 CST 2008
Hello!
I would like to send variable length size message between two processes.
Suppose maximal length of the message is known as MAXLEN. Can I do that
in the following way?:
receiver:
char dIn[ msgSIZE ];
MPI_Irecv( dIn, MAXLEN, MPI_CHAR, rankSend, tagPING, MPI_COMM_WORLD,
req );
sender:
char dOut[ msgSIZE ];
int vsize = 1024;
MPI_Send( dOut, vsize, MPI_CHAR, rankRec, tagPING, MPI_COMM_WORLD );
Suppose first 4 bytes of dOut consists of length of the message. In that
way one can determine real length of message in receiver.
I've tested such a configuration and it's working. My question is: Is it
legal/supported? or is it working accidentally?
Jarek!
More information about the mpich-discuss
mailing list