int mca_spml_ikrit_del_procs(ompi_proc_t** procs, size_t nprocs) { size_t i, n; int my_rank = oshmem_my_proc_id(); oshmem_shmem_barrier(); if (mca_spml_ikrit.bulk_disconnect) { mxm_ep_powerdown(mca_spml_ikrit.mxm_ep); } while (NULL != opal_list_remove_first(&mca_spml_ikrit.active_peers)) { }; OBJ_DESTRUCT(&mca_spml_ikrit.active_peers); for (n = 0; n < nprocs; n++) { i = (my_rank + n) % nprocs; mxm_ep_disconnect(mca_spml_ikrit.mxm_peers[i].mxm_conn); if (mca_spml_ikrit.hw_rdma_channel) { assert(mca_spml_ikrit.mxm_peers[i].mxm_hw_rdma_conn != mca_spml_ikrit.mxm_peers[i].mxm_conn); mxm_ep_disconnect(mca_spml_ikrit.mxm_peers[i].mxm_hw_rdma_conn); } mxm_peer_destruct(&mca_spml_ikrit.mxm_peers[i]); } free(mca_spml_ikrit.mxm_peers); return OSHMEM_SUCCESS; }
int mca_spml_ikrit_del_procs(oshmem_proc_t** procs, size_t nprocs) { size_t i, n; int my_rank = oshmem_my_proc_id(); oshmem_shmem_barrier(); #if MXM_API >= MXM_VERSION(2,0) if (mca_spml_ikrit.bulk_disconnect) { mxm_ep_powerdown(mca_spml_ikrit.mxm_ep); } #endif while (NULL != opal_list_remove_first(&mca_spml_ikrit.active_peers)) { }; OBJ_DESTRUCT(&mca_spml_ikrit.active_peers); for (n = 0; n < nprocs; n++) { i = (my_rank + n) % nprocs; if (mca_spml_ikrit.mxm_peers[i]->mxm_conn) { mxm_ep_disconnect(mca_spml_ikrit.mxm_peers[i]->mxm_conn); } if (mca_spml_ikrit.hw_rdma_channel && mca_spml_ikrit.mxm_peers[i]->mxm_hw_rdma_conn) { mxm_ep_disconnect(mca_spml_ikrit.mxm_peers[i]->mxm_hw_rdma_conn); } destroy_ptl_idx(i); if (mca_spml_ikrit.mxm_peers[i]) { OBJ_RELEASE(mca_spml_ikrit.mxm_peers[i]); } } if (mca_spml_ikrit.mxm_peers) free(mca_spml_ikrit.mxm_peers); return OSHMEM_SUCCESS; }
int ompi_mtl_mxm_del_procs(struct mca_mtl_base_module_t *mtl, size_t nprocs, struct ompi_proc_t** procs, struct mca_mtl_base_endpoint_t **mtl_peer_data) { size_t i; for (i = 0; i < nprocs; ++i) { mxm_ep_disconnect(mtl_peer_data[i]->mxm_conn); OBJ_RELEASE(mtl_peer_data[i]); } return OMPI_SUCCESS; }
int ompi_mtl_mxm_del_procs(struct mca_mtl_base_module_t *mtl, size_t nprocs, struct ompi_proc_t** procs) { size_t i; for (i = 0; i < nprocs; ++i) { mca_mtl_mxm_endpoint_t *endpoint = (mca_mtl_mxm_endpoint_t*) procs[i]->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_MTL]; mxm_ep_disconnect(endpoint->mxm_conn); OBJ_RELEASE(endpoint); } return OMPI_SUCCESS; }
int mca_pml_yalla_del_procs(struct ompi_proc_t **procs, size_t nprocs) { size_t i; if (ompi_mpi_finalized) { PML_YALLA_VERBOSE(3, "using bulk powerdown"); mxm_ep_powerdown(ompi_pml_yalla.mxm_ep); } for (i = 0; i < nprocs; ++i) { mxm_ep_disconnect(procs[i]->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_PML]); PML_YALLA_VERBOSE(2, "disconnected from rank %d", procs[i]->proc_name.vpid); procs[i]->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_PML] = NULL; } return OMPI_SUCCESS; }
int mca_pml_yalla_del_procs(struct ompi_proc_t **procs, size_t nprocs) { size_t i; if (ompi_mpi_finalized) { PML_YALLA_VERBOSE(3, "using bulk powerdown"); mxm_ep_powerdown(ompi_pml_yalla.mxm_ep); } for (i = 0; i < nprocs; ++i) { mxm_ep_disconnect(procs[i]->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_PML]); PML_YALLA_VERBOSE(2, "disconnected from rank %s", OPAL_NAME_PRINT(procs[i]->super.proc_name)); procs[i]->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_PML] = NULL; } opal_pmix.fence(NULL, 0); return OMPI_SUCCESS; }
int ompi_mtl_mxm_del_procs(struct mca_mtl_base_module_t *mtl, size_t nprocs, struct ompi_proc_t** procs) { size_t i; /* XXX: Directly accessing the obj_reference_count is an abstraction * violation of the object system. We know this needs to be fixed, but * are deferring the fix to a later time as it involves a design issue * in the way we handle endpoints as objects */ for (i = 0; i < nprocs; ++i) { if (((opal_object_t*)procs[i])->obj_reference_count == 1) { mca_mtl_mxm_endpoint_t *endpoint = (mca_mtl_mxm_endpoint_t*) procs[i]->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_MTL]; mxm_ep_disconnect(endpoint->mxm_conn); OBJ_RELEASE(endpoint); } } return OMPI_SUCCESS; }