From 8b93cb7661f626bc3584e87866f3ed35ab08c5bf Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Fri, 5 Aug 2005 18:03:30 +0000 Subject: [PATCH] Rename all the functions starting with mca_base_modex to mca_pml_base_modex. Change all the places where they are used to fit the new name. Remove the code to check the remote arch from the PML. We will have a GPR mechanism in ompi_mpi_initialize to do that. This commit was SVN r6750. --- ompi/mca/btl/btl.h | 10 +- ompi/mca/btl/gm/btl_gm_component.c | 2 +- ompi/mca/btl/gm/btl_gm_proc.c | 12 +- .../btl/portals/src/btl_portals_compat_utcp.c | 14 +- ompi/mca/btl/tcp/btl_tcp_component.c | 2 +- ompi/mca/btl/tcp/btl_tcp_proc.c | 8 +- ompi/mca/pml/base/pml_base_module_exchange.c | 152 +++++++++--------- ompi/mca/pml/base/pml_base_module_exchange.h | 22 +-- ompi/mca/pml/ob1/pml_ob1.c | 28 ---- ompi/mca/pml/teg/pml_teg.c | 24 +-- ompi/mca/pml/uniq/pml_uniq.c | 25 +-- ompi/mca/ptl/gm/ptl_gm_component.c | 3 +- ompi/mca/ptl/gm/ptl_gm_proc.c | 8 +- ompi/mca/ptl/mx/ptl_mx.h | 6 +- ompi/mca/ptl/mx/ptl_mx_module.c | 4 +- ompi/mca/ptl/mx/ptl_mx_proc.c | 14 +- .../ptl/portals/src/ptl_portals_compat_utcp.c | 14 +- ompi/mca/ptl/ptl.h | 10 +- ompi/mca/ptl/tcp/ptl_tcp_component.c | 2 +- ompi/mca/ptl/tcp/ptl_tcp_proc.c | 12 +- ompi/proc/proc.c | 31 +++- ompi/runtime/ompi_mpi_finalize.c | 2 +- ompi/runtime/ompi_mpi_init.c | 8 +- 23 files changed, 181 insertions(+), 232 deletions(-) diff --git a/ompi/mca/btl/btl.h b/ompi/mca/btl/btl.h index 7af856b264..b6a1d1d066 100644 --- a/ompi/mca/btl/btl.h +++ b/ompi/mca/btl/btl.h @@ -43,8 +43,8 @@ * information required by its peers. An example would be the TCP * listen port opened by the TCP module for incoming connection * requests. This information is published to peers via the - * mca_base_modex_send() interface. Note that peer information is not - * guaranteed to be available via mca_base_modex_recv() during the + * mca_pml_base_modex_send() interface. Note that peer information is not + * guaranteed to be available via mca_pml_base_modex_recv() during the * module's init function. However, it will be available during * BTL selection (mca_btl_base_add_proc_fn_t()). * @@ -227,7 +227,7 @@ typedef struct mca_btl_base_header_t mca_btl_base_header_t; * the physical devices that are available for the given transport, * and create a BTL module to represent each device. Any addressing * information required by peers to reach the device should be published - * during this function via the mca_base_modex_send() interface. + * during this function via the mca_pml_base_modex_send() interface. * */ @@ -295,9 +295,9 @@ typedef int (*mca_btl_base_module_finalize_fn_t)( * * The mca_btl_base_module_add_procs_fn_t() is called by the PML to * determine the set of BTLs that should be used to reach each process. - * Any addressing information exported by the peer via the mca_base_modex_send() + * Any addressing information exported by the peer via the mca_pml_base_modex_send() * function should be available during this call via the corresponding - * mca_base_modex_recv() function. The BTL may utilize this information to + * mca_pml_base_modex_recv() function. The BTL may utilize this information to * determine reachability of each peer process. * * For each process that is reachable by the BTL, the bit corresponding to the index diff --git a/ompi/mca/btl/gm/btl_gm_component.c b/ompi/mca/btl/gm/btl_gm_component.c index 974f8dde97..68a03238f9 100644 --- a/ompi/mca/btl/gm/btl_gm_component.c +++ b/ompi/mca/btl/gm/btl_gm_component.c @@ -416,7 +416,7 @@ mca_btl_gm_modex_send(void) mca_btl_gm_module_t *btl = mca_btl_gm_component.gm_btls[i]; addrs[i] = btl->gm_addr; } - rc = mca_base_modex_send (&mca_btl_gm_component.super.btl_version, addrs, size); + rc = mca_pml_base_modex_send (&mca_btl_gm_component.super.btl_version, addrs, size); free (addrs); return rc; } diff --git a/ompi/mca/btl/gm/btl_gm_proc.c b/ompi/mca/btl/gm/btl_gm_proc.c index 52fddde877..7103c16cad 100644 --- a/ompi/mca/btl/gm/btl_gm_proc.c +++ b/ompi/mca/btl/gm/btl_gm_proc.c @@ -116,13 +116,13 @@ mca_btl_gm_proc_t* mca_btl_gm_proc_create(ompi_proc_t* ompi_proc) gm_proc->proc_guid = ompi_proc->proc_name; /* query for the peer address info */ - rc = mca_base_modex_recv( - &mca_btl_gm_component.super.btl_version, - ompi_proc, - (void*)&gm_proc->proc_addrs, - &size); + rc = mca_pml_base_modex_recv( + &mca_btl_gm_component.super.btl_version, + ompi_proc, + (void*)&gm_proc->proc_addrs, + &size); if(OMPI_SUCCESS != rc) { - opal_output(0, "[%s:%d] mca_base_modex_recv failed for peer [%d,%d,%d]", + opal_output(0, "[%s:%d] mca_pml_base_modex_recv failed for peer [%d,%d,%d]", __FILE__,__LINE__,ORTE_NAME_ARGS(&ompi_proc->proc_name)); OBJ_RELEASE(gm_proc); return NULL; diff --git a/ompi/mca/btl/portals/src/btl_portals_compat_utcp.c b/ompi/mca/btl/portals/src/btl_portals_compat_utcp.c index b4c1b8a5f7..35754c63be 100644 --- a/ompi/mca/btl/portals/src/btl_portals_compat_utcp.c +++ b/ompi/mca/btl/portals/src/btl_portals_compat_utcp.c @@ -104,11 +104,11 @@ mca_btl_portals_init_compat(mca_btl_portals_component_t *comp) "contact info: %u, %u", ntohl(info.nid), ntohl(info.pid)); - ret = mca_base_modex_send(&mca_btl_portals_component.super.btl_version, - &info, sizeof(ptl_process_id_t)); + ret = mca_pml_base_modex_send(&mca_btl_portals_component.super.btl_version, + &info, sizeof(ptl_process_id_t)); if (OMPI_SUCCESS != ret) { opal_output_verbose(10, mca_btl_portals_component.portals_output, - "mca_base_modex_send failed: %d", ret); + "mca_pml_base_modex_send failed: %d", ret); return ret; } } else { @@ -185,15 +185,15 @@ mca_btl_portals_add_procs_compat(struct mca_btl_portals_module_t* btl, for (i = 0 ; i < nprocs ; ++i) { if (proc_self == procs[i]) my_rid = i; - ret = mca_base_modex_recv(&mca_btl_portals_component.super.btl_version, - procs[i], (void**) &info, &size); + ret = mca_pml_base_modex_recv(&mca_btl_portals_component.super.btl_version, + procs[i], (void**) &info, &size); if (OMPI_SUCCESS != ret) { opal_output_verbose(10, mca_btl_portals_component.portals_output, - "mca_base_modex_recv failed: %d", ret); + "mca_pml_base_modex_recv failed: %d", ret); return ret; } else if (sizeof(ptl_process_id_t) != size) { opal_output_verbose(10, mca_btl_portals_component.portals_output, - "mca_base_modex_recv returned size %d, expected %d", + "mca_pml_base_modex_recv returned size %d, expected %d", size, sizeof(ptl_process_id_t)); return OMPI_ERROR; } diff --git a/ompi/mca/btl/tcp/btl_tcp_component.c b/ompi/mca/btl/tcp/btl_tcp_component.c index f6cb19f22d..ff626b6034 100644 --- a/ompi/mca/btl/tcp/btl_tcp_component.c +++ b/ompi/mca/btl/tcp/btl_tcp_component.c @@ -459,7 +459,7 @@ static int mca_btl_tcp_component_exchange(void) addrs[i].addr_port = mca_btl_tcp_component.tcp_listen_port; addrs[i].addr_inuse = 0; } - rc = mca_base_modex_send(&mca_btl_tcp_component.super.btl_version, addrs, size); + rc = mca_pml_base_modex_send(&mca_btl_tcp_component.super.btl_version, addrs, size); free(addrs); } return rc; diff --git a/ompi/mca/btl/tcp/btl_tcp_proc.c b/ompi/mca/btl/tcp/btl_tcp_proc.c index 723f56668a..624a737a86 100644 --- a/ompi/mca/btl/tcp/btl_tcp_proc.c +++ b/ompi/mca/btl/tcp/btl_tcp_proc.c @@ -99,10 +99,10 @@ mca_btl_tcp_proc_t* mca_btl_tcp_proc_create(ompi_proc_t* ompi_proc) OPAL_THREAD_UNLOCK(&mca_btl_tcp_component.tcp_lock); /* lookup tcp parameters exported by this proc */ - rc = mca_base_modex_recv( &mca_btl_tcp_component.super.btl_version, - ompi_proc, - (void**)&btl_proc->proc_addrs, - &size); + rc = mca_pml_base_modex_recv( &mca_btl_tcp_component.super.btl_version, + ompi_proc, + (void**)&btl_proc->proc_addrs, + &size ); if(rc != OMPI_SUCCESS) { BTL_ERROR(("mca_base_modex_recv: failed with return value=%d", rc)); OBJ_RELEASE(btl_proc); diff --git a/ompi/mca/pml/base/pml_base_module_exchange.c b/ompi/mca/pml/base/pml_base_module_exchange.c index 6c9262113c..09de56bccb 100644 --- a/ompi/mca/pml/base/pml_base_module_exchange.c +++ b/ompi/mca/pml/base/pml_base_module_exchange.c @@ -39,12 +39,12 @@ */ /** - * mca_base_modex_module_t + * mca_pml_base_modex_module_t * * Data for a specic proc and module. */ -struct mca_base_modex_module_t { +struct mca_pml_base_modex_module_t { opal_list_item_t super; mca_base_component_t component; void *module_data; @@ -52,9 +52,9 @@ struct mca_base_modex_module_t { bool module_data_avail; opal_condition_t module_data_cond; }; -typedef struct mca_base_modex_module_t mca_base_modex_module_t; +typedef struct mca_pml_base_modex_module_t mca_pml_base_modex_module_t; -static void mca_base_modex_module_construct(mca_base_modex_module_t *module) +static void mca_pml_base_modex_module_construct(mca_pml_base_modex_module_t *module) { OBJ_CONSTRUCT(&module->module_data_cond, opal_condition_t); memset(&module->component, 0, sizeof(module->component)); @@ -63,61 +63,61 @@ static void mca_base_modex_module_construct(mca_base_modex_module_t *module) module->module_data_avail = false; } -static void mca_base_modex_module_destruct(mca_base_modex_module_t *module) +static void mca_pml_base_modex_module_destruct(mca_pml_base_modex_module_t *module) { OBJ_DESTRUCT(&module->module_data_cond); } OBJ_CLASS_INSTANCE( - mca_base_modex_module_t, + mca_pml_base_modex_module_t, opal_list_item_t, - mca_base_modex_module_construct, - mca_base_modex_module_destruct + mca_pml_base_modex_module_construct, + mca_pml_base_modex_module_destruct ); /** - * mca_base_modex_t + * mca_pml_base_modex_t * - * List of modules (mca_base_modex_module_t) for which data has been + * List of modules (mca_pml_base_modex_module_t) for which data has been * received from peers. */ -struct mca_base_modex_t { +struct mca_pml_base_modex_t { opal_object_t super; opal_list_t modex_modules; }; -typedef struct mca_base_modex_t mca_base_modex_t; +typedef struct mca_pml_base_modex_t mca_pml_base_modex_t; -static void mca_base_modex_construct(mca_base_modex_t* modex) +static void mca_pml_base_modex_construct(mca_pml_base_modex_t* modex) { OBJ_CONSTRUCT(&modex->modex_modules, opal_list_t); } -static void mca_base_modex_destruct(mca_base_modex_t* modex) +static void mca_pml_base_modex_destruct(mca_pml_base_modex_t* modex) { OBJ_DESTRUCT(&modex->modex_modules); } OBJ_CLASS_INSTANCE( - mca_base_modex_t, + mca_pml_base_modex_t, opal_object_t, - mca_base_modex_construct, - mca_base_modex_destruct + mca_pml_base_modex_construct, + mca_pml_base_modex_destruct ); /** - * mca_base_modex_subscription_t + * mca_pml_base_modex_subscription_t * * Track segments we have subscribed to. */ -struct mca_base_modex_subscription_t { +struct mca_pml_base_modex_subscription_t { opal_list_item_t item; orte_jobid_t jobid; }; -typedef struct mca_base_modex_subscription_t mca_base_modex_subscription_t; +typedef struct mca_pml_base_modex_subscription_t mca_pml_base_modex_subscription_t; OBJ_CLASS_INSTANCE( - mca_base_modex_subscription_t, + mca_pml_base_modex_subscription_t, opal_list_item_t, NULL, NULL); @@ -126,29 +126,29 @@ OBJ_CLASS_INSTANCE( * Globals to track the list of subscriptions. */ -static opal_list_t mca_base_modex_subscriptions; -static opal_mutex_t mca_base_modex_lock; +static opal_list_t mca_pml_base_modex_subscriptions; +static opal_mutex_t mca_pml_base_modex_lock; /** * Initialize global state. */ -int mca_base_modex_init(void) +int mca_pml_base_modex_init(void) { - OBJ_CONSTRUCT(&mca_base_modex_subscriptions, opal_list_t); - OBJ_CONSTRUCT(&mca_base_modex_lock, opal_mutex_t); + OBJ_CONSTRUCT(&mca_pml_base_modex_subscriptions, opal_list_t); + OBJ_CONSTRUCT(&mca_pml_base_modex_lock, opal_mutex_t); return OMPI_SUCCESS; } /** * Cleanup global state. */ -int mca_base_modex_finalize(void) +int mca_pml_base_modex_finalize(void) { opal_list_item_t *item; - while(NULL != (item = opal_list_remove_first(&mca_base_modex_subscriptions))) + while(NULL != (item = opal_list_remove_first(&mca_pml_base_modex_subscriptions))) OBJ_RELEASE(item); - OBJ_DESTRUCT(&mca_base_modex_subscriptions); + OBJ_DESTRUCT(&mca_pml_base_modex_subscriptions); return OMPI_SUCCESS; } @@ -157,14 +157,14 @@ int mca_base_modex_finalize(void) * Look to see if there is any data associated with a specified module. */ -static mca_base_modex_module_t* mca_base_modex_lookup_module( - mca_base_modex_t* modex, +static mca_pml_base_modex_module_t* mca_pml_base_modex_lookup_module( + mca_pml_base_modex_t* modex, mca_base_component_t* component) { - mca_base_modex_module_t* modex_module; - for(modex_module = (mca_base_modex_module_t*)opal_list_get_first(&modex->modex_modules); - modex_module != (mca_base_modex_module_t*)opal_list_get_end(&modex->modex_modules); - modex_module = (mca_base_modex_module_t*)opal_list_get_next(modex_module)) { + mca_pml_base_modex_module_t* modex_module; + for(modex_module = (mca_pml_base_modex_module_t*)opal_list_get_first(&modex->modex_modules); + modex_module != (mca_pml_base_modex_module_t*)opal_list_get_end(&modex->modex_modules); + modex_module = (mca_pml_base_modex_module_t*)opal_list_get_next(modex_module)) { if(mca_base_component_compatible(&modex_module->component, component) == 0) { return modex_module; } @@ -177,13 +177,13 @@ static mca_base_modex_module_t* mca_base_modex_lookup_module( * Create a placeholder for data associated with the specified module. */ -static mca_base_modex_module_t* mca_base_modex_create_module( - mca_base_modex_t* modex, +static mca_pml_base_modex_module_t* mca_pml_base_modex_create_module( + mca_pml_base_modex_t* modex, mca_base_component_t* component) { - mca_base_modex_module_t* modex_module; - if(NULL == (modex_module = mca_base_modex_lookup_module(modex, component))) { - modex_module = OBJ_NEW(mca_base_modex_module_t); + mca_pml_base_modex_module_t* modex_module; + if(NULL == (modex_module = mca_pml_base_modex_lookup_module(modex, component))) { + modex_module = OBJ_NEW(mca_pml_base_modex_module_t); if(NULL != modex_module) { modex_module->component = *component; opal_list_append(&modex->modex_modules, (opal_list_item_t*)modex_module); @@ -197,7 +197,7 @@ static mca_base_modex_module_t* mca_base_modex_create_module( * Callback for registry notifications. */ -static void mca_base_modex_registry_callback( +static void mca_pml_base_modex_registry_callback( orte_gpr_notify_data_t* data, void* cbdata) { @@ -209,14 +209,14 @@ static void mca_base_modex_registry_callback( size_t new_proc_count = 0; char **token; orte_process_name_t *proc_name; - mca_base_modex_t *modex; - mca_base_modex_module_t *modex_module; + mca_pml_base_modex_t *modex; + mca_pml_base_modex_module_t *modex_module; mca_base_component_t component; bool isnew = false; int rc; #if 0 -opal_output(0, "[%lu,%lu,%lu] mca_base_modex_registry_callback\n", +opal_output(0, "[%lu,%lu,%lu] mca_pml_base_modex_registry_callback\n", ORTE_NAME_ARGS(orte_process_info.my_name)); orte_gpr_base_dump_notify_data(data,0); #endif @@ -256,10 +256,10 @@ orte_gpr_base_dump_notify_data(data,0); */ OPAL_THREAD_LOCK(&proc->proc_lock); - if(NULL == (modex = (mca_base_modex_t*)proc->proc_modex)) { - modex = OBJ_NEW(mca_base_modex_t); + if(NULL == (modex = (mca_pml_base_modex_t*)proc->proc_modex)) { + modex = OBJ_NEW(mca_pml_base_modex_t); if(NULL == modex) { - opal_output(0, "mca_base_modex_registry_callback: unable to allocate mca_base_modex_t\n"); + opal_output(0, "mca_pml_base_modex_registry_callback: unable to allocate mca_pml_base_modex_t\n"); OPAL_THREAD_UNLOCK(&proc->proc_lock); return; } @@ -337,8 +337,8 @@ orte_gpr_base_dump_notify_data(data,0); /* * Lookup the corresponding modex structure */ - if(NULL == (modex_module = mca_base_modex_create_module(modex, &component))) { - opal_output(0, "mca_base_modex_registry_callback: mca_base_modex_create_module failed\n"); + if(NULL == (modex_module = mca_pml_base_modex_create_module(modex, &component))) { + opal_output(0, "mca_pml_base_modex_registry_callback: mca_pml_base_modex_create_module failed\n"); OBJ_RELEASE(data); OPAL_THREAD_UNLOCK(&proc->proc_lock); return; @@ -348,7 +348,7 @@ orte_gpr_base_dump_notify_data(data,0); modex_module->module_data_size = num_bytes; modex_module->module_data_avail = true; #if 0 -opal_output(0, "[%lu,%lu,%lu] mca_base_modex_registry_callback: %s-%s-%d-%d received %d bytes\n", +opal_output(0, "[%lu,%lu,%lu] mca_pml_base_modex_registry_callback: %s-%s-%d-%d received %d bytes\n", ORTE_NAME_ARGS(orte_process_info.my_name), component.mca_type_name, component.mca_component_name, @@ -378,29 +378,29 @@ opal_output(0, "[%lu,%lu,%lu] mca_base_modex_registry_callback: %s-%s-%d-%d rece * Make sure we have subscribed to this segment. */ -static int mca_base_modex_subscribe(orte_process_name_t* name) +static int mca_pml_base_modex_subscribe(orte_process_name_t* name) { orte_gpr_trigger_t trig, *trigs; orte_gpr_subscription_t sub, *subs; orte_jobid_t jobid; opal_list_item_t* item; - mca_base_modex_subscription_t* subscription; + mca_pml_base_modex_subscription_t* subscription; int rc; /* check for an existing subscription */ - OPAL_LOCK(&mca_base_modex_lock); - if (!opal_list_is_empty(&mca_base_modex_subscriptions)) { - for(item = opal_list_get_first(&mca_base_modex_subscriptions); - item != opal_list_get_end(&mca_base_modex_subscriptions); + OPAL_LOCK(&mca_pml_base_modex_lock); + if (!opal_list_is_empty(&mca_pml_base_modex_subscriptions)) { + for(item = opal_list_get_first(&mca_pml_base_modex_subscriptions); + item != opal_list_get_end(&mca_pml_base_modex_subscriptions); item = opal_list_get_next(item)) { - subscription = (mca_base_modex_subscription_t*)item; + subscription = (mca_pml_base_modex_subscription_t*)item; if(subscription->jobid == name->jobid) { - OPAL_UNLOCK(&mca_base_modex_lock); + OPAL_UNLOCK(&mca_pml_base_modex_lock); return OMPI_SUCCESS; } } } - OPAL_UNLOCK(&mca_base_modex_lock); + OPAL_UNLOCK(&mca_pml_base_modex_lock); /* otherwise - subscribe to get this jobid's ptl contact info */ if (ORTE_SUCCESS != (rc = orte_ns.get_jobid(&jobid, name))) { @@ -477,7 +477,7 @@ static int mca_base_modex_subscribe(orte_process_name_t* name) return ORTE_ERR_OUT_OF_RESOURCE; } /* define the callback function */ - sub.cbfunc = mca_base_modex_registry_callback; + sub.cbfunc = mca_pml_base_modex_registry_callback; sub.user_tag = NULL; /* setup the trigger definition */ @@ -498,7 +498,7 @@ static int mca_base_modex_subscribe(orte_process_name_t* name) trigs = &trig; rc = orte_gpr.subscribe(1, &subs, 1, &trigs); if(ORTE_SUCCESS != rc) { - opal_output(0, "mca_base_modex_exchange: " + opal_output(0, "mca_pml_base_modex_exchange: " "orte_gpr.subscribe failed with return code %d\n", rc); OBJ_DESTRUCT(&sub); OBJ_DESTRUCT(&trig); @@ -506,11 +506,11 @@ static int mca_base_modex_subscribe(orte_process_name_t* name) } /* add this jobid to our list of subscriptions */ - OPAL_LOCK(&mca_base_modex_lock); - subscription = OBJ_NEW(mca_base_modex_subscription_t); + OPAL_LOCK(&mca_pml_base_modex_lock); + subscription = OBJ_NEW(mca_pml_base_modex_subscription_t); subscription->jobid = name->jobid; - opal_list_append(&mca_base_modex_subscriptions, &subscription->item); - OPAL_UNLOCK(&mca_base_modex_lock); + opal_list_append(&mca_pml_base_modex_subscriptions, &subscription->item); + OPAL_UNLOCK(&mca_pml_base_modex_lock); OBJ_DESTRUCT(&sub); OBJ_DESTRUCT(&trig); return OMPI_SUCCESS; @@ -524,7 +524,7 @@ static int mca_base_modex_subscribe(orte_process_name_t* name) * command. */ -int mca_base_modex_send( +int mca_pml_base_modex_send( mca_base_component_t *source_component, const void *data, size_t size) @@ -623,19 +623,19 @@ cleanup: * Retreive the data for the specified module from the source process. */ -int mca_base_modex_recv( +int mca_pml_base_modex_recv( mca_base_component_t *component, ompi_proc_t *proc, void **buffer, size_t *size) { - mca_base_modex_t* modex; - mca_base_modex_module_t* modex_module; + mca_pml_base_modex_t* modex; + mca_pml_base_modex_module_t* modex_module; /* check the proc for cached data */ OPAL_THREAD_LOCK(&proc->proc_lock); - if(NULL == (modex = (mca_base_modex_t*)proc->proc_modex)) { - modex = OBJ_NEW(mca_base_modex_t); + if(NULL == (modex = (mca_pml_base_modex_t*)proc->proc_modex)) { + modex = OBJ_NEW(mca_pml_base_modex_t); if(modex == NULL) { OPAL_THREAD_UNLOCK(&proc->proc_lock); return OMPI_ERR_OUT_OF_RESOURCE; @@ -644,12 +644,12 @@ int mca_base_modex_recv( /* verify that we have subscribed to this segment */ OPAL_THREAD_UNLOCK(&proc->proc_lock); - mca_base_modex_subscribe(&proc->proc_name); + mca_pml_base_modex_subscribe(&proc->proc_name); OPAL_THREAD_LOCK(&proc->proc_lock); } /* lookup/create the module */ - if(NULL == (modex_module = mca_base_modex_create_module(modex, component))) { + if(NULL == (modex_module = mca_pml_base_modex_create_module(modex, component))) { OPAL_THREAD_UNLOCK(&proc->proc_lock); return OMPI_ERR_OUT_OF_RESOURCE; } @@ -657,7 +657,7 @@ int mca_base_modex_recv( /* wait until data is available */ while(modex_module->module_data_avail == false) { #if 0 -opal_output(0, "[%lu,%lu,%lu] mca_base_modex_registry_callback: waiting for %s-%s-%d-%d\n", +opal_output(0, "[%lu,%lu,%lu] mca_pml_base_modex_registry_callback: waiting for %s-%s-%d-%d\n", ORTE_NAME_ARGS(orte_process_info.my_name), component->mca_type_name, component->mca_component_name, @@ -690,7 +690,7 @@ opal_output(0, "[%lu,%lu,%lu] mca_base_modex_registry_callback: waiting for %s-% * to this job. */ -int mca_base_modex_exchange(void) +int mca_pml_base_modex_exchange(void) { - return mca_base_modex_subscribe(orte_process_info.my_name); + return mca_pml_base_modex_subscribe(orte_process_info.my_name); } diff --git a/ompi/mca/pml/base/pml_base_module_exchange.h b/ompi/mca/pml/base/pml_base_module_exchange.h index 9acbd68d10..c6bbb8a368 100644 --- a/ompi/mca/pml/base/pml_base_module_exchange.h +++ b/ompi/mca/pml/base/pml_base_module_exchange.h @@ -75,7 +75,7 @@ extern "C" { * During the selection process, the MCA framework will effectively * perform an "allgather" operation of all modex buffers; every * buffer will be available to every peer process (see - * mca_base_modex_recv()). + * mca_pml_base_modex_recv()). * * Note that the buffer should not be modified after invoking this * fuction; the MCA framework may asynchronously send it to a @@ -86,8 +86,8 @@ extern "C" { * in some format that peer processes will be able to read it, * regardless of pointer sizes or endian bias. */ -OMPI_DECLSPEC int mca_base_modex_send(mca_base_component_t *source_component, - const void *buffer, size_t size); +OMPI_DECLSPEC int mca_pml_base_modex_send(mca_base_component_t *source_component, + const void *buffer, size_t size); /** * Receive a module-specific buffer from a corresponding MCA module @@ -108,7 +108,7 @@ OMPI_DECLSPEC int mca_base_modex_send(mca_base_component_t *source_component, * @retval OMPI_ERR_OUT_OF_RESOURCE If no corresponding module buffer is found, * or if an error occurs wil returning the buffer to the caller. * - * This is the corresponding "get" call to mca_base_modex_send(). + * This is the corresponding "get" call to mca_pml_base_modex_send(). * After selection, modules can call this function to receive the * buffer sent by their corresponding module on the process * source_proc. @@ -119,27 +119,27 @@ OMPI_DECLSPEC int mca_base_modex_send(mca_base_component_t *source_component, * buffer. size will be filled in with the number of instances in * the buffer, and count will be filled in with the number of * instances. The total number of bytes in the buffer is (size * - * count). See the explanation in mca_base_modex_send() for why the + * count). See the explanation in mca_pml_base_modex_send() for why the * number of bytes is split into two parts. */ -OMPI_DECLSPEC int mca_base_modex_recv(mca_base_component_t *dest_component, - ompi_proc_t *source_proc, - void **buffer, size_t *size); +OMPI_DECLSPEC int mca_pml_base_modex_recv(mca_base_component_t *dest_component, + ompi_proc_t *source_proc, + void **buffer, size_t *size); /* * Called to subscribe to registry. */ -OMPI_DECLSPEC int mca_base_modex_exchange(void); +OMPI_DECLSPEC int mca_pml_base_modex_exchange(void); /** * */ -OMPI_DECLSPEC int mca_base_modex_init(void); +OMPI_DECLSPEC int mca_pml_base_modex_init(void); /** * */ -OMPI_DECLSPEC int mca_base_modex_finalize(void); +OMPI_DECLSPEC int mca_pml_base_modex_finalize(void); #if defined(c_plusplus) || defined(__cplusplus) } diff --git a/ompi/mca/pml/ob1/pml_ob1.c b/ompi/mca/pml/ob1/pml_ob1.c index 8bd8e5cef4..fb3c936d71 100644 --- a/ompi/mca/pml/ob1/pml_ob1.c +++ b/ompi/mca/pml/ob1/pml_ob1.c @@ -58,19 +58,9 @@ static int mca_pml_ob1_add_btls( void ); int mca_pml_ob1_enable(bool enable) { int rc; -#if OMPI_ENABLE_HETEROGENEOUS_SUPPORT - uint32_t proc_arch; -#endif if( false == enable ) return OMPI_SUCCESS; -#if OMPI_ENABLE_HETEROGENEOUS_SUPPORT - /* post this processes datatype */ - proc_arch = ompi_proc_local()->proc_arch; - proc_arch = htonl(proc_arch); - rc = mca_base_modex_send(&mca_pml_ob1_component.pmlm_version, &proc_arch, sizeof(proc_arch)); - if (OMPI_SUCCESS != rc) return rc; -#endif OBJ_CONSTRUCT(&mca_pml_ob1.lock, opal_mutex_t); /* requests */ @@ -263,24 +253,6 @@ int mca_pml_ob1_add_procs(ompi_proc_t** procs, size_t nprocs) if(OMPI_SUCCESS != rc) return rc; - /* iterate through each of the procs and set the peers architecture */ - for(p=0; pproc_arch = ntohl(*proc_arch); - free(proc_arch); -#else - procs[p]->proc_arch = ompi_proc_local()->proc_arch; -#endif - } - /* attempt to add all procs to each ob1 */ btl_endpoints = (struct mca_btl_base_endpoint_t **)malloc(nprocs * sizeof(struct mca_btl_base_endpoint_t*)); for(p_index = 0; p_index < mca_pml_ob1.num_btl_modules; p_index++) { diff --git a/ompi/mca/pml/teg/pml_teg.c b/ompi/mca/pml/teg/pml_teg.c index 655452fbd9..81ba10867f 100644 --- a/ompi/mca/pml/teg/pml_teg.c +++ b/ompi/mca/pml/teg/pml_teg.c @@ -170,8 +170,7 @@ static int mca_pml_teg_add_ptls(void) int mca_pml_teg_enable(bool enable) { size_t i=0; - int value = enable, rc; - uint32_t proc_arch; + int value = enable; /* If I'm not selected then prepare for close */ if( false == enable ) return OMPI_SUCCESS; @@ -185,13 +184,6 @@ int mca_pml_teg_enable(bool enable) mca_pml_teg.teg_free_list_inc, NULL ); - /* I get selected. Publish my information */ - proc_arch = ompi_proc_local()->proc_arch; - proc_arch = htonl(proc_arch); - rc = mca_base_modex_send(&mca_pml_teg_component.pmlm_version, &proc_arch, sizeof(proc_arch)); - if(rc != OMPI_SUCCESS) - return rc; - /* Grab all the PTLs and prepare them */ mca_pml_teg_add_ptls(); @@ -228,20 +220,6 @@ int mca_pml_teg_add_procs(ompi_proc_t** procs, size_t nprocs) if(OMPI_SUCCESS != rc) return rc; - /* iterate through each of the procs and set the peers architecture */ - for(p=0; pproc_arch = ntohl(*proc_arch); - free(proc_arch); - } - /* attempt to add all procs to each ptl */ ptl_peers = (struct mca_ptl_base_peer_t **)malloc(nprocs * sizeof(struct mca_ptl_base_peer_t*)); for(p_index = 0; p_index < mca_pml_teg.teg_num_ptl_modules; p_index++) { diff --git a/ompi/mca/pml/uniq/pml_uniq.c b/ompi/mca/pml/uniq/pml_uniq.c index 298701879f..84abdc443b 100644 --- a/ompi/mca/pml/uniq/pml_uniq.c +++ b/ompi/mca/pml/uniq/pml_uniq.c @@ -170,8 +170,7 @@ static int mca_pml_uniq_add_ptls( void ) int mca_pml_uniq_enable( bool enable ) { size_t i; - int value = enable, rc; - uint32_t proc_arch; + int value = enable; /* If I'm not selected then prepare for close */ if( false == enable ) return OMPI_SUCCESS; @@ -185,14 +184,6 @@ int mca_pml_uniq_enable( bool enable ) mca_pml_uniq.uniq_free_list_inc, NULL ); - /* I get selected. Publish my informations */ - proc_arch = ompi_proc_local()->proc_arch; - proc_arch = htonl(proc_arch); - rc = mca_base_modex_send(&mca_pml_uniq_component.pmlm_version, &proc_arch, sizeof(proc_arch)); - if( rc != OMPI_SUCCESS ) - return rc; - - /* Grab all the PTLs and prepare them */ mca_pml_uniq_add_ptls(); @@ -228,20 +219,6 @@ int mca_pml_uniq_add_procs(ompi_proc_t** procs, size_t nprocs) if( OMPI_SUCCESS != rc ) return rc; - /* iterate through each of the procs and set the peers architecture */ - for( p = 0; p < nprocs; p++ ) { - uint32_t* proc_arch; - size_t size = sizeof(uint32_t); - rc = mca_base_modex_recv(&mca_pml_uniq_component.pmlm_version, procs[p], - (void**)&proc_arch, &size); - if(rc != OMPI_SUCCESS) - return rc; - if(size != sizeof(uint32_t)) - return OMPI_ERROR; - procs[p]->proc_arch = ntohl(*proc_arch); - free(proc_arch); - } - /* attempt to add all procs to each ptl */ ptl_peers = (struct mca_ptl_base_peer_t **)malloc(nprocs * sizeof(struct mca_ptl_base_peer_t*)); for( p_index = 0; p_index < mca_pml_uniq.uniq_num_ptl_modules; p_index++ ) { diff --git a/ompi/mca/ptl/gm/ptl_gm_component.c b/ompi/mca/ptl/gm/ptl_gm_component.c index 3e1e70b92e..f804de7e76 100644 --- a/ompi/mca/ptl/gm/ptl_gm_component.c +++ b/ompi/mca/ptl/gm/ptl_gm_component.c @@ -223,8 +223,7 @@ mca_ptl_gm_module_store_data_toexchange (void) #endif /* GM_API_VERSION > 0x200 */ addrs[i].port_id = ptl->local_addr.port_id; } - rc = mca_base_modex_send (&mca_ptl_gm_component.super.ptlm_version, addrs, - size); + rc = mca_pml_base_modex_send (&mca_ptl_gm_component.super.ptlm_version, addrs, size); free (addrs); return rc; } diff --git a/ompi/mca/ptl/gm/ptl_gm_proc.c b/ompi/mca/ptl/gm/ptl_gm_proc.c index 1419730ae6..1ebfc332b2 100644 --- a/ompi/mca/ptl/gm/ptl_gm_proc.c +++ b/ompi/mca/ptl/gm/ptl_gm_proc.c @@ -114,13 +114,13 @@ mca_ptl_gm_proc_create (mca_ptl_gm_module_t * ptl, ompi_proc_t * ompi_proc) /* Extract exposed addresses from remote proc */ - rc = mca_base_modex_recv (&mca_ptl_gm_component.super.ptlm_version, - ompi_proc, (void **) &ptl_proc->proc_addrs, - &size); + rc = mca_pml_base_modex_recv (&mca_ptl_gm_component.super.ptlm_version, + ompi_proc, (void **) &ptl_proc->proc_addrs, + &size); if (rc != OMPI_SUCCESS) { opal_output (0, - "[%s:%d] mca_base_modex_recv failed to recv data \n", + "[%s:%d] mca_pml_base_modex_recv failed to recv data \n", __FILE__, __LINE__); OBJ_RELEASE (ptl_proc); return NULL; diff --git a/ompi/mca/ptl/mx/ptl_mx.h b/ompi/mca/ptl/mx/ptl_mx.h index 953d78b717..8764d9bc62 100644 --- a/ompi/mca/ptl/mx/ptl_mx.h +++ b/ompi/mca/ptl/mx/ptl_mx.h @@ -86,7 +86,7 @@ extern int mca_ptl_mx_component_close(void); * the physical devices that are available for the given transport, * and create a PTL instance to represent each device. Any addressing * information required by peers to reach the device should be published - * during this function via the mca_base_modex_send() interface. + * during this function via the mca_pml_base_modex_send() interface. * */ @@ -177,9 +177,9 @@ extern int mca_ptl_mx_finalize( * * The mca_ptl_base_module_add_procs_fn_t() is called by the PML to * determine the set of PTLs that should be used to reach each process. - * Any addressing information exported by the peer via the mca_base_modex_send() + * Any addressing information exported by the peer via the mca_pml_base_modex_send() * function should be available during this call via the corresponding - * mca_base_modex_recv() function. The PTL may utilize this information to + * mca_pml_base_modex_recv() function. The PTL may utilize this information to * determine reachability of each peer process. * * For each process that is reachable by the PTL, the bit corresponding to the index diff --git a/ompi/mca/ptl/mx/ptl_mx_module.c b/ompi/mca/ptl/mx/ptl_mx_module.c index 46e66489c7..00ae0d48f7 100644 --- a/ompi/mca/ptl/mx/ptl_mx_module.c +++ b/ompi/mca/ptl/mx/ptl_mx_module.c @@ -103,8 +103,8 @@ int mca_ptl_mx_module_init(void) mx_decompose_endpoint_addr( ptl->mx_endpoint_addr, &(endpoint_addrs[i].nic_id), &(endpoint_addrs[i].endpoint_id) ); } - if((rc = mca_base_modex_send( &mca_ptl_mx_component.super.ptlm_version, - endpoint_addrs, size )) != OMPI_SUCCESS ) + if((rc = mca_pml_base_modex_send( &mca_ptl_mx_component.super.ptlm_version, + endpoint_addrs, size )) != OMPI_SUCCESS ) return rc; return OMPI_SUCCESS; } diff --git a/ompi/mca/ptl/mx/ptl_mx_proc.c b/ompi/mca/ptl/mx/ptl_mx_proc.c index dabb3efa6d..c056bab2ba 100644 --- a/ompi/mca/ptl/mx/ptl_mx_proc.c +++ b/ompi/mca/ptl/mx/ptl_mx_proc.c @@ -104,18 +104,18 @@ mca_ptl_mx_proc_t* mca_ptl_mx_proc_create(ompi_proc_t* ompi_proc) OPAL_THREAD_UNLOCK(&mca_ptl_mx_component.mx_lock); /* lookup mx parameters exported by this proc */ - rc = mca_base_modex_recv( - &mca_ptl_mx_component.super.ptlm_version, - ompi_proc, - (void**)&ptl_proc->proc_addrs, - &size); + rc = mca_pml_base_modex_recv( + &mca_ptl_mx_component.super.ptlm_version, + ompi_proc, + (void**)&ptl_proc->proc_addrs, + &size); if(rc != OMPI_SUCCESS) { - opal_output(0, "mca_ptl_mx_proc_create: mca_base_modex_recv: failed with return value=%d", rc); + opal_output(0, "mca_ptl_mx_proc_create: mca_pml_base_modex_recv: failed with return value=%d", rc); OBJ_RELEASE(ptl_proc); return NULL; } if(0 != (size % sizeof(mca_ptl_mx_endpoint_t))) { - opal_output(0, "mca_ptl_mx_proc_create: mca_base_modex_recv: invalid size %d\n", size); + opal_output(0, "mca_ptl_mx_proc_create: mca_pml_base_modex_recv: invalid size %d\n", size); return NULL; } ptl_proc->proc_addr_count = size / sizeof(mca_ptl_mx_endpoint_t); diff --git a/ompi/mca/ptl/portals/src/ptl_portals_compat_utcp.c b/ompi/mca/ptl/portals/src/ptl_portals_compat_utcp.c index 685c200fe5..f7546862f1 100644 --- a/ompi/mca/ptl/portals/src/ptl_portals_compat_utcp.c +++ b/ompi/mca/ptl/portals/src/ptl_portals_compat_utcp.c @@ -66,11 +66,11 @@ mca_ptl_portals_init(mca_ptl_portals_component_t *comp) "contact info: %u, %u", ntohl(info.nid), ntohl(info.pid)); - ret = mca_base_modex_send(&mca_ptl_portals_component.super.ptlm_version, - &info, sizeof(ptl_process_id_t)); + ret = mca_pml_base_modex_send(&mca_ptl_portals_component.super.ptlm_version, + &info, sizeof(ptl_process_id_t)); if (OMPI_SUCCESS != ret) { opal_output_verbose(10, mca_ptl_portals_component.portals_output, - "mca_base_modex_send failed: %d", ret); + "mca_pml_base_modex_send failed: %d", ret); return ret; } @@ -134,15 +134,15 @@ mca_ptl_portals_add_procs_compat(struct mca_ptl_portals_module_t* ptl, for (i = 0 ; i < nprocs ; ++i) { if (proc_self == procs[i]) my_rid = i; - ret = mca_base_modex_recv(&mca_ptl_portals_component.super.ptlm_version, - procs[i], (void**) &info, &size); + ret = mca_pml_base_modex_recv(&mca_ptl_portals_component.super.ptlm_version, + procs[i], (void**) &info, &size); if (OMPI_SUCCESS != ret) { opal_output_verbose(10, mca_ptl_portals_component.portals_output, - "mca_base_modex_recv failed: %d", ret); + "mca_pml_base_modex_recv failed: %d", ret); return ret; } else if (sizeof(ptl_process_id_t) != size) { opal_output_verbose(10, mca_ptl_portals_component.portals_output, - "mca_base_modex_recv returned size %d, expected %d", + "mca_pml_base_modex_recv returned size %d, expected %d", size, sizeof(ptl_process_id_t)); return OMPI_ERROR; } diff --git a/ompi/mca/ptl/ptl.h b/ompi/mca/ptl/ptl.h index c6b51f9553..2de8f128eb 100644 --- a/ompi/mca/ptl/ptl.h +++ b/ompi/mca/ptl/ptl.h @@ -56,8 +56,8 @@ * information required by its peers. An example would be the TCP * listen port opened by the TCP module for incoming connection * requests. This information is published to peers via the - * mca_base_modex_send() interface. Note that peer information is not - * guaranteed to be available via mca_base_modex_recv() during the + * mca_pml_base_modex_send() interface. Note that peer information is not + * guaranteed to be available via mca_pml_base_modex_recv() during the * module's init function. However, it will be available during * PTL selection (mca_ptl_base_add_proc_fn_t()). * @@ -304,7 +304,7 @@ typedef enum { * the physical devices that are available for the given transport, * and create a PTL instance to represent each device. Any addressing * information required by peers to reach the device should be published - * during this function via the mca_base_modex_send() interface. + * during this function via the mca_pml_base_modex_send() interface. * */ typedef struct mca_ptl_base_module_t** (*mca_ptl_base_component_init_fn_t)( @@ -395,9 +395,9 @@ typedef int (*mca_ptl_base_module_finalize_fn_t)( * * The mca_ptl_base_module_add_procs_fn_t() is called by the PML to * determine the set of PTLs that should be used to reach each process. - * Any addressing information exported by the peer via the mca_base_modex_send() + * Any addressing information exported by the peer via the mca_pml_base_modex_send() * function should be available during this call via the corresponding - * mca_base_modex_recv() function. The PTL may utilize this information to + * mca_pml_base_modex_recv() function. The PTL may utilize this information to * determine reachability of each peer process. * * For each process that is reachable by the PTL, the bit corresponding to the index diff --git a/ompi/mca/ptl/tcp/ptl_tcp_component.c b/ompi/mca/ptl/tcp/ptl_tcp_component.c index 4221ea73fd..5c416484b0 100644 --- a/ompi/mca/ptl/tcp/ptl_tcp_component.c +++ b/ompi/mca/ptl/tcp/ptl_tcp_component.c @@ -469,7 +469,7 @@ static int mca_ptl_tcp_component_exchange(void) addrs[i].addr_port = mca_ptl_tcp_component.tcp_listen_port; addrs[i].addr_inuse = 0; } - rc = mca_base_modex_send(&mca_ptl_tcp_component.super.ptlm_version, addrs, size); + rc = mca_pml_base_modex_send(&mca_ptl_tcp_component.super.ptlm_version, addrs, size); free(addrs); } return rc; diff --git a/ompi/mca/ptl/tcp/ptl_tcp_proc.c b/ompi/mca/ptl/tcp/ptl_tcp_proc.c index fde5ebdf57..eb7d9cef06 100644 --- a/ompi/mca/ptl/tcp/ptl_tcp_proc.c +++ b/ompi/mca/ptl/tcp/ptl_tcp_proc.c @@ -107,17 +107,17 @@ mca_ptl_tcp_proc_t* mca_ptl_tcp_proc_create(ompi_proc_t* ompi_proc) OPAL_THREAD_UNLOCK(&mca_ptl_tcp_component.tcp_lock); /* lookup tcp parameters exported by this proc */ - rc = mca_base_modex_recv( &mca_ptl_tcp_component.super.ptlm_version, - ompi_proc, - (void**)&ptl_proc->proc_addrs, - &size); + rc = mca_pml_base_modex_recv( &mca_ptl_tcp_component.super.ptlm_version, + ompi_proc, + (void**)&ptl_proc->proc_addrs, + &size); if(rc != OMPI_SUCCESS) { - opal_output(0, "mca_ptl_tcp_proc_create: mca_base_modex_recv: failed with return value=%d", rc); + opal_output(0, "mca_ptl_tcp_proc_create: mca_pml_base_modex_recv: failed with return value=%d", rc); OBJ_RELEASE(ptl_proc); return NULL; } if(0 != (size % sizeof(mca_ptl_tcp_addr_t))) { - opal_output(0, "mca_ptl_tcp_proc_create: mca_base_modex_recv: invalid size %d\n", size); + opal_output(0, "mca_ptl_tcp_proc_create: mca_pml_base_modex_recv: invalid size %d\n", size); return NULL; } ptl_proc->proc_addr_count = size / sizeof(mca_ptl_tcp_addr_t); diff --git a/ompi/proc/proc.c b/ompi/proc/proc.c index dcc208e9ab..43bab2a9e5 100644 --- a/ompi/proc/proc.c +++ b/ompi/proc/proc.c @@ -28,6 +28,7 @@ #include "orte/util/proc_info.h" #include "ompi/proc/proc.h" #include "ompi/mca/pml/pml.h" +#include "ompi/datatype/dt_arch.h" #include "ompi/datatype/convertor.h" static opal_list_t ompi_proc_list; @@ -53,9 +54,13 @@ void ompi_proc_construct(ompi_proc_t* proc) proc->proc_modex = NULL; OBJ_CONSTRUCT(&proc->proc_lock, opal_mutex_t); - /* FIX - need to determine remote process architecture */ - proc->proc_convertor = ompi_convertor_create(0, 0); - proc->proc_arch = 0; + /* By default all processors are supposelly having the same architecture as me. Thus, + * by default we run in a homogeneous environment. Later when the registry callback + * get fired we will have to set the convertors to the correct architecture. + */ + proc->proc_convertor = ompi_mpi_local_convertor; + OBJ_RETAIN( ompi_mpi_local_convertor ); + proc->proc_arch = ompi_mpi_local_arch; proc->proc_flags = 0; @@ -70,6 +75,11 @@ void ompi_proc_destruct(ompi_proc_t* proc) if (proc->proc_modex != NULL) { OBJ_RELEASE(proc->proc_modex); } + /* As all the convertors are created with OBJ_NEW we can just call OBJ_RELEASE. All, except + * the local convertor, will get destroyed at some point here. If the reference count is correct + * the local convertor (who has the reference count increased in the datatype) will not get + * destroyed here. It will be destroyed later when the ompi_ddt_finalize is called. + */ OBJ_RELEASE( proc->proc_convertor ); OPAL_THREAD_LOCK(&ompi_proc_lock); opal_list_remove_item(&ompi_proc_list, (opal_list_item_t*)proc); @@ -94,7 +104,7 @@ int ompi_proc_init(void) } /* find self */ - for(i=0; iproc_name = peers[i]; if( i == self ) { @@ -113,6 +123,10 @@ int ompi_proc_init(void) return rc; } + /* Here we have to add to the GPR the information about the current architecture. + * TODO: george + */ + return OMPI_SUCCESS; } @@ -395,6 +409,11 @@ static int setup_registry_callback(void) goto cleanup; } + /* Here we have to add another key to the registry to be able to get the information + * about the remote architectures. + * TODO: George. + */ + sub.cbfunc = callback; sub.user_tag = NULL; @@ -485,6 +504,10 @@ static void callback(orte_gpr_notify_data_t *data, void *cbdata) } } } + /* And finally here we have to retrieve the remote architectures and create the convertors + * attached to the remote processors depending on the remote architecture. + * TODO: George. + */ } /* unlock */ diff --git a/ompi/runtime/ompi_mpi_finalize.c b/ompi/runtime/ompi_mpi_finalize.c index bb6d3dba2d..7f67ff820c 100644 --- a/ompi/runtime/ompi_mpi_finalize.c +++ b/ompi/runtime/ompi_mpi_finalize.c @@ -178,7 +178,7 @@ int ompi_mpi_finalize(void) } /* free module exchange resources */ - if (OMPI_SUCCESS != (ret = mca_base_modex_finalize())) { + if (OMPI_SUCCESS != (ret = mca_pml_base_modex_finalize())) { return ret; } diff --git a/ompi/runtime/ompi_mpi_init.c b/ompi/runtime/ompi_mpi_init.c index 98eb18a1a6..9e4a247f73 100644 --- a/ompi/runtime/ompi_mpi_init.c +++ b/ompi/runtime/ompi_mpi_init.c @@ -186,8 +186,8 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) /* Initialize module exchange */ - if (OMPI_SUCCESS != (ret = mca_base_modex_init())) { - error = "mca_base_modex_init() failed"; + if (OMPI_SUCCESS != (ret = mca_pml_base_modex_init())) { + error = "mca_pml_base_modex_init() failed"; goto error; } @@ -284,8 +284,8 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) goto error; } /* do module exchange */ - if (OMPI_SUCCESS != (ret = mca_base_modex_exchange())) { - error = "ompi_base_modex_exchange() failed"; + if (OMPI_SUCCESS != (ret = mca_pml_base_modex_exchange())) { + error = "mca_pml_base_modex_exchange() failed"; goto error; }