Skip to content

Commit 60089f4

Browse files
committed
Fixed merge issues, and minor pull-request comments
modified: ../orte/mca/rml/base/base.h modified: ../orte/mca/rml/base/rml_base_frame.c modified: ../orte/mca/rml/ofi/rml_ofi.h modified: ../orte/mca/rml/ofi/rml_ofi_component.c
1 parent 048bbdc commit 60089f4

File tree

4 files changed

+17
-171
lines changed

4 files changed

+17
-171
lines changed

orte/mca/rml/base/base.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,6 @@ typedef struct {
145145
opal_object_t super;
146146
opal_event_t ev;
147147
orte_rml_send_t send;
148-
//[Anandhi] fix this, maybe define this withing ofi?
149-
/* ofi_prov_id */
150-
orte_rml_conduit_t ofi_prov_id;
151148
} orte_rml_send_request_t;
152149
OBJ_CLASS_DECLARATION(orte_rml_send_request_t);
153150

orte/mca/rml/base/rml_base_frame.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -205,31 +205,6 @@ int orte_rml_base_select(void)
205205
}
206206
}
207207

208-
/* Open the default oob conduit */
209-
/*opal_output_verbose(10, orte_rml_base_framework.framework_output,
210-
"%s Opening the default conduit - oob component",
211-
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); */
212-
opal_output_verbose(10, orte_rml_base_framework.framework_output,
213-
"%s Opening the default conduit ",
214-
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME));
215-
OBJ_CONSTRUCT(&conduit_attr, opal_list_t);
216-
217-
orte_set_attribute(&conduit_attr, ORTE_RML_INCLUDE_COMP_ATTRIB, ORTE_ATTR_LOCAL,"oob",OPAL_STRING);
218-
/* To set the default conduit to ofi-sockets, comment above line and uncomment below 2 lines*/
219-
//orte_set_attribute( &conduit_attr, ORTE_RML_INCLUDE_COMP_ATTRIB, ORTE_ATTR_GLOBAL,"ofi",OPAL_STRING);
220-
//orte_set_attribute( &conduit_attr, ORTE_RML_PROVIDER_ATTRIB, ORTE_ATTR_GLOBAL,"sockets",OPAL_STRING);
221-
222-
orte_rml_base.def_conduit_id = orte_rml_API_open_conduit(&conduit_attr);
223-
OPAL_LIST_DESTRUCT(&conduit_attr);
224-
if (0 <= orte_rml_base.def_conduit_id) {
225-
opal_output_verbose(10, orte_rml_base_framework.framework_output,
226-
"%s Default conduit opened with conduit id = %d",
227-
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), orte_rml_base.def_conduit_id);
228-
} else {
229-
opal_output_verbose(1, orte_rml_base_framework.framework_output,
230-
"%s Default conduit could not be opened",
231-
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME));
232-
}
233208
return ORTE_SUCCESS;
234209
}
235210

orte/mca/rml/ofi/rml_ofi.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232

3333
/** RML/OFI key values **/
3434
/* (char*) ofi socket address (type IN) of the node process is running on */
35-
#define OPAL_RML_OFI_FI_SOCKADDR_IN "rml.ofi.fisockaddrin"
35+
#define OPAL_RML_OFI_FI_SOCKADDR_IN "rml.ofi.fisockaddrin"
3636
/* (char*) ofi socket address (type PSM) of the node process is running on */
37-
#define OPAL_RML_OFI_FI_ADDR_PSMX "rml.ofi.fiaddrpsmx"
37+
#define OPAL_RML_OFI_FI_ADDR_PSMX "rml.ofi.fiaddrpsmx"
3838

3939
// MULTI_BUF_SIZE_FACTOR defines how large the multi recv buffer will be.
4040
// In order to use FI_MULTI_RECV feature efficiently, we need to have a

orte/mca/rml/ofi/rml_ofi_component.c

Lines changed: 15 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
#include "rml_ofi.h"
3030

