int MPI_Win_complete_C_Wrapper (MPI_Win win) { int res; TRACE_MPIEVENT(LAST_READ_TIME, MPI_WIN_COMPLETE_EV, EVT_BEGIN, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY); res = PMPI_Win_complete (win); TRACE_MPIEVENT(TIME, MPI_WIN_COMPLETE_EV, EVT_END, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY); updateStats_OTHER(global_mpi_stats); return res; }
int MPI_Win_complete(MPI_Win win) { MTCORE_Win *uh_win; int mpi_errno = MPI_SUCCESS; int start_grp_size = 0; int i; MTCORE_DBG_PRINT_FCNAME(); MTCORE_Fetch_uh_win_from_cache(win, uh_win); if (uh_win == NULL) { /* normal window */ return PMPI_Win_complete(win); } MTCORE_Assert((uh_win->info_args.epoch_type & MTCORE_EPOCH_PSCW)); if (uh_win->start_group == MPI_GROUP_NULL) { /* standard says do nothing for empty group */ MTCORE_DBG_PRINT("Complete empty group\n"); return mpi_errno; } mpi_errno = PMPI_Group_size(uh_win->start_group, &start_grp_size); if (mpi_errno != MPI_SUCCESS) goto fn_fail; MTCORE_Assert(start_grp_size > 0); MTCORE_DBG_PRINT("Complete group 0x%x, size %d\n", uh_win->start_group, start_grp_size); mpi_errno = MTCORE_Complete_flush(start_grp_size, uh_win); if (mpi_errno != MPI_SUCCESS) goto fn_fail; uh_win->is_self_locked = 0; mpi_errno = MTCORE_Send_pscw_complete_msg(start_grp_size, uh_win); if (mpi_errno != MPI_SUCCESS) goto fn_fail; /* Indicate epoch status, later operations should not be redirected to active_win * after the start counter decreases to 0 .*/ uh_win->start_counter--; if (uh_win->start_counter == 0) { uh_win->epoch_stat = MTCORE_WIN_NO_EPOCH; } MTCORE_DBG_PRINT("Complete done\n"); fn_exit: if (uh_win->start_ranks_in_win_group) free(uh_win->start_ranks_in_win_group); uh_win->start_group = MPI_GROUP_NULL; uh_win->start_ranks_in_win_group = NULL; return mpi_errno; fn_fail: goto fn_exit; }
int MPI_Win_complete(MPI_Win win){ return PMPI_Win_complete(win); }