@@ -636,7 +636,7 @@ static mca_btl_base_module_t** usnic_component_init(int* num_btl_modules,
636636 /* There are multiple dimensions to consider when requesting an
637637 API version number from libfabric:
638638
639- 1. This code understands libfabric API versions v1.0 through
639+ 1. This code understands libfabric API versions v1.3 through
640640 v1.4.
641641
642642 2. Open MPI may be *compiled* against one version of libfabric,
@@ -684,18 +684,7 @@ static mca_btl_base_module_t** usnic_component_init(int* num_btl_modules,
684684 NOTE: The configure.m4 in this component will require libfabric
685685 >= v1.1.0 (i.e., it won't accept v1.0.0) because it needs
686686 access to the usNIC extension header structures that only
687- became available in v1.1.0.
688-
689- All that being said, the compatibility code with libfabric
690- v1.0.0 in the usNIC BTL has been retained, for two reasons:
691-
692- 1. It's not harmful, nor overly complicated. So the
693- compatibility code was not ripped out.
694- 2. At least some versions of Cisco Open MPI are shipping with
695- an embedded (libfabric v1.0.0+critical bug fix).
696-
697- Someday, #2 may no longer be true, and we may therefore rip out
698- the libfabric v1.0.0 compatibility code. */
687+ became available in v1.1.0.*/
699688
700689 /* First, check to see if the libfabric we are running with is <=
701690 libfabric v1.3. If so, don't bother going further. */
@@ -761,29 +750,6 @@ static mca_btl_base_module_t** usnic_component_init(int* num_btl_modules,
761750 opal_output_verbose (5 , USNIC_OUT ,
762751 "btl:usnic: usNIC fabrics found" );
763752
764- /* Due to ambiguities in documentation, in libfabric v1.0.0 (i.e.,
765- API v1.0) the usnic provider returned sizeof(struct
766- fi_cq_err_entry) from fi_cq_readerr() upon success.
767-
768- The ambiguities were clarified in libfabric v1.1.0 (i.e., API
769- v1.1); the usnic provider returned 1 from fi_cq_readerr() upon
770- success.
771-
772- So query to see what version of the libfabric API we are
773- running with, and adapt accordingly. */
774- libfabric_api = fi_version ();
775- if (1 == FI_MAJOR (libfabric_api ) &&
776- 0 == FI_MINOR (libfabric_api )) {
777- // Old fi_cq_readerr() behavior: success=sizeof(...), try again=0
778- mca_btl_usnic_component .cq_readerr_success_value =
779- sizeof (struct fi_cq_err_entry );
780- mca_btl_usnic_component .cq_readerr_try_again_value = 0 ;
781- } else {
782- // New fi_cq_readerr() behavior: success=1, try again=-FI_EAGAIN
783- mca_btl_usnic_component .cq_readerr_success_value = 1 ;
784- mca_btl_usnic_component .cq_readerr_try_again_value = - FI_EAGAIN ;
785- }
786-
787753 opal_proc_t * me = opal_proc_local_get ();
788754 opal_process_name_t * name = & (me -> proc_name );
789755 mca_btl_usnic_component .my_hashed_rte_name =
@@ -1279,12 +1245,11 @@ usnic_handle_cq_error(opal_btl_usnic_module_t* module,
12791245 }
12801246
12811247 rc = fi_cq_readerr (channel -> cq , & err_entry , 0 );
1282- if (rc == mca_btl_usnic_component . cq_readerr_try_again_value ) {
1248+ if (rc == - FI_EAGAIN ) {
12831249 return ;
1284- } else if (rc != mca_btl_usnic_component .cq_readerr_success_value ) {
1285- BTL_ERROR (("%s: cq_readerr ret = %d (expected %d)" ,
1286- module -> linux_device_name , rc ,
1287- (int ) mca_btl_usnic_component .cq_readerr_success_value ));
1250+ } else if (rc != 1 ) {
1251+ BTL_ERROR (("%s: cq_readerr ret = %d (expected 1)" ,
1252+ module -> linux_device_name , rc ));
12881253 channel -> chan_error = true;
12891254 }
12901255
0 commit comments