On Fri, 2006-09-08 at 20:31 -0400, Jeff Squyres wrote: > Thanks Harald -- I filed bug 356 on this: > > http://svn.open-mpi.org/trac/ompi/ticket/356 > > > On 9/6/06 10:39 AM, "Harald Forbert" > <harald.forb...@theochem.ruhr-uni-bochum.de> wrote: > > > I think I traced a bug found by blacs testers with various versions > > of openmpi in ompi/datatype/datatype_unpack.c (ompi/datatype/dt_unpack.c > > in 1.0.x). This might be related to ticket #65. At least after > > applying the following patch (for 1.1.[01]), the blacs reduce amax seems > > to work correctly: > > > > --- openmpi-1.1/ompi/datatype/datatype_unpack.c.orig > > +++ openmpi-1.1/ompi/datatype/datatype_unpack.c > > @@ -221,6 +221,8 @@ > > > > length = pConv->bConverted / pData->size; /* already done */ > > length = pConv->bConverted - length * pData->size; /* still > > left > > on the last element */ > > + length = pData->size - length; > > + if (length > remaining) length = 0; > > /* complete the last copy */ > > if( length != 0 ) { > > OMPI_DDT_SAFEGUARD_POINTER( user_memory, length, > > pConv->pBaseBuf,
In the same function at the bottom of the loop, is the stack->disp = user_memory - pConv->pBaseBuf; really the correct thing to do considering the two statements user_memory = pConv->pBaseBuf + initial_displ; and in the else part user_memory += stack->disp; -- Ake Sandgren, HPC2N, Umea University, S-90187 Umea, Sweden Internet: a...@hpc2n.umu.se Phone: +46 90 7866134 Fax: +46 90 7866126 Mobile: +46 70 7716134 WWW: http://www.hpc2n.umu.se