<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'>Hi,<div><br></div><div>I'd like some clarification on MPI_Pack/Unpack: the standard only says that "some communication libraries provide pack/unpack functions for sending non-contiguous data", but it's not clear to me what MPI_Pack/Unpack are supposed to do. For example, if I have a MPI_Datatype representing a structure with holes between fields, is MPI_Pack just supposed to put the elements of the structure close to each other so that there is no more holes, or can it do something different (compressing, adding metadata, etc.)?</div><div><br></div><div>The reason I'm asking this is because I'm designing a code to extract chunks of multi-dimentional arrays (basically a big array has ghost zones and I want to extract the non-ghost data from this big array into a smaller array, contiguous in memory). This extraction is local and does not involve communication so right now after using MPI_Type_create_subarray to create a datatype adapted to my need, I post an MPI_Irecv with a contiguous array of MPI_CHAR as type, and then an MPI_Send with one element of the type I just created. I was wondering if MPI_Pack would be equivalent (and maybe more efficient)?</div><div><br></div><div>Thanks<br><br><div><span name="x"></span><font size="2"><font size="3">Matthieu Dorier<br>
</font>PhD student at ENS Cachan Brittany and IRISA<br><a href="http://people.irisa.fr/Matthieu.Dorier">http://people.irisa.fr/Matthieu.Dorier</a></font><span name="x"></span><br></div></div></div></body></html>