31+
3132
static int rml_ofi_component_open(void);
3233
static int rml_ofi_component_close(void);
3334
static orte_rml_base_module_t* open_conduit(opal_list_t *attributes);
@@ -325,7 +326,6 @@ void print_provider_list_info (struct fi_info *fi )
325326
* This returns all the supported transports in the system that support endpoint type RDM (reliable datagram)
326327
* The providers returned is a list of type opal_valut_t holding opal_list_t
327328
*/
328-
/*[Anandhi] old defn static int orte_rml_ofi_query_transports(opal_value_t **providers) */
329329
static orte_rml_pathway_t* query_transports(void)
330330
{
331331
opal_list_t *ofi_prov = NULL;
@@ -334,139 +334,11 @@ static orte_rml_pathway_t* query_transports(void)
334334
int ret = 0, ofi_prov_num = 0;
335335

336336
opal_output_verbose(10,orte_rml_base_framework.framework_output,
337-
"\n%s:%d OFI Query Interface not implemented",__FILE__,__LINE__);
338-
/* [Anandhi] comment fully for now, as this implementation is for old defn needs to be re-written
339-
opal_output_verbose(10,orte_rml_base_framework.framework_output,
340-
" %s -Begin of query_transports()",ORTE_NAME_PRINT(ORTE_PROC_MY_NAME) );
341-
if ( NULL == *providers)
342-
{
343-
*providers = OBJ_NEW(opal_value_t);
344-
}
345-
346-
providers_list = *providers;
347-
348-
//Create the opal_value_t list in which each item is an opal_list_t that holds the provider details
349-
opal_output_verbose(10,orte_rml_base_framework.framework_output,
350-
"Starting to add the providers in a loop from orte_rml_ofi.ofi_prov[] %s:%d",__FILE__,__LINE__);
337+
"%s:%d OFI Query Interface not implemented",__FILE__,__LINE__);
351338

352-
for ( ofi_prov_num = 0; ofi_prov_num < orte_rml_ofi.ofi_prov_open_num ; ofi_prov_num++ ) {
353-
cur_fi = orte_rml_ofi.ofi_prov[ofi_prov_num].fabric_info;
354-
if( NULL != prev_provider)
355-
{
356-
//if there is another provider in the array, then add another item to the providers_list
357-
next_provider = OBJ_NEW(opal_value_t);
358-
providers_list->super.opal_list_next = &next_provider->super;
359-
providers_list->super.opal_list_prev = &prev_provider->super;
360-
providers_list = (opal_value_t *)providers_list->super.opal_list_next;
361-
}
362-
363-
/* populate the opal_list_t *ofi_prov with provider details from the
364-
* orte_rml_ofi.fi_info_list array populated in the rml_ofi_component_init() fn.*/
365-
/* ofi_prov = OBJ_NEW(opal_list_t);
366-
opal_output_verbose(10,orte_rml_base_framework.framework_output,
367-
"\n loading the attribute ORTE_PROVIDER_ID");
368-
if( ORTE_SUCCESS !=
369-
(ret = orte_set_attribute( ofi_prov, ORTE_PROVIDER_ID, ORTE_ATTR_GLOBAL,
370-
(void *)&orte_rml_ofi.ofi_prov[ofi_prov_num].ofi_prov_id ,OPAL_UINT8))) {
371-
opal_output_verbose(1,orte_rml_base_framework.framework_output,
372-
"%s:%d Not able to add provider ofi_prov_id ",__FILE__,__LINE__);
373-
return ORTE_ERROR;
374-
}
375-
opal_output_verbose(10,orte_rml_base_framework.framework_output,
376-
"\n provider ofi_prov_id : %d",orte_rml_ofi.ofi_prov[ofi_prov_num].ofi_prov_id);
377-
opal_output_verbose(10,orte_rml_base_framework.framework_output,
378-
"\n loading the attribute ORTE_PROV_NAME");
379-
if( ORTE_SUCCESS ==
380-
(ret = orte_set_attribute( ofi_prov, ORTE_PROV_NAME, ORTE_ATTR_GLOBAL,cur_fi->fabric_attr->prov_name ,OPAL_STRING))) {
381-
opal_output_verbose(10,orte_rml_base_framework.framework_output,
382-
"\n loading the attribute ORTE_PROTOCOL %s",fi_tostr(&cur_fi->ep_attr->protocol,FI_TYPE_PROTOCOL));
383-
if( ORTE_SUCCESS ==
384-
(ret = orte_set_attribute( ofi_prov, ORTE_PROTOCOL, ORTE_ATTR_GLOBAL,(void *)&cur_fi->ep_attr->protocol ,OPAL_UINT32))) {
385-
// insert the opal_list_t into opal_value_t list
386-
opal_value_load(providers_list,ofi_prov,OPAL_PTR);
387-
opal_output_verbose(10,orte_rml_base_framework.framework_output,
388-
"\n loading the provider opal_list_t* prov=%x into opal_value_t list successful",
389-
ofi_prov);
390-
} else {
391-
opal_output_verbose(1,orte_rml_base_framework.framework_output,
392-
"%s:%d Not able to add provider name ",__FILE__,__LINE__);
393-
return ORTE_ERROR;
394-
}
395-
} else {
396-
opal_output_verbose(1,orte_rml_base_framework.framework_output,
397-
"%s:%d Not able to add provider name ",__FILE__,__LINE__);
398-
return ORTE_ERROR;
399-
}
400-
401-
prev_provider = providers_list;
402-
cur_fi = cur_fi->next;
403-
}
404-
405-
opal_output_verbose(10,orte_rml_base_framework.framework_output,
406-
"\n%s:%d Completed Query Interface",__FILE__,__LINE__);*/
407339
return ORTE_SUCCESS;
408340
}
409341

