pmodels / mpich

Official MPICH Repository
http://www.mpich.org
Other
560 stars 279 forks source link

ROMIO: free keyvals inside cleanup routines registered to run at MPI_Finalize() #449

Closed mpichbot closed 8 years ago

mpichbot commented 8 years ago

Originally by Lisandro Dalcin dalcinl@gmail.com on 2009-03-11 15:42:48 -0500



When running this simple example,

#include <mpi.h>
int main( int argc, char ** argv ) {
  MPI_File fh;
  int amode = MPI_MODE_RDWR | MPI_MODE_CREATE | MPI_MODE_DELETE_ON_CLOSE;
  MPI_Init(&argc, &argv);
  MPI_File_open(MPI_COMM_WORLD, "/tmp/datafile",
                amode, MPI_INFO_NULL, &fh);
  MPI_File_close(&fh);
  MPI_Finalize();
  return 0;
}

I'm still getting these warnings ...

$ ./a.out
In direct memory block for handle type ATTRIBUTE KEY, 2 handles are
still allocated

Please review the attached patch fixing the issues. Note however that
my patch is missing something ...
Please, take a look at routine:

file: src/mpi/romio/adio/common/cb_config_list.c
func: ADIOI_cb_gather_name_array()

In that function, a keyval is created and never freed. Not sure the
best way to fix it.

Regards,

--
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
mpichbot commented 8 years ago

Originally by Lisandro Dalcin on 2009-03-11 15:42:48 -0500


This message has 1 attachment(s)

mpichbot commented 8 years ago

Originally by Lisandro Dalcin on 2009-03-11 15:42:48 -0500


Attachment added: ROMIO_FREE_KEYVALS.diff (1.4 KiB) Added by email2trac

mpichbot commented 8 years ago

Originally by goodell on 2009-03-11 16:06:48 -0500


Hi Lisandro,

Thanks for the bug report. We are aware of this particular problem and I believe it is actually being worked on right now (see ticket #222).

Closing this ticket as a duplicate of #222.

-Dave

mpichbot commented 8 years ago

Originally by Robert Latham on 2009-03-11 16:14:26 -0500



On Wed, Mar 11, 2009 at 09:06:48PM -0000, mpich2 wrote:
> -------------------------------------------------+--------------------------
>  Reporter:  Lisandro Dalcin <dalcinl@gmail.com>  |        Owner:
>      Type:  bug                                  |       Status:  closed
>  Priority:  minor                                |    Milestone:  mpich2-1.1b1
> Component:  romio                                |   Resolution:  duplicate
>  Keywords:                                       |
> -------------------------------------------------+--------------------------
>
> Changes (by goodell):
>
>   * status:  new => closed
>   * component:  mpich2 => romio
>   * summary:  ROMIO: free keyvals inside cleanup routines registered to run
>               at
>         MPI_Finalize() => ROMIO: free keyvals inside cleanup
>               routines registered to run at
>               MPI_Finalize()
>   * priority:  major => minor
>   * milestone:  => mpich2-1.1b1
>   * resolution:  => duplicate
>
> Comment:
>
>  Hi Lisandro,
>
>  Thanks for the bug report.  We are aware of this particular problem and I
>  believe it is actually being worked on right now (see ticket #222).
>
>  Closing this ticket as a duplicate of #222.

Hi Dave. This is slightly different I think. In particular, the
attributes for the cb_config_list are not addressed in #222.

==rob

--
Rob Latham
Mathematics and Computer Science Division    A215 0178 EA2D B059 8CDF
Argonne National Lab, IL USA                 B29D F333 664A 4280 315B
mpichbot commented 8 years ago

Originally by goodell on 2009-03-11 16:16:21 -0500


Fair enough, my misunderstanding. Reopening.

mpichbot commented 8 years ago

Originally by robl on 2009-03-12 18:04:13 -0500


fixed in [57c200835782b9c6d2a2b7ba0b8fe01ec2a650ce]