@@ -101,7 +101,7 @@ mca_coll_ftagree_eta_intra(void *contrib,
101
101
{ /* ignore acked failures (add them later to the result) */
102
102
ompi_group_t * ackedgrp = NULL ; int npa ; int * aranks , * cranks ;
103
103
ackedgrp = * group ;
104
- if ( 0 != (npa = ompi_group_size (ackedgrp )) ) {
104
+ if ( 0 != (npa = ( NULL == ackedgrp ? 0 : ompi_group_size (ackedgrp ) )) ) {
105
105
aranks = calloc ( npa , sizeof (int ) );
106
106
for ( i = 0 ; i < npa ; i ++ ) aranks [i ] = i ;
107
107
cranks = calloc ( npa , sizeof (int ) );
@@ -336,7 +336,7 @@ mca_coll_ftagree_eta_intra(void *contrib,
336
336
free (statuses );
337
337
free (in );
338
338
/* Let's build the group of failed processes */
339
- if ( NULL != group ) {
339
+ if ( update_grp ) {
340
340
int pos ;
341
341
/* We overwrite proc_status because it is not used anymore */
342
342
int * failed = proc_status ;
@@ -346,10 +346,10 @@ mca_coll_ftagree_eta_intra(void *contrib,
346
346
failed [pos ++ ] = i ;
347
347
}
348
348
}
349
- if ( update_grp ) {
349
+ if ( NULL != * group ) {
350
350
OBJ_RELEASE (* group );
351
- ompi_group_incl (comm -> c_remote_group , pos , failed , group );
352
351
}
352
+ ompi_group_incl (comm -> c_remote_group , pos , failed , group );
353
353
}
354
354
free (proc_status );
355
355
@@ -363,7 +363,7 @@ mca_coll_ftagree_eta_intra(void *contrib,
363
363
OPAL_OUTPUT_VERBOSE ((5 , ompi_ftmpi_output_handle ,
364
364
"%s ftagree:agreement (ETA) return %d with 4 first bytes of result 0x%08x and dead group with %d processes" ,
365
365
OMPI_NAME_PRINT (OMPI_PROC_MY_NAME ), ret , * (int * )contrib ,
366
- (NULL == group ) ? 0 : (* group )-> grp_proc_count ));
366
+ (NULL == * group ) ? 0 : (* group )-> grp_proc_count ));
367
367
return ret ;
368
368
}
369
369
0 commit comments