410-
411-
/*debug routine to print the opal_value_t returned by query interface */
412-
/* [Anandhi] - this has to be re-written
413-
void print_transports_query()
414-
{
415-
opal_value_t *providers=NULL;
416-
char* prov_name = NULL;
417-
int ret;
418-
int32_t *protocol_ptr, protocol;
419-
int8_t* prov_num;
420-
421-
protocol_ptr = &protocol;
422-
423-
opal_output_verbose(10,orte_rml_base_framework.framework_output,
424-
"\n print_transports_query() Begin- %s:%d",__FILE__,__LINE__);
425-
opal_output_verbose(10,orte_rml_base_framework.framework_output,
426-
"\n calling the orte_rml_ofi_query_transports() ");
427-
if( ORTE_SUCCESS == orte_rml_ofi_query_transports(&providers))
428-
{
429-
opal_output_verbose(20,orte_rml_base_framework.framework_output,
430-
"\n query_transports() completed, printing details\n");
431-
while (providers)
432-
{
433-
//get the first opal_list_t;
434-
opal_list_t *prov;
435-
ret = opal_value_unload(providers,(void **)&prov,OPAL_PTR);
436-
if (ret == OPAL_SUCCESS) {
437-
if( orte_get_attribute( prov, ORTE_PROVIDER_ID, (void **)&prov_num,OPAL_UINT8)) {
438-
opal_output_verbose(10,orte_rml_base_framework.framework_output,
439-
"\n OFI Provider ofi_prov_id : %d",*prov_num);
440-
}
441-
if( orte_get_attribute( prov, ORTE_PROTOCOL, (void **)&protocol_ptr,OPAL_UINT32)) {
442-
opal_output_verbose(10,orte_rml_base_framework.framework_output,
443-
"\n Protocol : %d", *protocol_ptr);
444-
}
445-
if( orte_get_attribute( prov, ORTE_PROV_NAME, (void **)&prov_name ,OPAL_STRING)) {
446-
opal_output_verbose(10,orte_rml_base_framework.framework_output,
447-
"\n Provider name : %s",prov_name);
448-
} else {
449-
opal_output_verbose(10,orte_rml_base_framework.framework_output,
450-
"\n Error in getting Provider name");
451-
}
452-
} else {
453-
opal_output_verbose(1,orte_rml_base_framework.framework_output,
454-
"\n %s:%d opal_value_unload() failed, opal_list* prov = %x",
455-
__FILE__,__LINE__,prov);
456-
}
457-
providers = (opal_value_t *)providers->super.opal_list_next;
458-
}
459-
} else {
460-
opal_output_verbose(10,orte_rml_base_framework.framework_output,
461-
"\n query_transports() returned Error ");
462-
}
463-
opal_output_verbose(10,orte_rml_base_framework.framework_output,
464-
"\n End of print_transports_query() \n");
465-
}
466-
*/
467-
468-
469-
470342
/**
471343
ofi_prov [in]: the ofi ofi_prov_id that triggered the progress fn
472344
**/
@@ -640,7 +512,7 @@ int cq_progress_handler(int sd, short flags, void *cbdata)
640512
/*
641513
* Returns the number of ofi-providers available
642514
*/
643-
int rml_ofi_component_init()
515+
int rml_ofi_component_init(void)
644516
{
645517
int ret, fi_version;
646518
struct fi_info *hints, *fabric_info;
@@ -1165,7 +1037,7 @@ static orte_rml_base_module_t* make_module( int ofi_prov_id)
11651037
* ORTE_RML_PROVIDER_ATTRIB */
11661038
static orte_rml_base_module_t* open_conduit(opal_list_t *attributes)
11671039
{
1168-
char *comp_attrib = NULL;
1040+
char *comp_attrib = NULL;
11691041
char **comps;
11701042
int i;
11711043
orte_attribute_t *attr;
@@ -1220,6 +1092,7 @@ char *comp_attrib = NULL;
12201092
/* Alternatively, check the attributes to see if we qualify - we only handle
12211093
* "pt2pt" */
12221094
OPAL_LIST_FOREACH(attr, attributes, orte_attribute_t) {
1095+
/* [TODO] add any additional attributes check here */
12231096

12241097
}
12251098

@@ -1231,7 +1104,6 @@ char *comp_attrib = NULL;
12311104
}
12321105

12331106

1234-
12351107
static void orte_rml_ofi_fini(void *mod)
12361108
{
12371109
opal_list_item_t *item;
@@ -1370,9 +1242,9 @@ static void process_uri( char *uri)
13701242
* the first containing the process name of our peer
13711243
* and all others containing the OOB contact info
13721244
*/
1373-
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
1245+
//[Anandhi] debug -> ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
13741246
return;
1375-
}
1247+
}
13761248
*cptr = '\0';
13771249
cptr++;
13781250

