From 9f15b8c55310457c498c35f393ed6f27cce3ff07 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Mon, 2 Aug 2004 17:07:56 +0000 Subject: [PATCH] Updates for the massive module<-->component name change yesterday This commit was SVN r1838. --- src/mca/ptl/elan/src/Makefile.am | 3 +- src/mca/ptl/elan/src/ptl_elan.c | 50 ++++++------ src/mca/ptl/elan/src/ptl_elan.h | 59 +++++++------- src/mca/ptl/elan/src/ptl_elan_comm_init.c | 15 ++-- ...ptl_elan_module.c => ptl_elan_component.c} | 81 ++++++++++--------- src/mca/ptl/elan/src/ptl_elan_frag.c | 8 +- src/mca/ptl/elan/src/ptl_elan_frag.h | 2 +- src/mca/ptl/elan/src/ptl_elan_init.c | 45 ++++++----- src/mca/ptl/elan/src/ptl_elan_peer.h | 2 +- src/mca/ptl/elan/src/ptl_elan_priv.c | 47 ++++++----- src/mca/ptl/elan/src/ptl_elan_priv.h | 18 ++--- src/mca/ptl/elan/src/ptl_elan_proc.c | 28 +++---- 12 files changed, 185 insertions(+), 173 deletions(-) rename src/mca/ptl/elan/src/{ptl_elan_module.c => ptl_elan_component.c} (79%) diff --git a/src/mca/ptl/elan/src/Makefile.am b/src/mca/ptl/elan/src/Makefile.am index e2b4eca95f..fc3151202d 100644 --- a/src/mca/ptl/elan/src/Makefile.am +++ b/src/mca/ptl/elan/src/Makefile.am @@ -1,4 +1,3 @@ -# -*- makefile -*- # # $HEADER$ # @@ -27,5 +26,5 @@ libmca_ptl_elan_la_SOURCES = \ ptl_elan_peer.c \ ptl_elan_init.c \ ptl_elan_comm_init.c \ - ptl_elan_module.c \ + ptl_elan_component.c \ ptl_elan.c diff --git a/src/mca/ptl/elan/src/ptl_elan.c b/src/mca/ptl/elan/src/ptl_elan.c index 70508990dd..c5c31582d6 100644 --- a/src/mca/ptl/elan/src/ptl_elan.c +++ b/src/mca/ptl/elan/src/ptl_elan.c @@ -20,9 +20,9 @@ #include "ptl_elan_priv.h" /* XXX: There must be multiple PTL's. This could be the template */ -mca_ptl_elan_t mca_ptl_elan = { +mca_ptl_elan_module_t mca_ptl_elan_module = { { - &mca_ptl_elan_module.super, + &mca_ptl_elan_component.super, 4, sizeof(mca_ptl_elan_send_frag_t), 0, /* ptl_exclusivity */ @@ -47,7 +47,7 @@ mca_ptl_elan_t mca_ptl_elan = { }; int -mca_ptl_elan_add_procs (struct mca_ptl_t *ptl, +mca_ptl_elan_add_procs (struct mca_ptl_base_module_t *ptl, size_t nprocs, struct ompi_proc_t **procs, struct mca_ptl_base_peer_t **peers, @@ -105,18 +105,18 @@ mca_ptl_elan_add_procs (struct mca_ptl_t *ptl, * queue-handle, put/get-handle, memory-statics. * 2) XXX: Consider matching elan_vp and ompi_proc_name_t. */ - ptl_peer->peer_ptl = (mca_ptl_elan_t *) ptl; + ptl_peer->peer_ptl = (mca_ptl_elan_module_t *) ptl; ptl_peer->peer_proc = ptl_proc; /* There is only one peer per elan_peer_proc_t. */ ptl_proc->proc_peers[0] = ptl_peer; - if (ptl_proc == mca_ptl_elan_module.elan_local) { - ptl_peer->peer_vp = ((mca_ptl_elan_t *)ptl)->elan_vp; + if (ptl_proc == mca_ptl_elan_component.elan_local) { + ptl_peer->peer_vp = ((mca_ptl_elan_module_t *)ptl)->elan_vp; } else { ptl_peer->peer_vp = ptl_proc->proc_addrs->elan_vp; ptl_proc->proc_addrs->inuse = 1; } - ptl_peer->peer_rails = ((mca_ptl_elan_t *)ptl)->ptl_ni_total; + ptl_peer->peer_rails = ((mca_ptl_elan_module_t *)ptl)->ptl_ni_total; /* There is only one peer per elan_peer_proc_t */ ptl_proc->proc_peer_count = 1; @@ -128,7 +128,7 @@ mca_ptl_elan_add_procs (struct mca_ptl_t *ptl, } int -mca_ptl_elan_del_procs (struct mca_ptl_t *ptl, +mca_ptl_elan_del_procs (struct mca_ptl_base_module_t *ptl, size_t nprocs, struct ompi_proc_t **procs, struct mca_ptl_base_peer_t **peers) @@ -141,12 +141,12 @@ mca_ptl_elan_del_procs (struct mca_ptl_t *ptl, } int -mca_ptl_elan_finalize (struct mca_ptl_t *ptl) +mca_ptl_elan_finalize (struct mca_ptl_base_module_t *ptl) { int rail_index; - struct mca_ptl_elan_t *elan_ptl; + struct mca_ptl_elan_module_t *elan_ptl; - elan_ptl = (struct mca_ptl_elan_t *) ptl; + elan_ptl = (struct mca_ptl_elan_module_t *) ptl; /* XXX: Free all the lists, etc, hanged over PTL * before freeing the PTLs */ @@ -154,14 +154,14 @@ mca_ptl_elan_finalize (struct mca_ptl_t *ptl) free (elan_ptl); /* Record the missing of this entry */ - mca_ptl_elan_module.elan_ptls[rail_index] = NULL; - mca_ptl_elan_module.elan_num_ptls--; + mca_ptl_elan_component.elan_ptl_modules[rail_index] = NULL; + mca_ptl_elan_component.elan_num_ptl_modules--; return OMPI_SUCCESS; } int -mca_ptl_elan_req_init (struct mca_ptl_t *ptl, +mca_ptl_elan_req_init (struct mca_ptl_base_module_t *ptl, struct mca_pml_base_send_request_t *request) { mca_ptl_elan_send_frag_t *sd; @@ -186,14 +186,14 @@ mca_ptl_elan_req_init (struct mca_ptl_t *ptl, } void -mca_ptl_elan_req_fini (struct mca_ptl_t *ptl, +mca_ptl_elan_req_fini (struct mca_ptl_base_module_t *ptl, struct mca_pml_base_send_request_t *request) { /* XXX: Lock to be added */ ompi_ptl_elan_queue_ctrl_t *queue; mca_ptl_elan_send_frag_t *desc; - queue = ((struct mca_ptl_elan_t * )ptl)->queue; + queue = ((struct mca_ptl_elan_module_t * )ptl)->queue; /* return the fragment and update the status */ desc = ((mca_ptl_elan_send_request_t *) request)->req_frag; @@ -204,17 +204,17 @@ mca_ptl_elan_req_fini (struct mca_ptl_t *ptl, void -mca_ptl_elan_recv_frag_return (struct mca_ptl_t *ptl, +mca_ptl_elan_recv_frag_return (struct mca_ptl_base_module_t *ptl, struct mca_ptl_elan_recv_frag_t *frag) { - OMPI_FREE_LIST_RETURN(&mca_ptl_elan_module.elan_recv_frags_free, + OMPI_FREE_LIST_RETURN(&mca_ptl_elan_component.elan_recv_frags_free, (ompi_list_item_t*)frag); return; } void -mca_ptl_elan_send_frag_return (struct mca_ptl_t *ptl, +mca_ptl_elan_send_frag_return (struct mca_ptl_base_module_t *ptl, struct mca_ptl_elan_send_frag_t *frag) { return; @@ -225,7 +225,7 @@ mca_ptl_elan_send_frag_return (struct mca_ptl_t *ptl, */ int -mca_ptl_elan_isend (struct mca_ptl_t *ptl, +mca_ptl_elan_isend (struct mca_ptl_base_module_t *ptl, struct mca_ptl_base_peer_t *ptl_peer, struct mca_pml_base_send_request_t *sendreq, size_t offset, @@ -236,7 +236,7 @@ mca_ptl_elan_isend (struct mca_ptl_t *ptl, mca_ptl_elan_send_frag_t *sd; /* XXX: - * PML extract an request from PTL module and then use this + * PML extract an request from PTL component and then use this * a request to ask for a fragment * Is it too deep across stacks to get a request and * correspondingly multiple LOCKS to go through*/ @@ -251,7 +251,7 @@ mca_ptl_elan_isend (struct mca_ptl_t *ptl, ompi_free_list_t * frag_list; ompi_list_item_t * item; - frag_list = &mca_ptl_elan_module.elan_send_frags_free; + frag_list = &mca_ptl_elan_component.elan_send_frags_free; /* More sendfrag then descritpors, no need to block */ ompi_mutex_lock(&frag_list->fl_lock); @@ -285,7 +285,7 @@ mca_ptl_elan_isend (struct mca_ptl_t *ptl, */ int -mca_ptl_elan_put (struct mca_ptl_t *ptl, +mca_ptl_elan_put (struct mca_ptl_base_module_t *ptl, struct mca_ptl_base_peer_t *ptl_peer, struct mca_pml_base_send_request_t *sendreq, size_t offset, @@ -302,7 +302,7 @@ mca_ptl_elan_put (struct mca_ptl_t *ptl, */ int -mca_ptl_elan_get (struct mca_ptl_t *ptl, +mca_ptl_elan_get (struct mca_ptl_base_module_t *ptl, struct mca_ptl_base_peer_t *ptl_base_peer, struct mca_pml_base_recv_request_t *request, size_t offset, @@ -319,7 +319,7 @@ mca_ptl_elan_get (struct mca_ptl_t *ptl, */ void -mca_ptl_elan_matched (mca_ptl_t * ptl, +mca_ptl_elan_matched (mca_ptl_base_module_t * ptl, mca_ptl_base_recv_frag_t * frag) { mca_pml_base_recv_request_t *request; diff --git a/src/mca/ptl/elan/src/ptl_elan.h b/src/mca/ptl/elan/src/ptl_elan.h index 1423fad4f1..4eaa5cd42f 100644 --- a/src/mca/ptl/elan/src/ptl_elan.h +++ b/src/mca/ptl/elan/src/ptl_elan.h @@ -25,10 +25,10 @@ extern struct mca_ptl_elan_state_t mca_ptl_elan_global_state; /** * ELAN PTL Interface */ -struct mca_ptl_elan_t { +struct mca_ptl_elan_module_t { /**< The elan progress related interface */ - mca_ptl_t super; /**< base PTL interface */ + mca_ptl_base_module_t super; /**< base PTL interface */ /**< The following are elan-related control structures */ ELAN_RAIL *ptl_elan_rail; /**< Pointer to this Rail */ @@ -45,20 +45,20 @@ struct mca_ptl_elan_t { int max_num_dmas; /**< total rdma descriptors */ }; -typedef struct mca_ptl_elan_t mca_ptl_elan_t; -extern mca_ptl_elan_t mca_ptl_elan; +typedef struct mca_ptl_elan_module_t mca_ptl_elan_module_t; +extern mca_ptl_elan_module_t mca_ptl_elan_module; /** * ELAN PTL module. */ -struct mca_ptl_elan_module_1_0_0_t { +struct mca_ptl_elan_component_t { - mca_ptl_base_module_1_0_0_t super; /**< base PTL module */ + mca_ptl_base_component_t super; /**< base PTL component */ size_t elan_free_list_num; /**< initial size of free lists */ size_t elan_free_list_max; /**< maximum size of free lists */ size_t elan_free_list_inc; /**< # to alloc when growing lists */ - size_t elan_num_ptls; /**< number of ptls activated */ + size_t elan_num_ptl_modules; /**< number of ptls activated */ /* * We create our own simplified structure for managing elan state @@ -66,7 +66,7 @@ struct mca_ptl_elan_module_1_0_0_t { * all those tport, group, atomic, shmem and NIC threads support. */ struct mca_ptl_elan_state_t *elan_ctrl; - struct mca_ptl_elan_t **elan_ptls; /**< array of available PTLs */ + struct mca_ptl_elan_module_t **elan_ptl_modules; /**< array of available PTL modules */ struct mca_ptl_elan_proc_t *elan_local; ompi_mutex_t elan_lock; /**< lock for module state */ @@ -78,27 +78,27 @@ struct mca_ptl_elan_module_1_0_0_t { ompi_free_list_t elan_send_frags_free; ompi_free_list_t elan_recv_frags_free; }; -typedef struct mca_ptl_elan_module_1_0_0_t mca_ptl_elan_module_1_0_0_t; +typedef struct mca_ptl_elan_component_t mca_ptl_elan_component_t; struct mca_ptl_elan_send_frag_t; struct mca_ptl_elan_recv_frag_t; -extern mca_ptl_elan_module_1_0_0_t mca_ptl_elan_module; +extern mca_ptl_elan_component_t mca_ptl_elan_component; /** * Register ELAN module parameters with the MCA framework */ -extern int mca_ptl_elan_module_open (void); +extern int mca_ptl_elan_component_open (void); /** * Any final cleanup before being unloaded. */ -extern int mca_ptl_elan_module_close (void); +extern int mca_ptl_elan_component_close (void); /** * ELAN module initialization. * - * @param num_ptls (OUT) + * @param num_ptl_modules (OUT) * Number of PTLs returned in PTL array. * @param allow_multi_user_threads (OUT) * Flag indicating wether PTL supports user threads (TRUE) @@ -106,21 +106,22 @@ extern int mca_ptl_elan_module_close (void); * Flag indicating whether PTL uses threads (TRUE) * */ -extern mca_ptl_t **mca_ptl_elan_module_init (int *num_ptls, - bool * multi_user_threads, - bool * have_hidden_threads); +extern mca_ptl_base_module_t ** +mca_ptl_elan_component_init (int *num_ptl_modules, + bool * multi_user_threads, + bool * have_hidden_threads); /** * ELAN module control. */ -extern int mca_ptl_elan_module_control (int param, +extern int mca_ptl_elan_component_control (int param, void *value, size_t size); /** * ELAN module progress. */ -extern int mca_ptl_elan_module_progress (mca_ptl_tstamp_t tstamp); +extern int mca_ptl_elan_component_progress (mca_ptl_tstamp_t tstamp); /** * Cleanup any resources held by the PTL. @@ -128,7 +129,7 @@ extern int mca_ptl_elan_module_progress (mca_ptl_tstamp_t tstamp); * @param ptl PTL instance. * @return OMPI_SUCCESS or error status on failure. */ -extern int mca_ptl_elan_finalize (struct mca_ptl_t *ptl); +extern int mca_ptl_elan_finalize (struct mca_ptl_base_module_t *ptl); /** @@ -140,7 +141,7 @@ extern int mca_ptl_elan_finalize (struct mca_ptl_t *ptl); * @return OMPI_SUCCESS or error status on failure. */ extern int -mca_ptl_elan_add_procs (struct mca_ptl_t *ptl, +mca_ptl_elan_add_procs (struct mca_ptl_base_module_t *ptl, size_t nprocs, struct ompi_proc_t **procs, struct mca_ptl_base_peer_t **peers, @@ -155,7 +156,7 @@ mca_ptl_elan_add_procs (struct mca_ptl_t *ptl, * @return Status indicating if cleanup was successful */ extern int -mca_ptl_elan_del_procs (struct mca_ptl_t *ptl, +mca_ptl_elan_del_procs (struct mca_ptl_base_module_t *ptl, size_t nprocs, struct ompi_proc_t ** procs, struct mca_ptl_base_peer_t **peers); @@ -168,7 +169,7 @@ mca_ptl_elan_del_procs (struct mca_ptl_t *ptl, * @return Status indicating if allocation was successful. */ extern int -mca_ptl_elan_req_init (struct mca_ptl_t *ptl, +mca_ptl_elan_req_init (struct mca_ptl_base_module_t *ptl, struct mca_pml_base_send_request_t *req); /** @@ -177,7 +178,7 @@ mca_ptl_elan_req_init (struct mca_ptl_t *ptl, * @param ptl (IN) PTL instance * @param request (IN) Pointer to allocated request. */ -extern void mca_ptl_elan_req_fini (struct mca_ptl_t *ptl, +extern void mca_ptl_elan_req_fini (struct mca_ptl_base_module_t *ptl, struct mca_pml_base_send_request_t *); /** @@ -186,7 +187,7 @@ extern void mca_ptl_elan_req_fini (struct mca_ptl_t *ptl, * @param ptl (IN) PTL instance * @param recv_frag (IN) Receive fragment */ -extern void mca_ptl_elan_matched (struct mca_ptl_t *ptl, +extern void mca_ptl_elan_matched (struct mca_ptl_base_module_t *ptl, struct mca_ptl_base_recv_frag_t *frag); /** @@ -204,7 +205,7 @@ extern void mca_ptl_elan_matched (struct mca_ptl_t *ptl, * OMPI_SUCCESS if the PTL was able to queue one or more fragments */ extern int -mca_ptl_elan_isend (struct mca_ptl_t* ptl, +mca_ptl_elan_isend (struct mca_ptl_base_module_t* ptl, struct mca_ptl_base_peer_t* ptl_base_peer, struct mca_pml_base_send_request_t* request, size_t offset, @@ -226,7 +227,7 @@ mca_ptl_elan_isend (struct mca_ptl_t* ptl, * OMPI_SUCCESS if the PTL was able to queue one or more fragments */ extern int -mca_ptl_elan_put (struct mca_ptl_t* ptl, +mca_ptl_elan_put (struct mca_ptl_base_module_t* ptl, struct mca_ptl_base_peer_t* ptl_base_peer, struct mca_pml_base_send_request_t* request, size_t offset, @@ -248,7 +249,7 @@ mca_ptl_elan_put (struct mca_ptl_t* ptl, * OMPI_SUCCESS if the PTL was able to queue one or more fragments */ extern int -mca_ptl_elan_get (struct mca_ptl_t* ptl, +mca_ptl_elan_get (struct mca_ptl_base_module_t* ptl, struct mca_ptl_base_peer_t* ptl_base_peer, struct mca_pml_base_recv_request_t* request, size_t offset, @@ -261,7 +262,7 @@ mca_ptl_elan_get (struct mca_ptl_t* ptl, * @param ptl (IN) PTL instance * @param frag (IN) ELAN receive fragment */ -extern void mca_ptl_elan_recv_frag_return (struct mca_ptl_t *ptl, +extern void mca_ptl_elan_recv_frag_return (struct mca_ptl_base_module_t *ptl, struct mca_ptl_elan_recv_frag_t *frag); @@ -271,7 +272,7 @@ extern void mca_ptl_elan_recv_frag_return (struct mca_ptl_t *ptl, * @param ptl (IN) PTL instance * @param frag (IN) ELAN send fragment */ -extern void mca_ptl_elan_send_frag_return (struct mca_ptl_t *ptl, +extern void mca_ptl_elan_send_frag_return (struct mca_ptl_base_module_t *ptl, struct mca_ptl_elan_send_frag_t *frag); diff --git a/src/mca/ptl/elan/src/ptl_elan_comm_init.c b/src/mca/ptl/elan/src/ptl_elan_comm_init.c index c77981fbc6..df5cafa744 100644 --- a/src/mca/ptl/elan/src/ptl_elan_comm_init.c +++ b/src/mca/ptl/elan/src/ptl_elan_comm_init.c @@ -1,3 +1,6 @@ +/* + * $HEADER$ + */ #include #include @@ -13,7 +16,7 @@ #define ALIGNUP(x,a) (((unsigned int)(x) + ((a)-1)) & (-(a))) static int -ompi_init_elan_queue_events (mca_ptl_elan_t * ptl, +ompi_init_elan_queue_events (mca_ptl_elan_module_t * ptl, ompi_ptl_elan_queue_ctrl_t * queue) { int i; @@ -107,7 +110,7 @@ ompi_init_elan_queue_events (mca_ptl_elan_t * ptl, } int -ompi_init_elan_stat (mca_ptl_elan_module_1_0_0_t * emp, +ompi_init_elan_stat (mca_ptl_elan_component_t * emp, int num_rails) { return (OMPI_SUCCESS); @@ -115,7 +118,7 @@ ompi_init_elan_stat (mca_ptl_elan_module_1_0_0_t * emp, int -ompi_init_elan_qdma (mca_ptl_elan_module_1_0_0_t * emp, +ompi_init_elan_qdma (mca_ptl_elan_component_t * emp, int num_rails) { int i; @@ -123,7 +126,7 @@ ompi_init_elan_qdma (mca_ptl_elan_module_1_0_0_t * emp, int slotsize = 2048; RAIL *rail; ELAN4_CTX *ctx; - struct mca_ptl_elan_t *ptl; + struct mca_ptl_elan_module_t *ptl; START_FUNC(); @@ -133,7 +136,7 @@ ompi_init_elan_qdma (mca_ptl_elan_module_1_0_0_t * emp, ompi_ptl_elan_recv_queue_t *rxq; ompi_ptl_elan_queue_ctrl_t *queue; - ptl = emp->elan_ptls[i]; + ptl = emp->elan_ptl_modules[i]; rail = (RAIL *) ptl->ptl_elan_rail; ctx = (ELAN4_CTX *) ptl->ptl_elan_ctx; @@ -242,7 +245,7 @@ ompi_init_elan_qdma (mca_ptl_elan_module_1_0_0_t * emp, } int -ompi_init_elan_rdma (mca_ptl_elan_module_1_0_0_t * emp, +ompi_init_elan_rdma (mca_ptl_elan_component_t * emp, int num_rails) { return (OMPI_SUCCESS); diff --git a/src/mca/ptl/elan/src/ptl_elan_module.c b/src/mca/ptl/elan/src/ptl_elan_component.c similarity index 79% rename from src/mca/ptl/elan/src/ptl_elan_module.c rename to src/mca/ptl/elan/src/ptl_elan_component.c index a7961e4e6a..8fbd5949b1 100644 --- a/src/mca/ptl/elan/src/ptl_elan_module.c +++ b/src/mca/ptl/elan/src/ptl_elan_component.c @@ -1,6 +1,7 @@ /* * $HEADER$ */ + #include #include #include @@ -32,7 +33,7 @@ extern ompi_proc_t *ompi_proc_local_proc; -mca_ptl_elan_module_1_0_0_t mca_ptl_elan_module = { +mca_ptl_elan_component_t mca_ptl_elan_component = { { /* Base module information about itself */ { @@ -43,8 +44,8 @@ mca_ptl_elan_module_1_0_0_t mca_ptl_elan_module = { 1, /* MCA module major version */ 0, /* MCA module minor version */ 0, /* MCA module release version */ - mca_ptl_elan_module_open, /* module open */ - mca_ptl_elan_module_close /* module close */ + mca_ptl_elan_component_open, /* module open */ + mca_ptl_elan_component_close /* module close */ }, /* Next the MCA v1.0.0 module meta data */ @@ -54,19 +55,19 @@ mca_ptl_elan_module_1_0_0_t mca_ptl_elan_module = { }, /* The management related interfaces */ - mca_ptl_elan_module_init, - mca_ptl_elan_module_control, - mca_ptl_elan_module_progress + mca_ptl_elan_component_init, + mca_ptl_elan_component_control, + mca_ptl_elan_component_progress } }; -static mca_ptl_elan_module_1_0_0_t *elan_mp = &mca_ptl_elan_module; -static int mca_ptl_elan_module_initialized = 0; +static mca_ptl_elan_component_t *elan_mp = &mca_ptl_elan_component; +static bool mca_ptl_elan_component_initialized = false; /* * some elan vp information to the the global registery */ -static int mca_ptl_elan_module_register (mca_ptl_elan_module_1_0_0_t *emp) +static int mca_ptl_elan_component_register (mca_ptl_elan_component_t *emp) { int rc; size_t i; @@ -74,10 +75,10 @@ static int mca_ptl_elan_module_register (mca_ptl_elan_module_1_0_0_t *emp) mca_ptl_elan_addr_t *addrs = (mca_ptl_elan_addr_t*)malloc(size); - size = emp->elan_num_ptls * sizeof(mca_ptl_elan_addr_t); + size = emp->elan_num_ptl_modules * sizeof(mca_ptl_elan_addr_t); - for(i=0; ielan_num_ptls; i++) { - mca_ptl_elan_t * ptl = emp->elan_ptls[i]; + for(i=0; ielan_num_ptl_modules; i++) { + mca_ptl_elan_module_t * ptl = emp->elan_ptl_modules[i]; addrs[i].elan_vp = ptl->elan_vp; addrs[i].inuse = 0; addrs[i].gid = ompi_proc_local_proc->proc_name; @@ -95,18 +96,18 @@ static int mca_ptl_elan_module_register (mca_ptl_elan_module_1_0_0_t *emp) */ int -mca_ptl_elan_module_open (void) +mca_ptl_elan_component_open (void) { /* register super module parameters */ - mca_ptl_elan.super.ptl_exclusivity = + mca_ptl_elan_module.super.ptl_exclusivity = mca_ptl_elan_param_register_int ("exclusivity", 0); - mca_ptl_elan.super.ptl_first_frag_size = + mca_ptl_elan_module.super.ptl_first_frag_size = mca_ptl_elan_param_register_int ("first_frag_size", (2048 - sizeof(mca_ptl_base_header_t))/*magic*/); - mca_ptl_elan.super.ptl_min_frag_size = + mca_ptl_elan_module.super.ptl_min_frag_size = mca_ptl_elan_param_register_int ("min_frag_size", (2048 - sizeof(mca_ptl_base_header_t))/*magic*/); - mca_ptl_elan.super.ptl_max_frag_size = + mca_ptl_elan_module.super.ptl_max_frag_size = mca_ptl_elan_param_register_int ("max_frag_size", 2<<30); /* register ELAN module parameters */ @@ -118,8 +119,8 @@ mca_ptl_elan_module_open (void) mca_ptl_elan_param_register_int ("free_list_inc", 32); /* initialize state */ - elan_mp->elan_ptls = NULL; - elan_mp->elan_num_ptls = 0; + elan_mp->elan_ptl_modules = NULL; + elan_mp->elan_num_ptl_modules = 0; elan_mp->elan_local = NULL; /* initialize lists */ @@ -139,24 +140,24 @@ mca_ptl_elan_module_open (void) int -mca_ptl_elan_module_close (void) +mca_ptl_elan_component_close (void) { - if (mca_ptl_elan_module_initialized) { + if (mca_ptl_elan_component_initialized) { /* cleanup the proc, ptl, and the module */ - ompi_mca_ptl_elan_finalize (&mca_ptl_elan_module); + ompi_mca_ptl_elan_finalize (&mca_ptl_elan_component); /* XXX: Make sure this is not just an alias pointer */ if (elan_mp->elan_local) { free (elan_mp->elan_local); } - if (NULL != elan_mp->elan_ptls) { + if (NULL != elan_mp->elan_ptl_modules) { int i; - for (i = elan_mp->elan_num_ptls; i > 0; i--) { - free (elan_mp->elan_ptls[i - 1]); + for (i = elan_mp->elan_num_ptl_modules; i > 0; i--) { + free (elan_mp->elan_ptl_modules[i - 1]); } - free (elan_mp->elan_ptls); + free (elan_mp->elan_ptl_modules); } } @@ -202,14 +203,14 @@ mca_ptl_elan_module_close (void) * (2) set up STEN, RDMA and QDMA structures. * (3) register the list of PTL parameters with the MCA */ -mca_ptl_t ** -mca_ptl_elan_module_init (int *num_ptls, +mca_ptl_base_module_t ** +mca_ptl_elan_component_init (int *num_ptl_modules, bool * allow_multi_user_threads, bool * have_hidden_threads) { - mca_ptl_t **ptls; + mca_ptl_base_module_t **ptls; - *num_ptls = 0; + *num_ptl_modules = 0; START_FUNC(); @@ -258,22 +259,22 @@ mca_ptl_elan_module_init (int *num_ptls, } /* open basic elan device */ - if (OMPI_SUCCESS != ompi_mca_ptl_elan_init(&mca_ptl_elan_module)) { + if (OMPI_SUCCESS != ompi_mca_ptl_elan_init(&mca_ptl_elan_component)) { ompi_output(0, "[%s:%d] error in initializing elan state and PTL's.\n", __FILE__, __LINE__); return NULL; } - if (OMPI_SUCCESS != mca_ptl_elan_module_register(&mca_ptl_elan_module)) { + if (OMPI_SUCCESS != mca_ptl_elan_component_register(&mca_ptl_elan_component)) { ompi_output(0, "[%s:%d] error in registering with Runtime/OOB \n", __FILE__, __LINE__); return NULL; } - ptls = (mca_ptl_t **) malloc (elan_mp->elan_num_ptls * - sizeof (mca_ptl_elan_t *)); + ptls = (mca_ptl_base_module_t **) malloc (elan_mp->elan_num_ptl_modules * + sizeof (mca_ptl_elan_module_t *)); if (NULL == ptls) { ompi_output(0, "[%s:%d] error in malloc for elan PTL references\n", @@ -281,10 +282,10 @@ mca_ptl_elan_module_init (int *num_ptls, return NULL; } - memcpy (ptls, elan_mp->elan_ptls, - elan_mp->elan_num_ptls * sizeof (mca_ptl_elan_t *)); - *num_ptls = elan_mp->elan_num_ptls; - mca_ptl_elan_module_initialized = 1; + memcpy (ptls, elan_mp->elan_ptl_modules, + elan_mp->elan_num_ptl_modules * sizeof (mca_ptl_elan_module_t *)); + *num_ptl_modules = elan_mp->elan_num_ptl_modules; + mca_ptl_elan_component_initialized = true; END_FUNC(); return ptls; @@ -292,7 +293,7 @@ mca_ptl_elan_module_init (int *num_ptls, /* support ELAN module control */ int -mca_ptl_elan_module_control (int param, +mca_ptl_elan_component_control (int param, void *value, size_t size) { @@ -309,7 +310,7 @@ mca_ptl_elan_module_control (int param, static int times = 0; int -mca_ptl_elan_module_progress (mca_ptl_tstamp_t tstamp) +mca_ptl_elan_component_progress (mca_ptl_tstamp_t tstamp) { START_FUNC(); /*if (times <= -1000)*/ diff --git a/src/mca/ptl/elan/src/ptl_elan_frag.c b/src/mca/ptl/elan/src/ptl_elan_frag.c index e788a70e9c..c9d7e96cad 100644 --- a/src/mca/ptl/elan/src/ptl_elan_frag.c +++ b/src/mca/ptl/elan/src/ptl_elan_frag.c @@ -74,7 +74,7 @@ ompi_class_t mca_ptl_elan_recv_frag_t_class = { extern mca_ptl_elan_state_t mca_ptl_elan_global_state; mca_ptl_elan_send_frag_t * -mca_ptl_elan_alloc_send_desc (struct mca_ptl_t *ptl_ptr, +mca_ptl_elan_alloc_send_desc (struct mca_ptl_base_module_t *ptl_ptr, struct mca_pml_base_send_request_t *sendreq) { struct ompi_ptl_elan_queue_ctrl_t *queue; @@ -88,7 +88,7 @@ mca_ptl_elan_alloc_send_desc (struct mca_ptl_t *ptl_ptr, /* For now, bind to queue DMA directly */ { - queue = ((mca_ptl_elan_t *) ptl_ptr)->queue; + queue = ((mca_ptl_elan_module_t *) ptl_ptr)->queue; flist = &queue->tx_desc_free; if (ompi_using_threads ()) { @@ -102,7 +102,7 @@ mca_ptl_elan_alloc_send_desc (struct mca_ptl_t *ptl_ptr, while (NULL == item) { mca_ptl_tstamp_t tstamp = 0; - ptl_ptr->ptl_module->ptlm_progress (tstamp); + ptl_ptr->ptl_component->ptlm_progress (tstamp); item = ompi_list_remove_first (&((flist)->super)); } ompi_mutex_unlock(&flist->fl_lock); @@ -119,7 +119,7 @@ mca_ptl_elan_alloc_send_desc (struct mca_ptl_t *ptl_ptr, * PTL's from other modules. Wait for PML to change. * Otherwise have to trigger PML progress from PTL. Ouch.. */ - ptl_ptr->ptl_module->ptlm_progress (tstamp); + ptl_ptr->ptl_component->ptlm_progress (tstamp); item = ompi_list_remove_first (&((flist)->super)); } } diff --git a/src/mca/ptl/elan/src/ptl_elan_frag.h b/src/mca/ptl/elan/src/ptl_elan_frag.h index 402a545965..bf0e093345 100644 --- a/src/mca/ptl/elan/src/ptl_elan_frag.h +++ b/src/mca/ptl/elan/src/ptl_elan_frag.h @@ -48,7 +48,7 @@ struct mca_ptl_elan_recv_frag_t { typedef struct mca_ptl_elan_recv_frag_t mca_ptl_elan_recv_frag_t; mca_ptl_elan_send_frag_t * -mca_ptl_elan_alloc_send_desc( struct mca_ptl_t *ptl, +mca_ptl_elan_alloc_send_desc( struct mca_ptl_base_module_t *ptl, struct mca_pml_base_send_request_t *sendreq); mca_ptl_elan_recv_frag_t * diff --git a/src/mca/ptl/elan/src/ptl_elan_init.c b/src/mca/ptl/elan/src/ptl_elan_init.c index 58d6b20bba..0823c496e2 100644 --- a/src/mca/ptl/elan/src/ptl_elan_init.c +++ b/src/mca/ptl/elan/src/ptl_elan_init.c @@ -1,3 +1,6 @@ +/* + * $HEADER$ + */ #include #include @@ -18,16 +21,16 @@ mca_ptl_elan_state_t mca_ptl_elan_global_state; static int ompi_mca_ptl_elan_setup (mca_ptl_elan_state_t * ems) { - mca_ptl_elan_module_1_0_0_t *emp; + mca_ptl_elan_component_t *emp; int rail_count; START_FUNC(); rail_count = ems->elan_nrails; - emp = ems->elan_module; - emp->elan_num_ptls = 0; - emp->elan_ptls = malloc (rail_count * sizeof (mca_ptl_elan_t *)); - if (NULL == emp->elan_ptls) { + emp = ems->elan_component; + emp->elan_num_ptl_modules = 0; + emp->elan_ptl_modules = malloc (rail_count * sizeof (mca_ptl_elan_module_t *)); + if (NULL == emp->elan_ptl_modules) { ompi_output (0, "[%s:%d] error in malloc for ptl references \n", __FILE__, __LINE__); @@ -37,9 +40,9 @@ ompi_mca_ptl_elan_setup (mca_ptl_elan_state_t * ems) /* Initialiaze PTL's */ do { char param[256]; - mca_ptl_elan_t *ptl; + mca_ptl_elan_module_t *ptl; - ptl = malloc (sizeof (mca_ptl_elan_t)); + ptl = malloc (sizeof (mca_ptl_elan_module_t)); if (NULL == ptl) { ompi_output (0, "[%s:%d] error in malloc for ptl structures \n", @@ -47,30 +50,30 @@ ompi_mca_ptl_elan_setup (mca_ptl_elan_state_t * ems) return OMPI_ERR_OUT_OF_RESOURCE; } - memcpy (ptl, &mca_ptl_elan, sizeof (mca_ptl_elan)); - emp->elan_ptls[emp->elan_num_ptls] = ptl; + memcpy (ptl, &mca_ptl_elan_module, sizeof (mca_ptl_elan_module)); + emp->elan_ptl_modules[emp->elan_num_ptl_modules] = ptl; /* MCA related structures */ - ptl->ptl_ni_local = emp->elan_num_ptls; + ptl->ptl_ni_local = emp->elan_num_ptl_modules; ptl->ptl_ni_total = rail_count; /* allow user to specify per rail bandwidth and latency */ - sprintf (param, "bandwidth_elanrail%d", emp->elan_num_ptls); + sprintf (param, "bandwidth_elanrail%d", emp->elan_num_ptl_modules); ptl->super.ptl_bandwidth = mca_ptl_elan_param_register_int (param, 1000); - sprintf (param, "latency_elanrail%d", emp->elan_num_ptls); + sprintf (param, "latency_elanrail%d", emp->elan_num_ptl_modules); ptl->super.ptl_latency = mca_ptl_elan_param_register_int (param, 1); /* Setup elan related structures such as ctx, rail */ - ptl->ptl_elan_rail = ems->elan_rail[emp->elan_num_ptls]; - ptl->ptl_elan_ctx = ems->elan_rail[emp->elan_num_ptls]->rail_ctx; + ptl->ptl_elan_rail = ems->elan_rail[emp->elan_num_ptl_modules]; + ptl->ptl_elan_ctx = ems->elan_rail[emp->elan_num_ptl_modules]->rail_ctx; ptl->elan_vp = ems->elan_vp; ptl->elan_nvp = ems->elan_nvp; - emp->elan_num_ptls++; - } while (emp->elan_num_ptls < rail_count); + emp->elan_num_ptl_modules++; + } while (emp->elan_num_ptl_modules < rail_count); /* Allocating all the communication strcutures for PTL's, */ if (OMPI_SUCCESS != ompi_init_elan_qdma (emp, rail_count)) { @@ -232,14 +235,14 @@ ompi_elan_attach_network (mca_ptl_elan_state_t * ems) } static void -ompi_module_elan_close_ptls (mca_ptl_elan_module_1_0_0_t * emp, +ompi_module_elan_close_ptls (mca_ptl_elan_component_t * emp, int num_rails) { /* TODO: find the ones that are still there and free them */ } static void -ompi_module_elan_close_procs (mca_ptl_elan_module_1_0_0_t * emp, +ompi_module_elan_close_procs (mca_ptl_elan_component_t * emp, int num_rails) { /* TODO: find the ones that are still there and free them */ @@ -300,7 +303,7 @@ ompi_init_elan_sleepdesc (mca_ptl_elan_state_t * ems, } int -ompi_mca_ptl_elan_init (mca_ptl_elan_module_1_0_0_t * emp) +ompi_mca_ptl_elan_init (mca_ptl_elan_component_t * emp) { int i; int *rails; @@ -318,7 +321,7 @@ ompi_mca_ptl_elan_init (mca_ptl_elan_module_1_0_0_t * emp) ems = &mca_ptl_elan_global_state; /* Hook two of them togther */ - ems->elan_module = emp; + ems->elan_component = emp; emp->elan_ctrl = ems; /* Initialise enough of state so we can call elan_exception() */ @@ -536,7 +539,7 @@ ompi_mca_ptl_elan_init (mca_ptl_elan_module_1_0_0_t * emp) } int -ompi_mca_ptl_elan_finalize (mca_ptl_elan_module_1_0_0_t * emp) +ompi_mca_ptl_elan_finalize (mca_ptl_elan_component_t * emp) { int i; int num_rails; diff --git a/src/mca/ptl/elan/src/ptl_elan_peer.h b/src/mca/ptl/elan/src/ptl_elan_peer.h index e01ef1b38b..c06d53cfc3 100644 --- a/src/mca/ptl/elan/src/ptl_elan_peer.h +++ b/src/mca/ptl/elan/src/ptl_elan_peer.h @@ -22,7 +22,7 @@ struct mca_ptl_elan_peer_t { ompi_list_item_t super; - struct mca_ptl_elan_t* peer_ptl; + struct mca_ptl_elan_module_t* peer_ptl; struct mca_ptl_elan_proc_t* peer_proc; int peer_vp; diff --git a/src/mca/ptl/elan/src/ptl_elan_priv.c b/src/mca/ptl/elan/src/ptl_elan_priv.c index 86100d66f6..446b50bf7c 100644 --- a/src/mca/ptl/elan/src/ptl_elan_priv.c +++ b/src/mca/ptl/elan/src/ptl_elan_priv.c @@ -1,3 +1,7 @@ +/* + * $HEADER$ + */ + #include #include #include @@ -13,7 +17,7 @@ static void mca_ptl_elan_init_qdma_desc (struct ompi_ptl_elan_qdma_desc_t *desc, - mca_ptl_elan_t * ptl, + mca_ptl_elan_module_t * ptl, struct mca_ptl_elan_peer_t *ptl_peer, mca_pml_base_send_request_t *pml_req, size_t offset, @@ -70,7 +74,7 @@ mca_ptl_elan_init_qdma_desc (struct ompi_ptl_elan_qdma_desc_t *desc, struct iovec iov; ompi_convertor_t *convertor; - if( offset <= mca_ptl_elan.super.ptl_first_frag_size ) { + if( offset <= mca_ptl_elan_module.super.ptl_first_frag_size ) { convertor = &pml_req->req_convertor; } else { convertor = &desc->frag_convertor; @@ -142,7 +146,7 @@ mca_ptl_elan_start_desc (mca_ptl_elan_send_frag_t * desc, size_t *size, int flags) { - mca_ptl_elan_t *ptl; + mca_ptl_elan_module_t *ptl; START_FUNC(); @@ -184,7 +188,7 @@ mca_ptl_elan_start_desc (mca_ptl_elan_send_frag_t * desc, static void -mca_ptl_elan_data_frag (struct mca_ptl_elan_t *ptl, +mca_ptl_elan_data_frag (struct mca_ptl_elan_module_t *ptl, mca_ptl_base_header_t * header) { /* For PML interfacing, refer to mca_ptl_tcp_recv_frag_match(frag, sd);*/ @@ -197,7 +201,8 @@ mca_ptl_elan_data_frag (struct mca_ptl_elan_t *ptl, bool matched; int rc = OMPI_SUCCESS; - OMPI_FREE_LIST_GET (&mca_ptl_elan_module.elan_recv_frags_free, item, rc); + OMPI_FREE_LIST_GET (&mca_ptl_elan_component.elan_recv_frags_free, + item, rc); while (OMPI_SUCCESS != rc) { @@ -205,12 +210,12 @@ mca_ptl_elan_data_frag (struct mca_ptl_elan_t *ptl, ompi_output (0, "[%s:%d] Retry to allocate a recv fragment", __FILE__, __LINE__); - OMPI_FREE_LIST_GET (&mca_ptl_elan_module.elan_recv_frags_free, + OMPI_FREE_LIST_GET (&mca_ptl_elan_component.elan_recv_frags_free, item, rc); } recv_frag = (mca_ptl_elan_recv_frag_t *) item; - recv_frag->frag_recv.frag_base.frag_owner = (mca_ptl_t *) ptl; + recv_frag->frag_recv.frag_base.frag_owner = (mca_ptl_base_module_t *) ptl; /* XXX: * Since elan is not connection oriented, @@ -252,7 +257,7 @@ mca_ptl_elan_data_frag (struct mca_ptl_elan_t *ptl, } static void -mca_ptl_elan_ctrl_frag (struct mca_ptl_elan_t *ptl, +mca_ptl_elan_ctrl_frag (struct mca_ptl_elan_module_t *ptl, mca_ptl_base_header_t * header) { /* TODO: @@ -265,25 +270,25 @@ mca_ptl_elan_ctrl_frag (struct mca_ptl_elan_t *ptl, } int -mca_ptl_elan_drain_recv (mca_ptl_elan_module_1_0_0_t * emp) +mca_ptl_elan_drain_recv (mca_ptl_elan_component_t * emp) { struct ompi_ptl_elan_queue_ctrl_t *queue; ompi_ptl_elan_recv_queue_t *rxq; - struct mca_ptl_elan_t *ptl; + struct mca_ptl_elan_module_t *ptl; ELAN_CTX *ctx; - int num_ptls; + int num_ptl_modules; int i; int rc; START_FUNC(); - num_ptls = emp->elan_num_ptls; + num_ptl_modules = emp->elan_num_ptl_modules; /* Iterate over all the PTL input Queues */ - for (i = 0; i < num_ptls; i++) { + for (i = 0; i < num_ptl_modules; i++) { - ptl = emp->elan_ptls[i]; - queue = emp->elan_ptls[i]->queue; + ptl = emp->elan_ptl_modules[i]; + queue = emp->elan_ptl_modules[i]->queue; rxq = queue->rxq; ctx = ptl->ptl_elan_ctx; @@ -372,25 +377,25 @@ mca_ptl_elan_drain_recv (mca_ptl_elan_module_1_0_0_t * emp) } int -mca_ptl_elan_update_send (mca_ptl_elan_module_1_0_0_t * emp) +mca_ptl_elan_update_send (mca_ptl_elan_component_t * emp) { - struct mca_ptl_elan_t *ptl; + struct mca_ptl_elan_module_t *ptl; ompi_ptl_elan_queue_ctrl_t *queue; mca_ptl_elan_send_frag_t *desc; ELAN4_CTX *ctx; - int num_ptls; + int num_ptl_modules; int i; int rc = 0; START_FUNC(); - num_ptls = emp->elan_num_ptls; + num_ptl_modules = emp->elan_num_ptl_modules; /* Update the send request if any of send's is completed */ - for (i = 0; i < num_ptls; i++) { + for (i = 0; i < num_ptl_modules; i++) { - ptl = emp->elan_ptls[i]; + ptl = emp->elan_ptl_modules[i]; queue = ptl->queue; ctx = ptl->ptl_elan_ctx; diff --git a/src/mca/ptl/elan/src/ptl_elan_priv.h b/src/mca/ptl/elan/src/ptl_elan_priv.h index 7e27b946e5..3a604132f1 100644 --- a/src/mca/ptl/elan/src/ptl_elan_priv.h +++ b/src/mca/ptl/elan/src/ptl_elan_priv.h @@ -156,7 +156,7 @@ struct ompi_ptl_elan_qdma_desc_t { ELAN_BASE_DESC_FIELDS /* 8 byte aligned */ - mca_ptl_elan_t *ptl; + mca_ptl_elan_module_t *ptl; RAIL *rail; /* 8 byte aligned */ @@ -241,7 +241,7 @@ struct mca_ptl_elan_state_t { RAIL **all_rails; /**< all rails */ int *rail_intcookie; /**< record the cookies for the rail */ ADDR_SDRAM *all_estates; - mca_ptl_elan_module_1_0_0_t *elan_module; + mca_ptl_elan_component_t *elan_component; }; typedef struct mca_ptl_elan_state_t mca_ptl_elan_state_t; @@ -250,15 +250,15 @@ ELAN_SLEEP *ompi_init_elan_sleepdesc (mca_ptl_elan_state_t * ems, RAIL * rail); /* Initialization and finalization routines */ -int ompi_mca_ptl_elan_init (mca_ptl_elan_module_1_0_0_t * emp); -int ompi_mca_ptl_elan_finalize (mca_ptl_elan_module_1_0_0_t * emp); +int ompi_mca_ptl_elan_init (mca_ptl_elan_component_t * emp); +int ompi_mca_ptl_elan_finalize (mca_ptl_elan_component_t * emp); /* communication initialization prototypes */ -int ompi_init_elan_qdma (mca_ptl_elan_module_1_0_0_t * emp, +int ompi_init_elan_qdma (mca_ptl_elan_component_t * emp, int num_rails); -int ompi_init_elan_rdma (mca_ptl_elan_module_1_0_0_t * emp, +int ompi_init_elan_rdma (mca_ptl_elan_component_t * emp, int num_rails); -int ompi_init_elan_stat (mca_ptl_elan_module_1_0_0_t * emp, +int ompi_init_elan_stat (mca_ptl_elan_component_t * emp, int num_rails); /* communication prototypes */ @@ -273,8 +273,8 @@ int mca_ptl_elan_poll_desc(mca_ptl_elan_send_frag_t *desc); int mca_ptl_elan_wait_desc(mca_ptl_elan_send_frag_t *desc); /* control, synchronization and state prototypes */ -int mca_ptl_elan_drain_recv(mca_ptl_elan_module_1_0_0_t *emp); -int mca_ptl_elan_update_send(mca_ptl_elan_module_1_0_0_t *emp); +int mca_ptl_elan_drain_recv(mca_ptl_elan_component_t *emp); +int mca_ptl_elan_update_send(mca_ptl_elan_component_t *emp); /** * utility routines for parameter registration diff --git a/src/mca/ptl/elan/src/ptl_elan_proc.c b/src/mca/ptl/elan/src/ptl_elan_proc.c index d8334eeb44..9f3f658802 100644 --- a/src/mca/ptl/elan/src/ptl_elan_proc.c +++ b/src/mca/ptl/elan/src/ptl_elan_proc.c @@ -42,9 +42,9 @@ mca_ptl_elan_proc_construct (mca_ptl_elan_proc_t * proc) OBJ_CONSTRUCT (&proc->proc_lock, ompi_mutex_t); /* add to list of all proc instance */ - OMPI_THREAD_LOCK (&mca_ptl_elan_module.elan_lock); - ompi_list_append (&mca_ptl_elan_module.elan_procs, &proc->super); - OMPI_THREAD_UNLOCK (&mca_ptl_elan_module.elan_lock); + OMPI_THREAD_LOCK (&mca_ptl_elan_component.elan_lock); + ompi_list_append (&mca_ptl_elan_component.elan_procs, &proc->super); + OMPI_THREAD_UNLOCK (&mca_ptl_elan_component.elan_lock); return; } @@ -58,9 +58,9 @@ void mca_ptl_elan_proc_destruct (mca_ptl_elan_proc_t * proc) { /* remove from list of all proc instances */ - OMPI_THREAD_LOCK (&mca_ptl_elan_module.elan_lock); - ompi_list_remove_item (&mca_ptl_elan_module.elan_procs, &proc->super); - OMPI_THREAD_UNLOCK (&mca_ptl_elan_module.elan_lock); + OMPI_THREAD_LOCK (&mca_ptl_elan_component.elan_lock); + ompi_list_remove_item (&mca_ptl_elan_component.elan_procs, &proc->super); + OMPI_THREAD_UNLOCK (&mca_ptl_elan_component.elan_lock); /* release resources */ if (NULL != proc->proc_peers) @@ -95,7 +95,7 @@ mca_ptl_elan_proc_create (ompi_proc_t * ompi_proc) ptl_proc->proc_guid = ompi_proc->proc_name; /* Extract exposed addresses from remote proc */ - rc = mca_base_modex_recv (&mca_ptl_elan_module.super.ptlm_version, + rc = mca_base_modex_recv (&mca_ptl_elan_component.super.ptlm_version, ompi_proc, (void **) &ptl_proc->proc_addrs, &size); @@ -126,9 +126,9 @@ mca_ptl_elan_proc_create (ompi_proc_t * ompi_proc) return NULL; } - if (NULL == mca_ptl_elan_module.elan_local + if (NULL == mca_ptl_elan_component.elan_local && ompi_proc == ompi_proc_local ()) { - mca_ptl_elan_module.elan_local = ptl_proc; + mca_ptl_elan_component.elan_local = ptl_proc; } return ptl_proc; } @@ -142,21 +142,21 @@ mca_ptl_elan_proc_lookup_ompi (ompi_proc_t * ompi_proc) { mca_ptl_elan_proc_t *elan_proc; - OMPI_THREAD_LOCK (&mca_ptl_elan_module.elan_lock); + OMPI_THREAD_LOCK (&mca_ptl_elan_component.elan_lock); elan_proc = (mca_ptl_elan_proc_t *) - ompi_list_get_first (&mca_ptl_elan_module.elan_procs); + ompi_list_get_first (&mca_ptl_elan_component.elan_procs); for (; elan_proc != (mca_ptl_elan_proc_t *) - ompi_list_get_end (&mca_ptl_elan_module.elan_procs); + ompi_list_get_end (&mca_ptl_elan_component.elan_procs); elan_proc = (mca_ptl_elan_proc_t *) ompi_list_get_next (elan_proc)) { if (elan_proc->proc_ompi == ompi_proc) { - OMPI_THREAD_UNLOCK (&mca_ptl_elan_module.elan_lock); + OMPI_THREAD_UNLOCK (&mca_ptl_elan_component.elan_lock); return elan_proc; } } - OMPI_THREAD_UNLOCK (&mca_ptl_elan_module.elan_lock); + OMPI_THREAD_UNLOCK (&mca_ptl_elan_component.elan_lock); return NULL; }