From 66c1ea5fcbaebd2caa60890de22a824b0d3f82cc Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Thu, 12 Nov 2015 14:37:07 -0600 Subject: [PATCH] change the default value of the grouping option. Also add new grouping option which skips the refinement step in the aggregator selection. --- ompi/mca/io/ompio/io_ompio.c | 23 +++++++++++++++++++---- ompi/mca/io/ompio/io_ompio.h | 9 +++++++-- ompi/mca/io/ompio/io_ompio_component.c | 9 ++++++--- 3 files changed, 32 insertions(+), 9 deletions(-) diff --git a/ompi/mca/io/ompio/io_ompio.c b/ompi/mca/io/ompio/io_ompio.c index cb5a50a5c1..1b08917de4 100644 --- a/ompi/mca/io/ompio/io_ompio.c +++ b/ompi/mca/io/ompio/io_ompio.c @@ -1030,13 +1030,29 @@ int ompi_io_ompio_set_aggregator_props (struct mca_io_ompio_file_t *fh, fh->f_flags |= OMPIO_AGGREGATOR_IS_SET; if (-1 == num_aggregators) { - mca_io_ompio_create_groups(fh,bytes_per_proc); + if ( SIMPLE == mca_io_ompio_grouping_option || + NO_REFINEMENT == mca_io_ompio_grouping_option ) { + fh->f_aggregator_index = 0; + fh->f_final_num_aggrs = fh->f_init_num_aggrs; + fh->f_procs_per_group = fh->f_init_procs_per_group; + + fh->f_procs_in_group = (int*)malloc (fh->f_procs_per_group * sizeof(int)); + if (NULL == fh->f_procs_in_group) { + opal_output (1, "OUT OF MEMORY\n"); + return OMPI_ERR_OUT_OF_RESOURCE; + } + + for (j=0 ; jf_procs_per_group ; j++) { + fh->f_procs_in_group[j] = fh->f_init_procs_in_group[j]; + } + } + else { + mca_io_ompio_create_groups(fh,bytes_per_proc); + } return OMPI_SUCCESS; } //Forced number of aggregators - else - { /* calculate the offset at which each group of processes will start */ procs_per_group = ceil ((float)fh->f_size/num_aggregators); @@ -1062,7 +1078,6 @@ int ompi_io_ompio_set_aggregator_props (struct mca_io_ompio_file_t *fh, fh->f_final_num_aggrs = num_aggregators; return OMPI_SUCCESS; - } } diff --git a/ompi/mca/io/ompio/io_ompio.h b/ompi/mca/io/ompio/io_ompio.h index 703ed0bbc8..087765fae1 100644 --- a/ompi/mca/io/ompio/io_ompio.h +++ b/ompi/mca/io/ompio/io_ompio.h @@ -101,12 +101,17 @@ OMPI_DECLSPEC extern int mca_io_ompio_coll_timing_info; #define OMPIO_MERGE 1 #define OMPIO_SPLIT 2 #define OMPIO_RETAIN 3 + #define DATA_VOLUME 1 #define UNIFORM_DISTRIBUTION 2 -#define OMPIO_UNIFORM_DIST_THRESHOLD 0.5 #define CONTIGUITY 3 -#define OMPIO_CONTG_THRESHOLD 1048576 #define OPTIMIZE_GROUPING 4 +#define SIMPLE 5 +#define NO_REFINEMENT 6 + + +#define OMPIO_UNIFORM_DIST_THRESHOLD 0.5 +#define OMPIO_CONTG_THRESHOLD 1048576 #define OMPIO_PROCS_PER_GROUP_TAG 0 #define OMPIO_PROCS_IN_GROUP_TAG 1 #define OMPIO_MERGE_THRESHOLD 0.5 diff --git a/ompi/mca/io/ompio/io_ompio_component.c b/ompi/mca/io/ompio/io_ompio_component.c index 4c2c086821..9007d2f401 100644 --- a/ompi/mca/io/ompio/io_ompio_component.c +++ b/ompi/mca/io/ompio/io_ompio_component.c @@ -38,7 +38,7 @@ int mca_io_ompio_record_offset_info = 0; int mca_io_ompio_coll_timing_info = 0; int mca_io_ompio_sharedfp_lazy_open = 1; -int mca_io_ompio_grouping_option=0; +int mca_io_ompio_grouping_option=4; /* * Private functions @@ -202,10 +202,13 @@ static int register_component(void) MCA_BASE_VAR_SCOPE_READONLY, &mca_io_ompio_sharedfp_lazy_open); - mca_io_ompio_grouping_option = 0; + mca_io_ompio_grouping_option = 4; (void) mca_base_component_var_register(&mca_io_ompio_component.io_version, "grouping_option", - "Option for grouping of processes in the aggregator selection", + "Option for grouping of processes in the aggregator selection " + "1: Data volume based grouping 2: create uniform groups 3: maximimze " + "contiguity 4: hybrid optimization (default) 5: simple/no optimization " + "6: skip refinement step", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY,