/* * Initialize module on the communicator */ static int mca_coll_fca_module_enable(mca_coll_base_module_t *module, struct ompi_communicator_t *comm) { mca_coll_fca_module_t *fca_module = (mca_coll_fca_module_t*) module; int rc; fca_module->comm = comm; fca_module->rank = ompi_comm_rank(comm); rc = mca_coll_fca_get_fca_lib(comm); if (rc != OMPI_SUCCESS) return rc; rc = __save_coll_handlers(fca_module); if (rc != OMPI_SUCCESS) return rc; rc = __get_local_ranks(fca_module); if (rc != OMPI_SUCCESS) return rc; rc = __create_fca_comm(fca_module); if (rc != OMPI_SUCCESS) return rc; FCA_MODULE_VERBOSE(fca_module, 1, "FCA Module initialized"); return OMPI_SUCCESS; }
/* * Initialize module on the communicator */ static int mca_coll_hcoll_module_enable(mca_coll_base_module_t *module, struct ompi_communicator_t *comm) { mca_coll_hcoll_module_t *hcoll_module = (mca_coll_hcoll_module_t*) module; hcoll_module->comm = comm; if (OMPI_SUCCESS != __save_coll_handlers(hcoll_module)){ HCOL_ERROR("coll_hcol: __save_coll_handlers failed"); return OMPI_ERROR; } hcoll_set_runtime_tag_offset(-100,mca_pml.pml_max_tag); hcoll_module->hcoll_context = hcoll_create_context((rte_grp_handle_t)comm); if (NULL == hcoll_module->hcoll_context){ HCOL_VERBOSE(1,"hcoll_create_context returned NULL"); return OMPI_ERROR; } if (comm != &ompi_mpi_comm_world.comm){ mca_coll_hcoll_module_list_item_wrapper_t *mw = OBJ_NEW(mca_coll_hcoll_module_list_item_wrapper_t); mw->module = hcoll_module; OBJ_RETAIN(hcoll_module->comm); opal_list_append(&mca_coll_hcoll_component.active_modules, (opal_list_item_t*)mw); } return OMPI_SUCCESS; }
/* * Initialize module on the communicator */ static int mca_coll_hcoll_module_enable(mca_coll_base_module_t *module, struct ompi_communicator_t *comm) { mca_coll_hcoll_module_t *hcoll_module = (mca_coll_hcoll_module_t*) module; hcoll_module->comm = comm; if (OMPI_SUCCESS != __save_coll_handlers(hcoll_module)){ HCOL_ERROR("coll_hcol: __save_coll_handlers failed"); return OMPI_ERROR; } hcoll_set_runtime_tag_offset(-100,mca_pml.pml_max_tag); hcoll_set_rte_halt_flag_address(&ompi_mpi_finalized); hcoll_set_rte_halt_flag_size(sizeof(ompi_mpi_finalized)); hcoll_module->hcoll_context = hcoll_create_context((rte_grp_handle_t)comm); if (NULL == hcoll_module->hcoll_context){ HCOL_VERBOSE(1,"hcoll_create_context returned NULL"); return OMPI_ERROR; } #if 0 { printf("\033[33mrank %d: DOING EXTRA TEST\033[0m\n",ompi_comm_rank(comm)); fflush(stdout); sleep(1); rte_ec_handle_t handle; rte_grp_handle_t world_group = hcoll_rte_functions.rte_world_group_fn(); int peer; const int max_count = 10000000; const int step = max_count/100; int buf = 0; int i; rte_request_handle_t req; peer = (ompi_comm_rank(comm)+1)%2; hcoll_rte_functions.get_ec_handles_fn(1,&peer,world_group,&handle); for (i=1; i<max_count+1; i++){ if (0 == ompi_comm_rank(comm)){ if (i/step*step == i){ printf("%d %% done...\n",i/step);fflush(stdout); } buf = 1; hcoll_rte_functions.send_fn(DTE_INT32,1,&buf,handle,world_group,0,&req); } else { hcoll_rte_functions.recv_fn(DTE_INT32,1,&buf,handle,world_group,0,&req); } int completed = 0; hcoll_rte_functions.test_fn(&req,&completed); while(!completed){ hcoll_rte_functions.test_fn(&req,&completed); /*hcoll_rte_functions.rte_progress_fn();*/ opal_progress(); } } printf("\033[32mrank %d: EXTRA TEST PASS\033[0m\n",ompi_comm_rank(comm)); fflush(stdout); sleep(1); } #endif return OMPI_SUCCESS; }