Dear George, thanks a lot for your explanations. Now all works and it is more clear to me.
Best Regards, Diego Diego On 14 October 2015 at 17:16, Georg Geiser <georg.gei...@dlr.de> wrote: > Hi Diego, > > displacements start at 0, so 0 means no displacement, i.e., the > corresponding data starts at the first entry (by default 1 in Fortran) of > the receive field. A displacement of 1 would point to entry number 2. > Btw., MPI does not care how you allocate your fields in Fortran. E.g., if > you do an > allocate(A(-1:10)) > the lower and upper bounds are only known to Fortran. You just pass an > pointer to this field to MPI and declare that it contains size(A)=12 > entries. All displacements are relative to the first entry of that field, > so a displacement of 0 points to A(-1), a displacement of 1 to A(0) and so > on. > > Best > > Georg > > > Am 14.10.2015 um 16:50 schrieb Diego Avesani: > > dear George, dear all, > thanks for the suggestions, it works now. > I have just put: > IDNodeStartGLOBAL = IDNodeStartGLOBAL -1 > > but I do not understand why. Can you explain it to me? > > Thanks > > Diego > > > On 14 October 2015 at 16:02, Georg Geiser <georg.gei...@dlr.de> wrote: > >> Diego, >> >> try to decrease your displacements by one. >> >> Best >> >> Georg >> >> >> Am 14.10.2015 um 15:51 schrieb Diego Avesani: >> >> dear all, >> I have some problem with MPI_GATHERV. >> >> In my code I generate a complex number >> >> DO ij=iNS,iNE >> X11(ij) = cmplx(1.,0.) >> ENDDO >> >> where iNS,INE change according to the CPU rank, in may case >> >> cpu 0 1 10050 >> cpu 1 10051 20100 >> cpu 2 20101 30150 >> cpu 3 30151 40401 >> >> according to that I have >> nNodeGLOBAL = 10050 10050 10050 10251 >> IDNodeStartGLOBAL = 1 10051 20101 30151 >> >> After that I apply a MPI_GATHERV as >> >> CALL MPI_GATHERV(X11(*iNS:iNE*),MPIdata%nNodes, mpi_double_cpmplex, >> *PHIH*, nNodeGLOBAL,IDNodeStartGLOBAL, mpi_double_cpmplex, 0, >> MPI_COMM_WORLD, Err) >> >> but when I plot REAL(PHIH(1)), I get >> >> 0 >> >> I use fortran, do you think that there is an error in nNodeGLOBAL? do I >> have to allocate the vector nNodeGLOBAL and IDNodeStartGLOBAL satrting from >> 0 according to the name of the rank? >> >> really really >> thanks a lot >> >> >> >> >> >> >> >> Diego >> >> >> >> _______________________________________________ >> users mailing listus...@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/10/27862.php >> >> >> >> _______________________________________________ >> 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/10/27863.php >> > > > > _______________________________________________ > users mailing listus...@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/10/27864.php > > > _______________________________________________ > 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/10/27865.php >