[Mpi3-rma] [Mpi-comments] Freeing memory allocated in MPI_WIN_ALLOCATE_SHARED

Rajeev Thakur thakur at mcs.anl.gov
Mon Sep 10 16:45:15 CDT 2012


I think the wording Jim suggested is the simplest for now:

If the window was created with \mpifunc{MPI\_WIN\_ALLOCATE} or \mpifunc{MPI\_WIN\_ALLOCATE\_SHARED}, \mpifunc{MPI\_WIN\_FREE} will free the window memory that was allocated during window creation.

Rajeev

On Sep 10, 2012, at 4:29 PM, William Gropp wrote:

> I haven't heard except from Hubert Ritzdorf on this one.  If we want to make this change, we'll need exact text to change.   Any proposals?
> 
> Bill
> 
> William Gropp
> Director, Parallel Computing Institute
> Deputy Director for Research
> Institute for Advanced Computing Applications and Technologies
> Paul and Cynthia Saylor Professor of Computer Science
> University of Illinois Urbana-Champaign
> 
> 
> 
> On Sep 5, 2012, at 10:47 AM, William Gropp wrote:
> 
>> Torsten has pointed out that this approach has the fragile list problem, and I agree.  A better option might be:
>> 
>> Include this information on the affected window create routines (MPI_WIN_ALLOCATE and MPI_WIN_ALLOCATE_SHARED).
>> 
>> Add to MPI_WIN_FREE that any memory allocated by a window creating routine is freed, without listing the affected routines.
>> 
>> Comments?
>> 
>> Bill
>> 
>> William Gropp
>> Director, Parallel Computing Institute
>> Deputy Director for Research
>> Institute for Advanced Computing Applications and Technologies
>> Paul and Cynthia Saylor Professor of Computer Science
>> University of Illinois Urbana-Champaign
>> 
>> 
>> 
>> On Sep 5, 2012, at 4:11 PM, Jim Dinan wrote:
>> 
>>> We could also shorten it to:
>>> 
>>> If the window was created with \mpifunc{MPI\_WIN\_ALLOCATE} or \mpifunc{MPI\_WIN\_ALLOCATE\_SHARED}, \mpifunc{MPI\_WIN\_FREE} will free the window memory that was allocated during window creation.
>>> 
>>> ~Jim.
>>> 
>>> On 9/5/12 8:38 AM, Rajeev Thakur wrote:
>>>> Another option is to just add an "or \mpifunc{MPI\_WIN\_ALLOCATE\_SHARED}" to the first sentence, as below, but either version is fine with me.
>>>> 
>>>> If the window was created with \mpifunc{MPI\_WIN\_ALLOCATE} or \mpifunc{MPI\_WIN\_ALLOCATE\_SHARED},
>>>> \mpifunc{MPI\_WIN\_FREE} will free the window memory that was allocated in \mpifunc{MPI\_WIN\_ALLOCATE} or \mpifunc{MPI\_WIN\_ALLOCATE\_SHARED}.
>>>> 
>>>> 
>>>> On Sep 5, 2012, at 2:50 AM, William Gropp wrote:
>>>> 
>>>>> Here's the current text (p 415 line 6):
>>>>> 
>>>>> If the
>>>>> window was created with \mpifunc{MPI\_WIN\_ALLOCATE},
>>>>> \mpifunc{MPI\_WIN\_FREE} will free the window memory that was allocated
>>>>> in \mpifunc{MPI\_WIN\_ALLOCATE}.}
>>>>> 
>>>>> Here is my proposed correction
>>>>> 
>>>>> (above text, followed by)
>>>>> 
>>>>> If the window was created with \mpifunc{MPI\_WIN\_ALLOCATE\_SHARED},
>>>>> \mpifunc{MPI\_WIN\_FREE} will free the window memory that was allocated
>>>>> in \mpifunc{MPI\_WIN\_ALLOCATE\_SHARED}.
>>>>> 
>>>>> This is a sufficient change, since the document is a standard and we don't need to state the same behavior everywhere (note that MPI_WIN_ALLOCATE doesn't mention MPI_WIN_FREE in the description of MPI_WIN_ALLOCATE).
>>>>> 
>>>>> Thoughts?  Is this a "simple oversight" error that we can add?
>>>>> 
>>>>> Bill
>>>>> 
>>>>> 
>>>>> William Gropp
>>>>> Director, Parallel Computing Institute
>>>>> Deputy Director for Research
>>>>> Institute for Advanced Computing Applications and Technologies
>>>>> Paul and Cynthia Saylor Professor of Computer Science
>>>>> University of Illinois Urbana-Champaign
>>>>> 
>>>>> 
>>>>> 
>>>>> On Sep 5, 2012, at 12:39 AM, Jeff Hammond wrote:
>>>>> 
>>>>>> Okay, I thought it might do that but despite having a paper copy of
>>>>>> the MPI-3 RMA chapter three feet from me at the time, I was too lazy
>>>>>> to look it up.
>>>>>> 
>>>>>> Thanks for the clarification.
>>>>>> 
>>>>>> Jeff
>>>>>> 
>>>>>> On Tue, Sep 4, 2012 at 11:47 PM, Jim Dinan <dinan at mcs.anl.gov> wrote:
>>>>>>> MPI_Win_free also frees memory allocated by MPI_Win_allocate.
>>>>>>> 
>>>>>>> ~Jim.
>>>>>>> 
>>>>>>> 
>>>>>>> On 9/4/12 4:22 PM, Jeff Hammond wrote:
>>>>>>>> 
>>>>>>>> Shouldn't that be a new call (MPI_Win_free_shared) to keep the usage
>>>>>>>> of MPI_Win_free uniform?  MPI_Win_free doesn't deallocate the buffers
>>>>>>>> in any other situation, does it?
>>>>>>>> 
>>>>>>>> Jeff
>>>>>>>> 
>>>>>>>> On Tue, Sep 4, 2012 at 4:07 PM, Jim Dinan <dinan at mcs.anl.gov> wrote:
>>>>>>>>> 
>>>>>>>>> Hi All,
>>>>>>>>> 
>>>>>>>>> It looks like we forgot to include the text specifying that
>>>>>>>>> MPI_Win_allocate_shared memory is freed along with the window.
>>>>>>>>> 
>>>>>>>>> ~Jim.
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> -------- Original Message --------
>>>>>>>>> Subject:        [Mpi-comments] Freeing memory allocated in
>>>>>>>>> MPI_WIN_ALLOCATE_SHARED
>>>>>>>>> Date:   Tue, 4 Sep 2012 12:49:10 +0000
>>>>>>>>> From:   Hubert Ritzdorf <Hubert.Ritzdorf at emea.nec.com>
>>>>>>>>> Reply-To:       Comments on the MPI Standard
>>>>>>>>> <mpi-comments at lists.mpi-forum.org>
>>>>>>>>> To:     mpi-comments at lists.mpi-forum.org
>>>>>>>>> <mpi-comments at lists.mpi-forum.org>
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> Hi,
>>>>>>>>> 
>>>>>>>>> is it correct that MPI_Win_free should free the memory allocated in
>>>>>>>>> MPI_Win_allocate_shared ?
>>>>>>>>> 
>>>>>>>>> MPI_Win_free (Page 416, Line 5-6) specifies this only for
>>>>>>>>> memory allocated by MPI_Win_allocate.
>>>>>>>>> I think that an additional reference to MPI_Win_allocate_shared is
>>>>>>>>> missing also on Page 420, Line 31, Page 448 Line 25, Page 609 Line 31,
>>>>>>>>> Page 613 Line 1, Page 614 Line 9, Page 614 Line 31.
>>>>>>>>> 
>>>>>>>>> Hubert
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> _______________________________________________
>>>>>>>>> mpi3-rma mailing list
>>>>>>>>> mpi3-rma at lists.mpi-forum.org
>>>>>>>>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-rma
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>> _______________________________________________
>>>>>>> mpi3-rma mailing list
>>>>>>> mpi3-rma at lists.mpi-forum.org
>>>>>>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-rma
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> --
>>>>>> Jeff Hammond
>>>>>> Argonne Leadership Computing Facility
>>>>>> University of Chicago Computation Institute
>>>>>> jhammond at alcf.anl.gov / (630) 252-5381
>>>>>> http://www.linkedin.com/in/jeffhammond
>>>>>> https://wiki.alcf.anl.gov/parts/index.php/User:Jhammond
>>>>>> _______________________________________________
>>>>>> mpi3-rma mailing list
>>>>>> mpi3-rma at lists.mpi-forum.org
>>>>>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-rma
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> mpi3-rma mailing list
>>>>> mpi3-rma at lists.mpi-forum.org
>>>>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-rma
>>>> 
>>>> 
>>>> _______________________________________________
>>>> mpi3-rma mailing list
>>>> mpi3-rma at lists.mpi-forum.org
>>>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-rma
>>>> 
>>> _______________________________________________
>>> mpi3-rma mailing list
>>> mpi3-rma at lists.mpi-forum.org
>>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-rma
>> 
>> 
>> _______________________________________________
>> mpi3-rma mailing list
>> mpi3-rma at lists.mpi-forum.org
>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-rma
> 
> 
> _______________________________________________
> mpi3-rma mailing list
> mpi3-rma at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-rma





More information about the mpiwg-rma mailing list