Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] valgrind complaint in openmpi1.3 (mca_mpool_sm_alloc)
From: George Bosilca (bosilca_at_[hidden])
Date: 2009-03-14 18:08:43


I set it based on the only available information we have in the init
function. This way the variable is always initialized, and the upper
layer (whatever it is) has the responsibility to set it to something
useful.

Looking at the code it seems that the upper layer in question is the
mpool sm component who has this information. r20780 fixes this problem.

   george.

On Mar 14, 2009, at 09:23 , Jeff Squyres wrote:

> George --
>
> Any particular reason you fixed it this way?
>
>
> On Mar 10, 2009, at 1:40 PM, Åke Sandgren wrote:
>
>> On Tue, 2009-03-10 at 09:23 -0800, Eugene Loh wrote:
>> > Åke Sandgren wrote:
>> >
>> > >Hi!
>> > >
>> > >Valgrind seems to think that there is an use of uninitialized
>> value in
>> > >mca_mpool_sm_alloc, i.e. the if(mpool_sm->mem_node >= 0) {
>> > >Backtracking that i found that mem_node is not set during
>> initializing
>> > >in mca_mpool_sm_init.
>> > >The resources parameter is never used and the mpool_module-
>> >mem_node is
>> > >never initalized.
>> > >
>> > >Bug or not?
>> > >
>> > >
>> > Apparently George fixed this in the trunk in r19257
>> > https://svn.open-mpi.org/source/history/ompi-trunk/ompi/mca/mpool/sm/mpool_sm_module.c
>> > . So, the resources parameter is never used, but you call
>> > mca_mpool_sm_module_init(), which has the decency to set mem_node
>> to
>> > -1. Not a helpful value, but a legal one.
>>
>> So why not set it in the calling function which have access to the
>> precomputed resources value?
>>
>> --
>> Ake Sandgren, HPC2N, Umea University, S-90187 Umea, Sweden
>> Internet: ake_at_[hidden] Phone: +46 90 7866134 Fax: +46 90
>> 7866126
>> Mobile: +46 70 7716134 WWW: http://www.hpc2n.umu.se
>>
>> _______________________________________________
>> users mailing list
>> users_at_[hidden]
>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>
>
> --
> Jeff Squyres
> Cisco Systems
>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users