From fd8c5fba4eba99365eeb63a731d2c0d7e5728d70 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Fri, 22 Jun 2018 14:01:31 -0500 Subject: [PATCH] common/ompio: fix the fview based grouping options a bug sneaked into constructing the list of aggregators processes when using the fileview based grouping options Signed-off-by: Edgar Gabriel --- ompi/mca/common/ompio/common_ompio_aggregators.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ompi/mca/common/ompio/common_ompio_aggregators.c b/ompi/mca/common/ompio/common_ompio_aggregators.c index 90082253c5..aa751cd4a1 100644 --- a/ompi/mca/common/ompio/common_ompio_aggregators.c +++ b/ompi/mca/common/ompio/common_ompio_aggregators.c @@ -650,14 +650,17 @@ int mca_common_ompio_create_groups(ompio_file_t *fh, opal_output(1,"mca_common_ompio_create_groups: could not allocate memory\n"); goto exit; } - + + int found; for ( i=0, j=0; if_num_aggrs; i++ ) { - for ( ; jf_size; j++ ) { + found = 0; + do { if ( 1 == tmp_final_aggrs[j] ) { - break; + fh->f_aggr_list[i] = j; + found=1; } - fh->f_aggr_list[i] = tmp_final_aggrs[j]; - } + j++; + } while ( !found && j < fh->f_size); } exit: