1010#include "orte_config.h"
1111
1212#include "opal/dss/dss_types.h"
13+ #include "opal/util/net.h"
1314#include "opal/util/output.h"
1415#include "opal/mca/event/event.h"
1516
@@ -369,7 +370,7 @@ int orte_rml_ofi_recv_handler(struct fi_cq_data_entry *wc, uint8_t ofi_prov_id)
369370/* populate_peer_ofi_addr
370371 * [Desc] This fn does a PMIx Modex recv on "rml.ofi" key
371372 * to get the ofi address blob of all providers on the peer.
372- * Then it populates the array parameter peer_ofi_addr[]
373+ * Then it populates the array parameter peer_ofi_addr[]
373374 * with providername, ofi_ep_name and ofi_ep_namelen
374375 * [in] peer -> peer address
375376 * [out] peer_ofi_addr[] -> array to hold the provider details on the peer
@@ -451,18 +452,18 @@ static int populate_peer_ofi_addr(orte_process_name_t *peer, orte_rml_ofi_peer_t
451452}
452453
453454
454- /* check_provider_in_peer(prov_name, peer_ofi_addr)
455+ /* check_provider_in_peer(prov_name, peer_ofi_addr)
455456 * [Desc] This fn checks for a match of prov_name in the peer_ofi_addr array
456457 * and returns the index of the match or OPAL_ERROR if not found.
457458 * The peer_ofi_addr array has all the ofi providers in peer.
458459 * [in] prov_name -> The provider name we want to use to send this message to peer.
459460 * [in] tot_prov -> total provider entries in array
460461 * [in] peer_ofi_addr[] -> array of provider details on the peer
461- * [in] local_ofi_prov_idx -> the index of local provider we are comparing with
462+ * [in] local_ofi_prov_idx -> the index of local provider we are comparing with
462463 * (index into orte_rml_ofi.ofi_prov[] array.
463464 * [Return value] -> index that matches provider on success. OPAL_ERROR if no match found.
464465 */
465- static int check_provider_in_peer ( char * prov_name , int tot_prov , orte_rml_ofi_peer_t * peer_ofi_addr , int local_ofi_prov_idx )
466+ static int check_provider_in_peer ( char * prov_name , int tot_prov , orte_rml_ofi_peer_t * peer_ofi_addr , int local_ofi_prov_idx )
466467{
467468 int idx ;
468469 int ret = OPAL_ERROR ;
@@ -495,7 +496,7 @@ static int check_provider_in_peer( char *prov_name, int tot_prov, orte_rml_ofi_p
495496 } else {
496497 ret = idx ;
497498 break ;
498- }
499+ }
499500 }
500501 }
501502 return ret ;
@@ -519,7 +520,7 @@ static void send_msg(int fd, short args, void *cbdata)
519520 orte_rml_ofi_peer_t * pr ;
520521 uint64_t ui64 ;
521522 struct sockaddr_in * ep_sockaddr ;
522-
523+
523524 snd = OBJ_NEW (orte_rml_send_t );
524525 snd -> dst = * peer ;
525526 snd -> origin = * ORTE_PROC_MY_NAME ;
@@ -565,19 +566,19 @@ static void send_msg(int fd, short args, void *cbdata)
565566 return ;
566567 }
567568 /* decide the provider we want to use from the list of providers in peer as per below order.
568- * 1. if the user specified the transport for this conduit (even giving us a prioritized list of candidates),
569- * then the one we selected is the _only_ one we will use. If the remote peer has a matching endpoint,
569+ * 1. if the user specified the transport for this conduit (even giving us a prioritized list of candidates),
570+ * then the one we selected is the _only_ one we will use. If the remote peer has a matching endpoint,
570571 * then we use it - otherwise, we error out
571- * 2. if the user did not specify a transport, then we look for matches against _all_ of
572+ * 2. if the user did not specify a transport, then we look for matches against _all_ of
572573 * our available transports, starting with fabric and then going to Ethernet, taking the first one that matches.
573574 * 3. if we cannot find any match, then we error out
574575 */
575576 if ( true == user_override () ) {
576- /*case 1. User has specified the provider, find a match in peer for the current selected provider or error out*/
577+ /*case 1. User has specified the provider, find a match in peer for the current selected provider or error out*/
577578 opal_output_verbose (1 , orte_rml_base_framework .framework_output ,
578579 "%s rml:ofi::send_msg() Case1. looking for a match for current provider" ,
579580 ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ));
580- if ( OPAL_ERROR == ( peer_prov_id = check_provider_in_peer ( orte_rml_ofi .ofi_prov [ofi_prov_id ].fabric_info -> fabric_attr -> prov_name ,
581+ if ( OPAL_ERROR == ( peer_prov_id = check_provider_in_peer ( orte_rml_ofi .ofi_prov [ofi_prov_id ].fabric_info -> fabric_attr -> prov_name ,
581582 tot_peer_prov , peer_ofi_addr , ofi_prov_id ) )) {
582583 opal_output_verbose (1 , orte_rml_base_framework .framework_output ,
583584 "%s rml:ofi::send_msg() Peer is Unreachable - no common ofi provider " ,
@@ -595,8 +596,8 @@ static void send_msg(int fd, short args, void *cbdata)
595596 ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ));
596597 for (int cur_prov_id = 0 ; cur_prov_id < orte_rml_ofi .ofi_prov_open_num && !peer_match_found ; cur_prov_id ++ ) {
597598 if ( 0 != strcmp ( orte_rml_ofi .ofi_prov [cur_prov_id ].fabric_info -> fabric_attr -> prov_name , "sockets" ) ) {
598- peer_prov_id = check_provider_in_peer ( orte_rml_ofi .ofi_prov [cur_prov_id ].fabric_info -> fabric_attr -> prov_name ,
599- tot_peer_prov , peer_ofi_addr , cur_prov_id );
599+ peer_prov_id = check_provider_in_peer ( orte_rml_ofi .ofi_prov [cur_prov_id ].fabric_info -> fabric_attr -> prov_name ,
600+ tot_peer_prov , peer_ofi_addr , cur_prov_id );
600601 if (OPAL_ERROR != peer_prov_id ) {
601602 peer_match_found = true;
602603 ofi_prov_id = cur_prov_id ;
@@ -609,7 +610,7 @@ static void send_msg(int fd, short args, void *cbdata)
609610 ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ));
610611 for (int cur_prov_id = 0 ; cur_prov_id < orte_rml_ofi .ofi_prov_open_num && !peer_match_found ; cur_prov_id ++ ) {
611612 if ( 0 == strcmp ( orte_rml_ofi .ofi_prov [cur_prov_id ].fabric_info -> fabric_attr -> prov_name , "sockets" ) ) {
612- peer_prov_id = check_provider_in_peer ( orte_rml_ofi .ofi_prov [cur_prov_id ].fabric_info -> fabric_attr -> prov_name ,
613+ peer_prov_id = check_provider_in_peer ( orte_rml_ofi .ofi_prov [cur_prov_id ].fabric_info -> fabric_attr -> prov_name ,
613614 tot_peer_prov , peer_ofi_addr , cur_prov_id );
614615 if (OPAL_ERROR != peer_prov_id ) {
615616 peer_match_found = true;
@@ -628,15 +629,15 @@ static void send_msg(int fd, short args, void *cbdata)
628629 return ;
629630 }
630631 }
631- /* creating a copy of the chosen provider to put it in hashtable
632- * as the ofi_peer_addr array is local */
632+ /* creating a copy of the chosen provider to put it in hashtable
633+ * as the ofi_peer_addr array is local */
633634 pr = OBJ_NEW (orte_rml_ofi_peer_t );
634635 pr -> ofi_ep_len = peer_ofi_addr [peer_prov_id ].ofi_ep_len ;
635636 pr -> ofi_ep = malloc (pr -> ofi_ep_len );
636637 memcpy (pr -> ofi_ep ,peer_ofi_addr [peer_prov_id ].ofi_ep ,pr -> ofi_ep_len );
637638 pr -> ofi_prov_name = strdup (peer_ofi_addr [peer_prov_id ].ofi_prov_name );
638639 pr -> src_prov_id = ofi_prov_id ;
639- if (OPAL_SUCCESS !=
640+ if (OPAL_SUCCESS !=
640641 (rc = opal_hash_table_set_value_uint64 (& orte_rml_ofi .peers , ui64 , (void * )pr ))) {
641642 opal_output_verbose (15 , orte_rml_base_framework .framework_output ,
642643 "%s: ofi address insertion into hash table failed for peer %s " ,
@@ -653,7 +654,7 @@ static void send_msg(int fd, short args, void *cbdata)
653654 opal_output_verbose (1 , orte_rml_base_framework .framework_output ,
654655 "%s rml:ofi: OFI peer contact info got from hash table" ,
655656 ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ));
656- dest_ep_name = pr -> ofi_ep ;
657+ dest_ep_name = pr -> ofi_ep ;
657658 dest_ep_namelen = pr -> ofi_ep_len ;
658659 ofi_prov_id = pr -> src_prov_id ;
659660 }
0 commit comments