Skip to content

Commit 253eb80

Browse files
committed
Code cleaning of the tuned module.
1 parent 582f290 commit 253eb80

13 files changed

+76
-479
lines changed

ompi/mca/coll/tuned/coll_tuned.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,77 +93,66 @@ ompi_coll_tuned_comm_query(struct ompi_communicator_t *comm, int *priority);
9393
/* All Gather */
9494
int ompi_coll_tuned_allgather_intra_dec_fixed(ALLGATHER_ARGS);
9595
int ompi_coll_tuned_allgather_intra_dec_dynamic(ALLGATHER_ARGS);
96-
int ompi_coll_tuned_allgather_intra_do_forced(ALLGATHER_ARGS);
9796
int ompi_coll_tuned_allgather_intra_do_this(ALLGATHER_ARGS, int algorithm, int faninout, int segsize);
9897
int ompi_coll_tuned_allgather_intra_check_forced_init(coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices);
9998

10099
/* All GatherV */
101100
int ompi_coll_tuned_allgatherv_intra_dec_fixed(ALLGATHERV_ARGS);
102101
int ompi_coll_tuned_allgatherv_intra_dec_dynamic(ALLGATHERV_ARGS);
103-
int ompi_coll_tuned_allgatherv_intra_do_forced(ALLGATHERV_ARGS);
104102
int ompi_coll_tuned_allgatherv_intra_do_this(ALLGATHERV_ARGS, int algorithm, int faninout, int segsize);
105103
int ompi_coll_tuned_allgatherv_intra_check_forced_init(coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices);
106104

107105
/* All Reduce */
108106
int ompi_coll_tuned_allreduce_intra_dec_fixed(ALLREDUCE_ARGS);
109107
int ompi_coll_tuned_allreduce_intra_dec_dynamic(ALLREDUCE_ARGS);
110-
int ompi_coll_tuned_allreduce_intra_do_forced(ALLREDUCE_ARGS);
111108
int ompi_coll_tuned_allreduce_intra_do_this(ALLREDUCE_ARGS, int algorithm, int faninout, int segsize);
112109
int ompi_coll_tuned_allreduce_intra_check_forced_init (coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices);
113110

114111
/* AlltoAll */
115112
int ompi_coll_tuned_alltoall_intra_dec_fixed(ALLTOALL_ARGS);
116113
int ompi_coll_tuned_alltoall_intra_dec_dynamic(ALLTOALL_ARGS);
117-
int ompi_coll_tuned_alltoall_intra_do_forced(ALLTOALL_ARGS);
118114
int ompi_coll_tuned_alltoall_intra_do_this(ALLTOALL_ARGS, int algorithm, int faninout, int segsize, int max_requests);
119115
int ompi_coll_tuned_alltoall_intra_check_forced_init (coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices);
120116

121117
/* AlltoAllV */
122118
int ompi_coll_tuned_alltoallv_intra_dec_fixed(ALLTOALLV_ARGS);
123119
int ompi_coll_tuned_alltoallv_intra_dec_dynamic(ALLTOALLV_ARGS);
124-
int ompi_coll_tuned_alltoallv_intra_do_forced(ALLTOALLV_ARGS);
125120
int ompi_coll_tuned_alltoallv_intra_do_this(ALLTOALLV_ARGS, int algorithm);
126121
int ompi_coll_tuned_alltoallv_intra_check_forced_init(coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices);
127122

128123
/* Barrier */
129124
int ompi_coll_tuned_barrier_intra_dec_fixed(BARRIER_ARGS);
130125
int ompi_coll_tuned_barrier_intra_dec_dynamic(BARRIER_ARGS);
131-
int ompi_coll_tuned_barrier_intra_do_forced(BARRIER_ARGS);
132126
int ompi_coll_tuned_barrier_intra_do_this(BARRIER_ARGS, int algorithm, int faninout, int segsize);
133127
int ompi_coll_tuned_barrier_intra_check_forced_init (coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices);
134128

135129
/* Bcast */
136130
int ompi_coll_tuned_bcast_intra_dec_fixed(BCAST_ARGS);
137131
int ompi_coll_tuned_bcast_intra_dec_dynamic(BCAST_ARGS);
138-
int ompi_coll_tuned_bcast_intra_do_forced(BCAST_ARGS);
139132
int ompi_coll_tuned_bcast_intra_do_this(BCAST_ARGS, int algorithm, int faninout, int segsize);
140133
int ompi_coll_tuned_bcast_intra_check_forced_init (coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices);
141134