@@ -1474,9 +1346,10 @@ static void process_uri( char *uri)
14741346
/* converts the socket uri returned by get_contact_info into sockaddr_in */
14751347
void convert_to_sockaddr( char *ofiuri, struct sockaddr_in* ep_sockaddr)
14761348
{
1477-
char *tmp, *sin_fly, *sin_port, *sin_addr;
1478-
short port;
1479-
int res;
1349+
char *tmp, *sin_fly, *sin_port, *sin_addr;
1350+
short port;
1351+
int res;
1352+
14801353
tmp = strchr(ofiuri,':');
14811354
sin_fly = tmp+1;
14821355
tmp = strchr(sin_fly,',');
@@ -1494,7 +1367,8 @@ int res;
14941367
ep_sockaddr->sin_port = htons(port);
14951368
res = inet_aton(sin_addr,(struct in_addr *)&ep_sockaddr->sin_addr);
14961369

1497-
opal_output_verbose(1,orte_rml_base_framework.framework_output,
1498-
"%s OFI convert_to_sockaddr() port = 0x%x, InternetAddr = %s ",
1499-
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),ntohs(ep_sockaddr->sin_port),inet_ntoa(ep_sockaddr->sin_addr));
1370+
opal_output_verbose(1,orte_rml_base_framework.framework_output,
1371+
"%s OFI convert_to_sockaddr() port = 0x%x, InternetAddr = %s ",
1372+
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),ntohs(ep_sockaddr->sin_port),
1373+
inet_ntoa(ep_sockaddr->sin_addr));
15001374
}

0 commit comments

Comments
 (0)