Skip to content

Commit 3deb0de

Browse files
authored
Merge pull request #9816 from edgargabriel/topic/fcoll_read_all_to_base
fcoll: move read_all functions to base
2 parents 37c9045 + 1846e73 commit 3deb0de

14 files changed

+29
-2211
lines changed

ompi/mca/fcoll/base/Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# University of Stuttgart. All rights reserved.
1010
# Copyright (c) 2004-2005 The Regents of the University of California.
1111
# All rights reserved.
12-
# Copyright (c) 2008-2011 University of Houston. All rights reserved.
12+
# Copyright (c) 2008-2022 University of Houston. All rights reserved.
1313
# $COPYRIGHT$
1414
#
1515
# Additional copyrights may follow
@@ -27,4 +27,5 @@ libmca_fcoll_la_SOURCES += \
2727
base/fcoll_base_file_unselect.c \
2828
base/fcoll_base_find_available.c \
2929
base/fcoll_base_sort.c \
30+
base/fcoll_base_file_read_all.c \
3031
base/fcoll_base_coll_array.c

ompi/mca/fcoll/base/base.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
13-
* Copyright (c) 2008-2011 University of Houston. All rights reserved.
13+
* Copyright (c) 2008-2022 University of Houston. All rights reserved.
1414
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1515
* Copyright (c) 2018 Research Organization for Information Science
1616
* and Technology (RIST). All rights reserved.
@@ -55,6 +55,10 @@ OMPI_DECLSPEC int ompi_fcoll_base_sort_iovec (struct iovec *iov, int num_entries
5555

5656
OMPI_DECLSPEC mca_fcoll_base_component_t* mca_fcoll_base_component_lookup(const char* name);
5757

58+
OMPI_DECLSPEC int mca_fcoll_base_file_read_all (ompio_file_t *fh, void *buf, int count,
59+
struct ompi_datatype_t *datatype,
60+
ompi_status_public_t *status);
61+
5862
/*
5963
* Globals
6064
*/

ompi/mca/fcoll/vulcan/fcoll_vulcan_file_read_all.c renamed to ompi/mca/fcoll/base/fcoll_base_file_read_all.c

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2008-2021 University of Houston. All rights reserved.
12+
* Copyright (c) 2008-2022 University of Houston. All rights reserved.
1313
* Copyright (c) 2017-2018 Research Organization for Information Science
1414
* and Technology (RIST). All rights reserved.
1515
* $COPYRIGHT$
@@ -20,19 +20,21 @@
2020
*/
2121

2222
#include "ompi_config.h"
23-
#include "fcoll_vulcan.h"
2423

2524
#include "mpi.h"
2625
#include "ompi/constants.h"
2726
#include "ompi/mca/fcoll/fcoll.h"
2827
#include "ompi/mca/fcoll/base/fcoll_base_coll_array.h"
28+
#include "ompi/mca/fcoll/base/base.h"
2929
#include "ompi/mca/common/ompio/common_ompio.h"
3030
#include "ompi/mca/io/io.h"
3131
#include "math.h"
3232
#include "ompi/mca/pml/pml.h"
3333
#include <unistd.h>
3434

3535
#define DEBUG_ON 0
36+
#define FCOLL_BASE_SHUFFLE_TAG 123
37+
#define INIT_LEN 10
3638

3739
/*Used for loading file-offsets per aggregator*/
3840
typedef struct mca_io_ompio_local_io_array{
@@ -49,7 +51,7 @@ static int read_heap_sort (mca_io_ompio_local_io_array *io_array,
4951

5052

5153
int
52-
mca_fcoll_vulcan_file_read_all (ompio_file_t *fh,
54+
mca_fcoll_base_file_read_all (ompio_file_t *fh,
5355
void *buf,
5456
int count,
5557
struct ompi_datatype_t *datatype,
@@ -89,7 +91,7 @@ mca_fcoll_vulcan_file_read_all (ompio_file_t *fh,
8991
/* array that contains the sorted indices of the global_iov */
9092
int *sorted = NULL;
9193
int *displs = NULL;
92-
int vulcan_num_io_procs;
94+
int base_num_io_procs;
9395
size_t max_data = 0;
9496
MPI_Aint *total_bytes_per_process = NULL;
9597
ompi_datatype_t **sendtype = NULL;
@@ -126,14 +128,14 @@ mca_fcoll_vulcan_file_read_all (ompio_file_t *fh,
126128
status->_ucount = max_data;
127129
}
128130

129-
vulcan_num_io_procs = fh->f_get_mca_parameter_value ( "num_aggregators", strlen ("num_aggregators"));
130-
if ( OMPI_ERR_MAX == vulcan_num_io_procs ) {
131+
base_num_io_procs = fh->f_get_mca_parameter_value ( "num_aggregators", strlen ("num_aggregators"));
132+
if ( OMPI_ERR_MAX == base_num_io_procs ) {
131133
ret = OMPI_ERROR;
132134
goto exit;
133135
}
134136

135137
ret = mca_common_ompio_set_aggregator_props ((struct ompio_file_t *) fh,
136-
vulcan_num_io_procs,
138+
base_num_io_procs,
137139
max_data);
138140
if (OMPI_SUCCESS != ret){
139141
goto exit;
@@ -741,7 +743,7 @@ mca_fcoll_vulcan_file_read_all (ompio_file_t *fh,
741743
1,
742744
sendtype[i],
743745
fh->f_procs_in_group[i],
744-
FCOLL_VULCAN_SHUFFLE_TAG,
746+
FCOLL_BASE_SHUFFLE_TAG,
745747
MCA_PML_BASE_SEND_STANDARD,
746748
fh->f_comm,
747749
&send_req[i]));
@@ -822,7 +824,7 @@ mca_fcoll_vulcan_file_read_all (ompio_file_t *fh,
822824
1,
823825
newType,
824826
my_aggregator,
825-
FCOLL_VULCAN_SHUFFLE_TAG,
827+
FCOLL_BASE_SHUFFLE_TAG,
826828
fh->f_comm,
827829
&recv_req));
828830

@@ -867,7 +869,7 @@ mca_fcoll_vulcan_file_read_all (ompio_file_t *fh,
867869
nentry.aggregator = 1;
868870
else
869871
nentry.aggregator = 0;
870-
nentry.nprocs_for_coll = vulcan_num_io_procs;
872+
nentry.nprocs_for_coll = base_num_io_procs;
871873
if (!mca_common_ompio_full_print_queue(fh->f_coll_read_time)){
872874
mca_common_ompio_register_print_entry(fh->f_coll_read_time,
873875
nentry);

ompi/mca/fcoll/dynamic/Makefile.am

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# University of Stuttgart. All rights reserved.
1010
# Copyright (c) 2004-2005 The Regents of the University of California.
1111
# All rights reserved.
12-
# Copyright (c) 2008-2015 University of Houston. All rights reserved.
12+
# Copyright (c) 2008-2022 University of Houston. All rights reserved.
1313
# Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
1414
# Copyright (c) 2017 IBM Corporation. All rights reserved.
1515
# Copyright (c) 2018 Research Organization for Information Science
@@ -25,7 +25,6 @@ sources = \
2525
fcoll_dynamic.h \
2626
fcoll_dynamic_module.c \
2727
fcoll_dynamic_component.c \
28-
fcoll_dynamic_file_read_all.c \
2928
fcoll_dynamic_file_write_all.c
3029

3130
# Make the output library in this directory, and name it either

ompi/mca/fcoll/dynamic/fcoll_dynamic.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2008-2016 University of Houston. All rights reserved.
12+
* Copyright (c) 2008-2022 University of Houston. All rights reserved.
1313
* Copyright (c) 2015-2018 Research Organization for Information Science
1414
* and Technology (RIST). All rights reserved.
1515
* $COPYRIGHT$
@@ -50,13 +50,6 @@ int mca_fcoll_dynamic_component_file_unquery (ompio_file_t *file);
5050
int mca_fcoll_dynamic_module_init (ompio_file_t *file);
5151
int mca_fcoll_dynamic_module_finalize (ompio_file_t *file);
5252

53-
int mca_fcoll_dynamic_file_read_all (ompio_file_t *fh,
54-
void *buf,
55-
int count,
56-
struct ompi_datatype_t *datatype,
57-
ompi_status_public_t * status);
58-
59-
6053
int mca_fcoll_dynamic_file_write_all (ompio_file_t *fh,
6154
const void *buf,
6255
int count,

0 commit comments

Comments
 (0)