Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] memalign usage in OpenMPI and it's consequencesfor TotalVIew
From: Samuel K. Gutierrez (samuel_at_[hidden])
Date: 2009-10-01 14:17:50


Ticket created (#2040). I hope it's okay ;-).

--
Samuel K. Gutierrez
Los Alamos National Laboratory
On Oct 1, 2009, at 11:58 AM, Jeff Squyres wrote:
> Did that make it over to the v1.3 branch?
>
>
> On Oct 1, 2009, at 1:39 PM, Samuel K. Gutierrez wrote:
>
>> Hi,
>>
>> I think Jeff has already addressed this problem.
>>
>> https://svn.open-mpi.org/trac/ompi/changeset/21744
>>
>> --
>> Samuel K. Gutierrez
>> Los Alamos National Laboratory
>>
>> On Oct 1, 2009, at 11:25 AM, Peter Thompson wrote:
>>
>> > We had a question from a user who had turned on memory debugging in
>> > TotalView and experience a memory event error Invalid memory
>> > alignment request.  Having a 1.3.3 build of OpenMPI handy, I tested
>> > it and sure enough, saw the error.  I traced it down to,  
>> surprise, a
>> > call to memalign.  I find there are a few places where memalign is
>> > called, but the one I think I was dealing with was from malloc.c in
>> > ompi/mca//io/romio/romio/adio/common in the following lines:
>> >
>> >
>> > #ifdef ROMIO_XFS
>> >    new = (void *) memalign(XFS_MEMALIGN, size);
>> > #else
>> >    new = (void *) malloc(size);
>> > #endif
>> >
>> > I searched, but couldn't find a value for XFS_MEMALIGN, so maybe it
>> > was from opal_pt_malloc2_component.c instead, where the call is
>> >
>> >    p = memalign(1, 1024 * 1024);
>> >
>> > There are only 10 to 12 references to memalign in the code that I
>> > can see, so it shouldn't be too hard to find.  What I can tell you
>> > is that the value that TotalView saw for alignment, the first arg,
>> > was 1, and the second, the size, was  0x100000, which is probably
>> > right for 1024 squared.
>> >
>> > The man page for memalign says that the first argument is the
>> > alignment that the allocated memory use, and it must be a power of
>> > two.  The second is the length you want allocated.  One could argue
>> > that 1 is a power of two, but it seems a bit specious to me, and
>> > TotalView's memory debugger certainly objects to it. Can anyone  
>> tell
>> > me what the intent here is, and whether the memalign alignment
>> > argument is thought to be valid?  Or is this a bug (that might not
>> > affect anyone other than TotalView memory debug users?)
>> >
>> > Thanks,
>> > Peter Thompson
>> > _______________________________________________
>> > users mailing list
>> > users_at_[hidden]
>> > http://www.open-mpi.org/mailman/listinfo.cgi/users
>>
>> _______________________________________________
>> users mailing list
>> users_at_[hidden]
>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>>
>
>
> -- 
> Jeff Squyres
> jsquyres_at_[hidden]
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users