dear all, I get it. CALL MPI_ALLGATHERV(sendbuf(MPI%MCstart:MPI%MCend),MPI%nmc,MPI_INTEGER,MCrank,MCncGlobal,MCdisplay,MPI_INTEGER,COMM_CART,MPI%iErr)
I have to use : displs [in] integer array (of length group size). Entry i specifies the displacement (relative to recvbuf ) at which to place the incoming data from process i recvtype and [in] data type of receive buffer elements (handle) The most important thing is that the counting starts from 0. Really Really thanks Diego On 23 December 2014 at 16:19, Diego Avesani <diego.aves...@gmail.com> wrote: > Dear, > > I my program, I have created a vector and each processor assigns a value > to a part of it: > > *do i=MPI%start,MPI%end* > * sendbuf(i)=MPI%rank* > * enddo* > > *MPI%start *and* MPI%end* define the starting and ending positions in the > vector. > > Now, I would like that each processor knows all the value in the vector. I > think that the best solution could be to use MPI_ALLGATHERV: > > CALL > MPI_ALLGATHERV(sendbuf(MPI%start:MPI%end),MPI%nmc,MPI_INTEGER,MCrank,display,MPI_INTEGER,COMM_CART,MPI%iErr) > > What could be wrong? Do you have some suggestions for debugging? Have I > correctly understood ALLGATHERV? > > Thanks a lot > > > Diego > >