Re: [OMPI users] ERR_TRUNCATE with MPI_Pack

2018-02-15 Thread Thomas Jahns
On 02/14/2018 11:19 AM, Florian Lindner wrote: Hello, I have this example code: #include #include int main(int argc, char *argv[]) { MPI_Init(&argc, &argv); { MPI_Request req1, req2; std::vector vec = {1, 2, 3}; int packSize = sizeof(int) * vec.size(); Why don't you us

Re: [OMPI users] ERR_TRUNCATE with MPI_Pack

2018-02-14 Thread Gilles Gouaillardet
Florian, My bad, I overlooked that. Per the man page, the second parameter of MPI_Unpack() is the input buffer size in *bytes*. In your case, it should be packSize instead of vecSize. Makes sense ? FWIW, I never hesitate to run small tests with mpich (or its derivative). If both implementation

Re: [OMPI users] ERR_TRUNCATE with MPI_Pack

2018-02-14 Thread Florian Lindner
Hi Gilles, Am 14.02.2018 um 11:46 schrieb Gilles Gouaillardet: > Florian, > > You send position=0 MPI_PACKED instead of estimatedPackSize, so it is very > odd you see get_count = 12 > > Can you please double check that part ? https://gist.github.com/floli/310980790d5d76caac0b19a937e2a502 You

Re: [OMPI users] ERR_TRUNCATE with MPI_Pack

2018-02-14 Thread Gilles Gouaillardet
Florian, You send position=0 MPI_PACKED instead of estimatedPackSize, so it is very odd you see get_count = 12 Can you please double check that part ? Also, who returns MPI_ERR_TRUNCATE ? MPI_Recv ? MPI_Unpack ? Cheers, Gilles Florian Lindner wrote: >Hello, > >I have this example code: > >