With array bounds checking your program returns an out-of-bounds error in the mpi_isend call at line 104. Looks like 'send_request' should be indexed with 'sendcount', not 'icount'.
T. Rosmond On Thu, 2015-01-08 at 20:28 +0100, Diego Avesani wrote: > the attachment > > Diego > > > > On 8 January 2015 at 19:44, Diego Avesani <diego.aves...@gmail.com> > wrote: > Dear all, > I found the error. > There is a Ndata2send(iCPU) instead of Ndata2recv(iCPU). > In the attachment there is the correct version of the program. > > > Only one thing, could do you check if the use of MPI_WAITALL > and MPI_BARRIER is correct? > > > Thanks again > > > > > > Diego > > > > On 8 January 2015 at 18:48, Diego Avesani > <diego.aves...@gmail.com> wrote: > Dear all, > thanks thank a lot, I am learning a lot. > > > > I have written a simple program that send vectors of > integers from a CPU to another. > > > The program is written (at least for now) for 4 CPU. > > > The program is quite simple: > Each CPU knows how many data has to send to the other > CPUs. This info is than send to the other CPUS. In > this way each CPU knows how may data has to receive > from other CPUs. > > > This part of the program works. > > > The problem is in the second part. > > > In the second part, each processor sends a vector of > integer to the other processor. The size is given and > each CPU knows the size of the incoming vector form > the first part of the program. > > > In this second part the program fails and I do not > know why. > > > In the attachment you can find the program. Could you > please help me. Problably I didn't understand properly > the ISEND and IRECV subroutine. > > > Thanks again > > > > Diego > > > > > > > _______________________________________________ > users mailing list > us...@open-mpi.org > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users > Link to this post: > http://www.open-mpi.org/community/lists/users/2015/01/26131.php