@@ -134,12 +134,6 @@ void free_ofi_prov_resources( int ofi_prov_id)
134
134
opal_output_verbose (10 ,orte_rml_base_framework .framework_output ,
135
135
" %s - close ep" ,ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ));
136
136
CLOSE_FID (orte_rml_ofi .ofi_prov [ofi_prov_id ].ep );
137
- if (ret )
138
- {
139
- opal_output_verbose (10 ,orte_rml_base_framework .framework_output ,
140
- " %s - fi_close(ep) failed with error- %d" ,
141
- ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ),ret );
142
- }
143
137
}
144
138
if (orte_rml_ofi .ofi_prov [ofi_prov_id ].mr_multi_recv ) {
145
139
opal_output_verbose (10 ,orte_rml_base_framework .framework_output ,
@@ -745,28 +739,33 @@ static int rml_ofi_component_init(void)
745
739
/* pack the provider's name */
746
740
if (OPAL_SUCCESS != (ret = opal_dss .pack (& entry , & (orte_rml_ofi .ofi_prov [cur_ofi_prov ].fabric_info -> fabric_attr -> prov_name ), 1 , OPAL_STRING ))) {
747
741
OBJ_DESTRUCT (& entry );
742
+ free_ofi_prov_resources (cur_ofi_prov );
748
743
continue ;
749
744
}
750
745
/* pack the provider's local index */
751
746
if (OPAL_SUCCESS != (ret = opal_dss .pack (& entry , & cur_ofi_prov , 1 , OPAL_UINT8 ))) {
752
747
OBJ_DESTRUCT (& entry );
748
+ free_ofi_prov_resources (cur_ofi_prov );
753
749
continue ;
754
750
}
755
751
/* pack the size of the provider's connection blob */
756
752
if (OPAL_SUCCESS != (ret = opal_dss .pack (& entry , & orte_rml_ofi .ofi_prov [cur_ofi_prov ].epnamelen , 1 , OPAL_SIZE ))) {
757
753
OBJ_DESTRUCT (& entry );
754
+ free_ofi_prov_resources (cur_ofi_prov );
758
755
continue ;
759
756
}
760
757
/* pack the blob itself */
761
- if (OPAL_SUCCESS != (ret = opal_dss .pack (& entry , & orte_rml_ofi .ofi_prov [cur_ofi_prov ].ep_name ,
758
+ if (OPAL_SUCCESS != (ret = opal_dss .pack (& entry , orte_rml_ofi .ofi_prov [cur_ofi_prov ].ep_name ,
762
759
orte_rml_ofi .ofi_prov [cur_ofi_prov ].epnamelen , OPAL_BYTE ))) {
763
760
OBJ_DESTRUCT (& entry );
761
+ free_ofi_prov_resources (cur_ofi_prov );
764
762
continue ;
765
763
}
766
764
/* add this entry to the overall modex object */
767
765
eptr = & entry ;
768
766
if (OPAL_SUCCESS != (ret = opal_dss .pack (& modex , & eptr , 1 , OPAL_BUFFER ))) {
769
767
OBJ_DESTRUCT (& entry );
768
+ free_ofi_prov_resources (cur_ofi_prov );
770
769
continue ;
771
770
}
772
771
OBJ_DESTRUCT (& entry );
@@ -789,15 +788,6 @@ static int rml_ofi_component_init(void)
789
788
ntohs (ep_sockaddr -> sin_port ), inet_ntoa (ep_sockaddr -> sin_addr ));
790
789
break ;
791
790
}
792
- /* end of printing opal_modex_string and port, IP */
793
- if (ORTE_SUCCESS != ret ) {
794
- opal_output_verbose (1 , orte_rml_base_framework .framework_output ,
795
- "%s:%d: OPAL_MODEX_SEND failed: %s\n" ,
796
- __FILE__ , __LINE__ , fi_strerror (- ret ));
797
- free_ofi_prov_resources (cur_ofi_prov );
798
- /*abort this current transport, but check if next transport can be opened*/
799
- continue ;
800
- }
801
791
802
792
/**
803
793
* Set the ANY_SRC address.
@@ -944,7 +934,8 @@ int get_ofi_prov_id( opal_list_t *attributes)
944
934
* (or) ORTE_RML_OFI_PROV_NAME key with values "socket" or "OPA"
945
935
* if both above attributes are missing return failure
946
936
*/
947
- if (orte_get_attribute (attributes , ORTE_RML_TRANSPORT_ATTRIB , (void * * )& transport , OPAL_STRING ) ) {
937
+ if (orte_get_attribute (attributes , ORTE_RML_TRANSPORT_ATTRIB , (void * * )& transport , OPAL_STRING ) &&
938
+ NULL != transport ) {
948
939
if ( 0 == strcmp ( transport , "ethernet" ) ) {
949
940
provider = ethernet ;
950
941
} else if ( 0 == strcmp ( transport , "fabric" ) ) {
@@ -953,21 +944,19 @@ int get_ofi_prov_id( opal_list_t *attributes)
953
944
}
954
945
/* if from the transport we don't know which provider we want, then check for the ORTE_RML_OFI_PROV_NAME_ATTRIB */
955
946
if ( NULL == provider ) {
956
- orte_get_attribute (attributes , ORTE_RML_PROVIDER_ATTRIB , (void * * )& provider , OPAL_STRING );
957
- }
958
- if (NULL != provider )
959
- {
960
- // loop the orte_rml_ofi.ofi_provs[] and find the provider name that matches
961
- for ( prov_num = 0 ; prov_num < orte_rml_ofi .ofi_prov_open_num && ofi_prov_id == RML_OFI_PROV_ID_INVALID ; prov_num ++ ) {
962
- cur_fi = orte_rml_ofi .ofi_prov [prov_num ].fabric_info ;
963
- opal_output_verbose (20 ,orte_rml_base_framework .framework_output ,
964
- "%s - get_ofi_prov_id() -> comparing %s = %s " ,
965
- ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ),provider ,cur_fi -> fabric_attr -> prov_name );
966
- if ( strcmp (provider ,cur_fi -> fabric_attr -> prov_name ) == 0 ) {
967
- ofi_prov_id = prov_num ;
947
+ if (orte_get_attribute (attributes , ORTE_RML_PROVIDER_ATTRIB , (void * * )& provider , OPAL_STRING ) &&
948
+ NULL != provider ) {
949
+ // loop the orte_rml_ofi.ofi_provs[] and find the provider name that matches
950
+ for ( prov_num = 0 ; prov_num < orte_rml_ofi .ofi_prov_open_num && ofi_prov_id == RML_OFI_PROV_ID_INVALID ; prov_num ++ ) {
951
+ cur_fi = orte_rml_ofi .ofi_prov [prov_num ].fabric_info ;
952
+ opal_output_verbose (20 ,orte_rml_base_framework .framework_output ,
953
+ "%s - get_ofi_prov_id() -> comparing %s = %s " ,
954
+ ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ),provider ,cur_fi -> fabric_attr -> prov_name );
955
+ if ( strcmp (provider ,cur_fi -> fabric_attr -> prov_name ) == 0 ) {
956
+ ofi_prov_id = prov_num ;
957
+ }
968
958
}
969
959
}
970
-
971
960
}
972
961
973
962
opal_output_verbose (20 ,orte_rml_base_framework .framework_output ,
0 commit comments