hello,<br><br>I am a little confused by the <b>extent</b> and <b>size</b> of derived datatypes. In my opinion, `<b>extent</b>&#39; includes the additional `padding spaces&#39; introduced by non-continuous displacements of blocks in the datatype, while 
<b>`size&#39;</b> only counts the `useful&#39; bytes which do not include the padding spaces. Generally, the `<b>extent</b>&#39; of a datatype is not smaller then its `<b>size</b>&#39;. As far as I know, some blocks in derived datatypes have negative displacements, thus their `
<b>extents</b>&#39; might be smaller than their `<b>sizes</b>&#39;.<br><br>So the questions are &quot;<i><b>how many bytes does MPI_Send() really send out if the datatype has a bigger extent than its size?</b></i>&quot; and &quot;
<i><b>how does the corresponding&nbsp; MPI_Recv() place the received data?</b></i>&quot; I goes through the MPICH2 code, and got a blur big picture. It seems that MPI_Send() sends the datetype in compacted format, in other word, only 
<b>MPI_Type_size(datatype) * count</b> bytes are sent, but not <b>MPI_Type_extent(datatype) * count. </b>Accordingly, MPI_Recv() only receives <b>MPI_Type_size(datatype) * count</b> bytes from the sender, and these bytes are unpacked to the receive buffer according to the definition of the datatype. In other words, padding spaces are inserted in the receive buffer if necessary while unpacking the received data. This optimization is reasonable: to reduce the amount of transfer data, while holding the semantics of derived types. 
<br><br>To conclude, only useful bytes are transfered, while both the send and receive buff should be big enough to hold the &#39;whole datatype&#39;.<br><br>Is my understanding right? Please let me know any mistake I made. 
<br><br>Thanks in advance!<br><br>Best<br><br>Andrew<br>