@@ -17,8 +17,6 @@ static int update_multi_nic_hints(MPIR_Comm * comm)
1717 if (comm ) {
1818 /* If the user set a multi-nic hint, but num_nics = 1, disable multi-nic optimizations. */
1919 if (MPIDI_OFI_global .num_nics > 1 ) {
20- int was_enabled_striping = MPIDI_OFI_COMM (comm ).enable_striping ;
21-
2220 /* Check if we should use striping */
2321 if (HAS_PREF_NIC (comm )) {
2422 /* If the user specified a particular NIC, don't use striping. */
@@ -29,19 +27,10 @@ static int update_multi_nic_hints(MPIR_Comm * comm)
2927 else
3028 MPIDI_OFI_COMM (comm ).enable_striping = MPIR_CVAR_CH4_OFI_ENABLE_MULTI_NIC_STRIPING ;
3129
32- /* If striping was on and we disabled it here, decrement the global counter. */
33- if (was_enabled_striping > 0 && MPIDI_OFI_COMM (comm ).enable_striping == 0 )
34- MPIDI_OFI_global .num_comms_enabled_striping -- ;
35- /* If striping was off and we enabled it here, increment the global counter. */
36- else if (was_enabled_striping <= 0 && MPIDI_OFI_COMM (comm ).enable_striping != 0 )
37- MPIDI_OFI_global .num_comms_enabled_striping ++ ;
38-
3930 if (MPIDI_OFI_COMM (comm ).enable_striping ) {
4031 MPIDI_OFI_global .stripe_threshold = MPIR_CVAR_CH4_OFI_MULTI_NIC_STRIPING_THRESHOLD ;
4132 }
4233
43- int was_enabled_hashing = MPIDI_OFI_COMM (comm ).enable_hashing ;
44-
4534 /* Check if we should use hashing */
4635 if (HAS_PREF_NIC (comm )) {
4736 /* If the user specified a particular NIC, don't use hashing. */
@@ -60,13 +49,6 @@ static int update_multi_nic_hints(MPIR_Comm * comm)
6049 !comm -> hints [MPIR_COMM_HINT_NO_ANY_SOURCE ])) {
6150 MPIDI_OFI_COMM (comm ).enable_hashing = 0 ;
6251 }
63-
64- /* If hashing was on and we disabled it here, decrement the global counter. */
65- if (was_enabled_hashing > 0 && MPIDI_OFI_COMM (comm ).enable_hashing == 0 )
66- MPIDI_OFI_global .num_comms_enabled_hashing -- ;
67- /* If hashing was off and we enabled it here, increment the global counter. */
68- else if (was_enabled_hashing <= 0 && MPIDI_OFI_COMM (comm ).enable_hashing != 0 )
69- MPIDI_OFI_global .num_comms_enabled_hashing ++ ;
7052 }
7153 }
7254
@@ -145,8 +127,6 @@ int MPIDI_OFI_mpi_comm_commit_pre_hook(MPIR_Comm * comm)
145127 MPIDI_OFI_COMM (comm ).conn_id = -1 ;
146128
147129 /* Initialize the multi-nic optimization values */
148- MPIDI_OFI_global .num_comms_enabled_striping = 0 ;
149- MPIDI_OFI_global .num_comms_enabled_hashing = 0 ;
150130 MPIDI_OFI_COMM (comm ).enable_striping = 0 ;
151131 MPIDI_OFI_COMM (comm ).enable_hashing = 0 ;
152132 MPIDI_OFI_COMM (comm ).pref_nic = NULL ;
@@ -192,12 +172,6 @@ int MPIDI_OFI_mpi_comm_free_hook(MPIR_Comm * comm)
192172 int mpi_errno = MPI_SUCCESS ;
193173 MPIR_FUNC_ENTER ;
194174
195- /* If we enabled striping or hashing, decrement the counter. */
196- MPIDI_OFI_global .num_comms_enabled_striping -=
197- (MPIDI_OFI_COMM (comm ).enable_striping != 0 ? 1 : 0 );
198- MPIDI_OFI_global .num_comms_enabled_hashing -=
199- (MPIDI_OFI_COMM (comm ).enable_hashing != 0 ? 1 : 0 );
200-
201175 MPL_free (MPIDI_OFI_COMM (comm ).pref_nic );
202176
203177 MPIR_FUNC_EXIT ;
0 commit comments