[MPICH2-dev] Freeing context IDs, error handling in MPI_Win_create()

Gail Alverson gail at cray.com
Sun Sep 14 02:18:31 CDT 2003


FYI, the Pallas MPI benchmark suite can be found at:
http://www.pallas.com/e/products/pmb/index.htm

Gail


> -----Original Message-----
> From: owner-mpich2-dev at mcs.anl.gov
> [mailto:owner-mpich2-dev at mcs.anl.gov]On Behalf Of Doug Gilmore
> Sent: Friday, September 12, 2003 6:21 PM
> To: mpich2-dev at mcs.anl.gov
> Subject: [MPICH2-dev] Freeing context IDs, error handling in
> MPI_Win_create()
> 
> 
> I tracked down the following problems when testing the
> MPICH2-0.94b1 release on RMA test in the Pallas performance
> suite.  The test creates and deletes many RMA windows
> so the problem in freeing context IDs was exposed
> very quickly.
> 
> Also in MPID_Win_create() there is some error path
> cleanup that should probably be attended to, such as
> freeing allocations done before the error was detected.
> 
> Doug
> 
> *** commutil.c.~1.1.1.6~	Fri Sep 12 15:56:52 2003
> --- commutil.c	Fri Sep 12 16:34:08 2003
> ***************
> *** 167,175 ****
>       int idx, bitpos;
>       /* Convert the context id to the bit position */
>       /* printf( "Freeed id = %d\n", context_id ); */
> !     context_id <<= 2;       /* Remove the shift of a factor of four */
> !     idx = context_id % 32;
> !     bitpos = context_id / 32;
>   
>       context_mask[idx] |= (0x1 << bitpos);
>   
> --- 167,175 ----
>       int idx, bitpos;
>       /* Convert the context id to the bit position */
>       /* printf( "Freeed id = %d\n", context_id ); */
> !     context_id >>= 2;       /* Remove the shift of a factor of four */
> !     idx = context_id / 32;
> !     bitpos = context_id % 32;
>   
>       context_mask[idx] |= (0x1 << bitpos);
>   
> 
> *** win_create.c.~1.1.1.4~	Fri Sep 12 17:19:41 2003
> --- win_create.c	Fri Sep 12 17:20:43 2003
> ***************
> *** 106,112 ****
>       }
>   #   endif /* HAVE_ERROR_CHECKING */
>   
> !     MPID_Win_create(base, size, disp_unit, info, comm_ptr, &win_ptr);
>   
>       /* return the handle of the window object to the user */
>       *win = win_ptr->handle;
> --- 106,113 ----
>       }
>   #   endif /* HAVE_ERROR_CHECKING */
>   
> !     if (mpi_errno = MPID_Win_create(base, size, disp_unit, 
> info, comm_ptr, &win_ptr))
> ! 	return mpi_errno;
>   
>       /* return the handle of the window object to the user */
>       *win = win_ptr->handle;
> 



More information about the mpich2-dev mailing list