Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions ompi/win/win.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "ompi/mca/osc/base/base.h"
#include "ompi/mca/osc/osc.h"

#include "ompi/runtime/params.h"

/*
* Table for Fortran <-> C communicator handle conversion. Note that
Expand Down Expand Up @@ -88,10 +89,29 @@ ompi_win_init(void)
return OMPI_SUCCESS;
}

static void ompi_win_dump (ompi_win_t *win)
{
opal_output(0, "Dumping information for window: %s\n", win->w_name);
opal_output(0," Fortran window handle: %d, window size: %d\n",
win->w_f_to_c_index, ompi_group_size (win->w_group));
}

int
ompi_win_finalize(void)
int ompi_win_finalize(void)
{
size_t size = opal_pointer_array_get_size (&ompi_mpi_windows);
/* start at 1 to skip win null */
for (size_t i = 1 ; i < size ; ++i) {
ompi_win_t *win =
(ompi_win_t *) opal_pointer_array_get_item (&ompi_mpi_windows, i);
if (NULL != win) {
if (ompi_debug_show_handle_leaks && !ompi_win_invalid(win)){
opal_output(0,"WARNING: MPI_Win still allocated in MPI_Finalize\n");
ompi_win_dump (win);
}
ompi_win_free (win);
}
}

OBJ_DESTRUCT(&ompi_mpi_win_null.win);
OBJ_DESTRUCT(&ompi_mpi_windows);
OBJ_RELEASE(ompi_win_accumulate_ops);
Expand Down