142135
/* Gather */
143136
int ompi_coll_tuned_gather_intra_dec_fixed(GATHER_ARGS);
144137
int ompi_coll_tuned_gather_intra_dec_dynamic(GATHER_ARGS);
145-
int ompi_coll_tuned_gather_intra_do_forced(GATHER_ARGS);
146138
int ompi_coll_tuned_gather_intra_do_this(GATHER_ARGS, int algorithm, int faninout, int segsize);
147139
int ompi_coll_tuned_gather_intra_check_forced_init (coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices);
148140

149141
/* Reduce */
150142
int ompi_coll_tuned_reduce_intra_dec_fixed(REDUCE_ARGS);
151143
int ompi_coll_tuned_reduce_intra_dec_dynamic(REDUCE_ARGS);
152-
int ompi_coll_tuned_reduce_intra_do_forced(REDUCE_ARGS);
153144
int ompi_coll_tuned_reduce_intra_do_this(REDUCE_ARGS, int algorithm, int faninout, int segsize, int max_oustanding_reqs);
154145
int ompi_coll_tuned_reduce_intra_check_forced_init (coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices);
155146

156147
/* Reduce_scatter */
157148
int ompi_coll_tuned_reduce_scatter_intra_dec_fixed(REDUCESCATTER_ARGS);
158149
int ompi_coll_tuned_reduce_scatter_intra_dec_dynamic(REDUCESCATTER_ARGS);
159-
int ompi_coll_tuned_reduce_scatter_intra_do_forced(REDUCESCATTER_ARGS);
160150
int ompi_coll_tuned_reduce_scatter_intra_do_this(REDUCESCATTER_ARGS, int algorithm, int faninout, int segsize);
161151
int ompi_coll_tuned_reduce_scatter_intra_check_forced_init (coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices);
162152

163153
/* Scatter */
164154
int ompi_coll_tuned_scatter_intra_dec_fixed(SCATTER_ARGS);
165155
int ompi_coll_tuned_scatter_intra_dec_dynamic(SCATTER_ARGS);
166-
int ompi_coll_tuned_scatter_intra_do_forced(SCATTER_ARGS);
167156
int ompi_coll_tuned_scatter_intra_do_this(SCATTER_ARGS, int algorithm, int faninout, int segsize);
168157
int ompi_coll_tuned_scatter_intra_check_forced_init (coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices);
169158

ompi/mca/coll/tuned/coll_tuned_allgather_decision.c

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -120,57 +120,6 @@ ompi_coll_tuned_allgather_intra_check_forced_init(coll_tuned_force_algorithm_mca
120120
return (MPI_SUCCESS);
121121
}
122122

123-
int ompi_coll_tuned_allgather_intra_do_forced(const void *sbuf, int scount,
124-
struct ompi_datatype_t *sdtype,
125-
void* rbuf, int rcount,
126-
struct ompi_datatype_t *rdtype,
127-
struct ompi_communicator_t *comm,
128-
mca_coll_base_module_t *module)
129-
{
130-
mca_coll_tuned_module_t *tuned_module = (mca_coll_tuned_module_t*) module;
131-
132-
OPAL_OUTPUT((ompi_coll_tuned_stream,
133-
"coll:tuned:allgather_intra_do_forced selected algorithm %d",
134-
tuned_module->user_forced[ALLGATHER].algorithm));
135-
136-
switch (tuned_module->user_forced[ALLGATHER].algorithm) {
137-
case (0):
138-
return ompi_coll_tuned_allgather_intra_dec_fixed(sbuf, scount, sdtype,
139-
rbuf, rcount, rdtype,
140-
comm, module);
141-
case (1):
142-
return ompi_coll_base_allgather_intra_basic_linear(sbuf, scount, sdtype,
143-
rbuf, rcount, rdtype,
144-
comm, module);
145-
case (2):
146-
return ompi_coll_base_allgather_intra_bruck(sbuf, scount, sdtype,
147-
rbuf, rcount, rdtype,
148-
comm, module);
149-
case (3):
150-
return ompi_coll_base_allgather_intra_recursivedoubling(sbuf, scount, sdtype,
151-
rbuf, rcount, rdtype,
152-
comm, module);
153-
case (4):
154-
return ompi_coll_base_allgather_intra_ring(sbuf, scount, sdtype,
155-
rbuf, rcount, rdtype,
156-
comm, module);
157-
case (5):
158-
return ompi_coll_base_allgather_intra_neighborexchange(sbuf, scount, sdtype,
159-
rbuf, rcount, rdtype,
160-
comm, module);
161-
case (6):
162-
return ompi_coll_base_allgather_intra_two_procs(sbuf, scount, sdtype,
163-
rbuf, rcount, rdtype,
164-
comm, module);
165-
} /* switch */
166-
OPAL_OUTPUT((ompi_coll_tuned_stream,
167-
"coll:tuned:allgather_intra_do_forced attempt to select algorithm %d when only 0-%d is valid?",
168-
tuned_module->user_forced[ALLGATHER].algorithm,
169-
ompi_coll_tuned_forced_max_algorithms[ALLGATHER]));
170-
return (MPI_ERR_ARG);
171-
}
172-
173-
174123
int ompi_coll_tuned_allgather_intra_do_this(const void *sbuf, int scount,
175124
struct ompi_datatype_t *sdtype,
176125
void* rbuf, int rcount,

ompi/mca/coll/tuned/coll_tuned_allgatherv_decision.c

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -119,54 +119,6 @@ ompi_coll_tuned_allgatherv_intra_check_forced_init(coll_tuned_force_algorithm_mc
119119
return (MPI_SUCCESS);
120120
}
121121

122-
int ompi_coll_tuned_allgatherv_intra_do_forced(const void *sbuf, int scount,
123-
struct ompi_datatype_t *sdtype,
124-
void *rbuf, const int *rcounts,
125-
const int *rdispls,
126-
struct ompi_datatype_t *rdtype,
127-
struct ompi_communicator_t *comm,
128-
mca_coll_base_module_t *module)
129-
{
130-
mca_coll_tuned_module_t *tuned_module = (mca_coll_tuned_module_t*) module;
131-
132-
OPAL_OUTPUT((ompi_coll_tuned_stream,
133-
"coll:tuned:allgatherv_intra_do_forced selected algorithm %d",
134-
tuned_module->user_forced[ALLGATHERV].algorithm));
135-
136-
switch (tuned_module->user_forced[ALLGATHERV].algorithm) {
137-
case (0):
138-
return ompi_coll_tuned_allgatherv_intra_dec_fixed(sbuf, scount, sdtype,
139-
rbuf, rcounts, rdispls, rdtype,
140-
comm, module);
141-
case (1):
142-
return ompi_coll_base_allgatherv_intra_basic_default(sbuf, scount, sdtype,
143-
rbuf, rcounts, rdispls, rdtype,
144-
comm, module);
145-
case (2):
146-
return ompi_coll_base_allgatherv_intra_bruck(sbuf, scount, sdtype,
147-
rbuf, rcounts, rdispls, rdtype,
148-
comm, module);
149-
case (3):
150-
return ompi_coll_base_allgatherv_intra_ring(sbuf, scount, sdtype,
151-
rbuf, rcounts, rdispls, rdtype,
152-
comm, module);
153-
case (4):
154-
return ompi_coll_base_allgatherv_intra_neighborexchange(sbuf, scount, sdtype,
155-
rbuf, rcounts, rdispls, rdtype,
156-
comm, module);
157-
case (5):
158-
return ompi_coll_base_allgatherv_intra_two_procs(sbuf, scount, sdtype,
159-
rbuf, rcounts, rdispls, rdtype,
160-
comm, module);
161-
} /* switch */
162-
OPAL_OUTPUT((ompi_coll_tuned_stream,
163-
"coll:tuned:allgatherv_intra_do_forced attempt to select algorithm %d when only 0-%d is valid?",
164-
tuned_module->user_forced[ALLGATHERV].algorithm,
165-
ompi_coll_tuned_forced_max_algorithms[ALLGATHERV]));
166-
return (MPI_ERR_ARG);
167-
}
168-
169-
170122
int ompi_coll_tuned_allgatherv_intra_do_this(const void *sbuf, int scount,
171123
struct ompi_datatype_t *sdtype,
172124
void *rbuf, const int *rcounts,

ompi/mca/coll/tuned/coll_tuned_allreduce_decision.c

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -119,40 +119,6 @@ int ompi_coll_tuned_allreduce_intra_check_forced_init (coll_tuned_force_algorith
119119
return (MPI_SUCCESS);
120120
}
121121

122-
123-
int ompi_coll_tuned_allreduce_intra_do_forced(const void *sbuf, void *rbuf, int count,
124-
struct ompi_datatype_t *dtype,
125-
struct ompi_op_t *op,
126-
struct ompi_communicator_t *comm,
127-
mca_coll_base_module_t *module)
128-
{
129-
mca_coll_tuned_module_t *tuned_module = (mca_coll_tuned_module_t*) module;
130-
131-
OPAL_OUTPUT((ompi_coll_tuned_stream,"coll:tuned:allreduce_intra_do_forced selected algorithm %d, segment size %d",
132-
tuned_module->user_forced[ALLREDUCE].algorithm,
133-
tuned_module->user_forced[ALLREDUCE].segsize));
134-
135-
switch (tuned_module->user_forced[ALLREDUCE].algorithm) {
136-
case (0):
137-
return ompi_coll_tuned_allreduce_intra_dec_fixed(sbuf, rbuf, count, dtype, op, comm, module);
138-
case (1):
139-
return ompi_coll_base_allreduce_intra_basic_linear(sbuf, rbuf, count, dtype, op, comm, module);
140-
case (2):
141-
return ompi_coll_base_allreduce_intra_nonoverlapping(sbuf, rbuf, count, dtype, op, comm, module);
142-
case (3):
143-
return ompi_coll_base_allreduce_intra_recursivedoubling(sbuf, rbuf, count, dtype, op, comm, module);
144-
case (4):
145-
return ompi_coll_base_allreduce_intra_ring(sbuf, rbuf, count, dtype, op, comm, module);
146-
case (5):
147-
return ompi_coll_base_allreduce_intra_ring_segmented(sbuf, rbuf, count, dtype, op, comm, module, tuned_module->user_forced[ALLREDUCE].segsize);
148-
} /* switch */
149-
OPAL_OUTPUT((ompi_coll_tuned_stream,"coll:tuned:allreduce_intra_do_forced attempt to select algorithm %d when only 0-%d is valid?",
150-
tuned_module->user_forced[ALLREDUCE].algorithm,
151-
ompi_coll_tuned_forced_max_algorithms[ALLREDUCE]));
152-
return (MPI_ERR_ARG);
153-
}
154-
155-
156122
int ompi_coll_tuned_allreduce_intra_do_this(const void *sbuf, void *rbuf, int count,
157123
struct ompi_datatype_t *dtype,
158124
struct ompi_op_t *op,

ompi/mca/coll/tuned/coll_tuned_alltoall_decision.c

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -139,41 +139,6 @@ int ompi_coll_tuned_alltoall_intra_check_forced_init (coll_tuned_force_algorithm
139139
return (MPI_SUCCESS);
140140
}
141141

142-
143-
144-
int ompi_coll_tuned_alltoall_intra_do_forced(const void *sbuf, int scount,
145-
struct ompi_datatype_t *sdtype,
146-
void* rbuf, int rcount,
147-
struct ompi_datatype_t *rdtype,
148-
struct ompi_communicator_t *comm,
149-
mca_coll_base_module_t *module)
150-
{
151-
mca_coll_tuned_module_t *tuned_module = (mca_coll_tuned_module_t*) module;
152-
153-
OPAL_OUTPUT((ompi_coll_tuned_stream,"coll:tuned:alltoall_intra_do_forced selected algorithm %d",
154-
tuned_module->user_forced[ALLTOALL].algorithm));
155-
156-
switch (tuned_module->user_forced[ALLTOALL].algorithm) {
157-
case (0):
158-
return ompi_coll_tuned_alltoall_intra_dec_fixed (sbuf, scount, sdtype, rbuf, rcount, rdtype, comm, module);
159-
case (1):
160-
return ompi_coll_base_alltoall_intra_basic_linear (sbuf, scount, sdtype, rbuf, rcount, rdtype, comm, module);
161-
case (2):
162-
return ompi_coll_base_alltoall_intra_pairwise (sbuf, scount, sdtype, rbuf, rcount, rdtype, comm, module);
163-
case (3):
164-
return ompi_coll_base_alltoall_intra_bruck (sbuf, scount, sdtype, rbuf, rcount, rdtype, comm, module);
165-
case (4):
166-
return ompi_coll_base_alltoall_intra_linear_sync (sbuf, scount, sdtype, rbuf, rcount, rdtype, comm, module,
167-
tuned_module->user_forced[ALLTOALL].max_requests);
168-
case (5):
169-
return ompi_coll_base_alltoall_intra_two_procs (sbuf, scount, sdtype, rbuf, rcount, rdtype, comm, module);
170-
} /* switch */
171-
OPAL_OUTPUT((ompi_coll_tuned_stream,"coll:tuned:alltoall_intra_do_forced attempt to select algorithm %d when only 0-%d is valid?",
172-
tuned_module->user_forced[ALLTOALL].algorithm, ompi_coll_tuned_forced_max_algorithms[ALLTOALL]));
173-
return (MPI_ERR_ARG);
174-
}
175-
176-
177142
int ompi_coll_tuned_alltoall_intra_do_this(const void *sbuf, int scount,
178143
struct ompi_datatype_t *sdtype,
179144
void* rbuf, int rcount,

ompi/mca/coll/tuned/coll_tuned_alltoallv_decision.c

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -84,43 +84,6 @@ int ompi_coll_tuned_alltoallv_intra_check_forced_init(coll_tuned_force_algorithm
8484
return (MPI_SUCCESS);
8585
}
8686

87-
88-
89-
int ompi_coll_tuned_alltoallv_intra_do_forced(const void *sbuf, const int *scounts, const int *sdisps,
90-
struct ompi_datatype_t *sdtype,
91-
void* rbuf, const int *rcounts, const int *rdisps,
92-
struct ompi_datatype_t *rdtype,
93-
struct ompi_communicator_t *comm,
94-
mca_coll_base_module_t *module)
95-
{
96-
mca_coll_tuned_module_t *tuned_module = (mca_coll_tuned_module_t*) module;
97-
98-
OPAL_OUTPUT((ompi_coll_tuned_stream,
99-
"coll:tuned:alltoallv_intra_do_forced selected algorithm %d",
100-
tuned_module->user_forced[ALLTOALLV].algorithm));
101-
102-
switch (tuned_module->user_forced[ALLTOALLV].algorithm) {
103-
case (0):
104-
return ompi_coll_tuned_alltoallv_intra_dec_fixed(sbuf, scounts, sdisps, sdtype,
105-
rbuf, rcounts, rdisps, rdtype,
106-
comm, module);
107-
case (1):
108-
return ompi_coll_base_alltoallv_intra_basic_linear(sbuf, scounts, sdisps, sdtype,
109-
rbuf, rcounts, rdisps, rdtype,
110-
comm, module);
111-
case (2):
112-
return ompi_coll_base_alltoallv_intra_pairwise(sbuf, scounts, sdisps, sdtype,
113-
rbuf, rcounts, rdisps, rdtype,
114-
comm, module);
115-
} /* switch */
116-
OPAL_OUTPUT((ompi_coll_tuned_stream,
117-
"coll:tuned:alltoallv_intra_do_forced attempt to "
118-
"select algorithm %d when only 0-%d is valid.",
119-
tuned_module->user_forced[ALLTOALLV].algorithm,
120-
ompi_coll_tuned_forced_max_algorithms[ALLTOALLV]));
121-
return (MPI_ERR_ARG);
122-
}
123-
12487
/* If the user selects dynamic rules and specifies the algorithm to
12588
* use, then this function is called. */
12689
int ompi_coll_tuned_alltoallv_intra_do_this(const void *sbuf, const int *scounts, const int *sdisps,

ompi/mca/coll/tuned/coll_tuned_barrier_decision.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -85,33 +85,6 @@ int ompi_coll_tuned_barrier_intra_check_forced_init (coll_tuned_force_algorithm_
8585
return (MPI_SUCCESS);
8686
}
8787

88-
89-
90-
int ompi_coll_tuned_barrier_intra_do_forced(struct ompi_communicator_t *comm,
91-
mca_coll_base_module_t *module)
92-
{
93-
mca_coll_tuned_module_t *tuned_module = (mca_coll_tuned_module_t*) module;
94-
95-
OPAL_OUTPUT((ompi_coll_tuned_stream,
96-
"coll:tuned:barrier_intra_do_forced selected algorithm %d",
97-
tuned_module->user_forced[BARRIER].algorithm));
98-
99-
switch (tuned_module->user_forced[BARRIER].algorithm) {
100-
case (0): return ompi_coll_tuned_barrier_intra_dec_fixed(comm, module);
101-
case (1): return ompi_coll_base_barrier_intra_basic_linear(comm, module);
102-
case (2): return ompi_coll_base_barrier_intra_doublering(comm, module);
103-
case (3): return ompi_coll_base_barrier_intra_recursivedoubling(comm, module);
104-
case (4): return ompi_coll_base_barrier_intra_bruck(comm, module);
105-
case (5): return ompi_coll_base_barrier_intra_two_procs(comm, module);
106-
case (6): return ompi_coll_base_barrier_intra_tree(comm, module);
107-
} /* switch */
108-
OPAL_OUTPUT((ompi_coll_tuned_stream,"coll:tuned:barrier_intra_do_forced attempt to select algorithm %d when only 0-%d is valid?",
109-
tuned_module->user_forced[BARRIER].algorithm,
110-
ompi_coll_tuned_forced_max_algorithms[BARRIER]));
111-
return (MPI_ERR_ARG);
112-
}
113-
114-
11588
int ompi_coll_tuned_barrier_intra_do_this (struct ompi_communicator_t *comm,
11689
mca_coll_base_module_t *module,
11790
int algorithm, int faninout, int segsize)

0 commit comments

Comments
 (0)