Skip to content

Commit aa21013

Browse files
author
rhc54
authored
Merge pull request #1994 from rhc54/topic/unify
Unify the PMIx2x components and minor cleanup of coll/sync
2 parents 17ca44b + 639dbdb commit aa21013

23 files changed

+374
-5115
lines changed

config/opal_check_pmi.m4

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ AC_DEFUN([OPAL_CHECK_PMI],[
227227

228228
AC_DEFUN([OPAL_CHECK_PMIX],[
229229
230+
OPAL_VAR_SCOPE_PUSH([opal_external_pmix_save_CPPFLAGS opal_external_pmix_save_LDFLAGS opal_external_pmix_save_LIBS])
231+
230232
AC_ARG_WITH([pmix],
231233
[AC_HELP_STRING([--with-pmix(=DIR)],
232234
[Build PMIx support. DIR can take one of three values: "internal", "external", or a valid directory name. "internal" (or no DIR value) forces Open MPI to use its internal copy of PMIx. "external" forces Open MPI to use an external installation of PMIx. Supplying a valid directory name also forces Open MPI to use an external installation of PMIx, and adds DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries. Note that Open MPI does not support --without-pmix.])])
@@ -241,14 +243,38 @@ AC_DEFUN([OPAL_CHECK_PMIX],[
241243
AS_IF([test -z "$with_pmix" || test "$with_pmix" = "yes" || test "$with_pmix" = "internal"],
242244
[AC_MSG_RESULT([no])
243245
opal_external_pmix_happy=no],
246+
244247
[AC_MSG_RESULT([yes])
245248
# check for external pmix lib */
246249
AS_IF([test "$with_pmix" = "external"],
247250
[pmix_ext_install_dir=/usr],
248251
[pmix_ext_install_dir=$with_pmix])
252+
249253
# Make sure we have the headers and libs in the correct location
250254
OPAL_CHECK_WITHDIR([external-pmix], [$pmix_ext_install_dir/include], [pmix.h])
251255
OPAL_CHECK_WITHDIR([external-libpmix], [$pmix_ext_install_dir/lib], [libpmix.*])
256+
257+
# check the version
258+
opal_external_pmix_save_CPPFLAGS=$CPPFLAGS
259+
opal_external_pmix_save_LDFLAGS=$LDFLAGS
260+
opal_external_pmix_save_LIBS=$LIBS
261+
262+
LDFLAGS="-L$pmix_ext_install_dir/lib $LDFLAGS"
263+
AC_SEARCH_LIBS([PMIx_Register_event_handler], [pmix],
264+
[opal_external_pmix_version=2],
265+
[opal_external_pmix_version=1])
266+
267+
AC_MSG_CHECKING([PMIx version])
268+
AC_MSG_RESULT([$opal_external_pmix_version])
269+
270+
CPPFLAGS=$opal_external_pmix_save_CPPFLAGS
271+
LDFLAGS=$opal_external_pmix_save_LDFLAGS
272+
LIBS=$opal_external_pmix_save_LIBS
273+
274+
opal_external_pmix_CPPFLAGS="-I$pmix_ext_install_dir/include"
275+
opal_external_pmix_LDFLAGS=-L$pmix_ext_install_dir/lib
276+
opal_external_pmix_LIBS=-lpmix
252277
opal_external_pmix_happy=yes])
253278
279+
OPAL_VAR_SCOPE_POP
254280
])

ompi/mca/coll/sync/coll_sync.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,57 +55,57 @@ int mca_coll_sync_bcast(void *buff, int count,
5555
struct ompi_communicator_t *comm,
5656
mca_coll_base_module_t *module);
5757

58-
int mca_coll_sync_exscan(void *sbuf, void *rbuf, int count,
58+
int mca_coll_sync_exscan(const void *sbuf, void *rbuf, int count,
5959
struct ompi_datatype_t *dtype,
6060
struct ompi_op_t *op,
6161
struct ompi_communicator_t *comm,
6262
mca_coll_base_module_t *module);
6363

64-
int mca_coll_sync_gather(void *sbuf, int scount,
64+
int mca_coll_sync_gather(const void *sbuf, int scount,
6565
struct ompi_datatype_t *sdtype,
6666
void *rbuf, int rcount,
6767
struct ompi_datatype_t *rdtype,
6868
int root,
6969
struct ompi_communicator_t *comm,
7070
mca_coll_base_module_t *module);
7171

72-
int mca_coll_sync_gatherv(void *sbuf, int scount,
72+
int mca_coll_sync_gatherv(const void *sbuf, int scount,
7373
struct ompi_datatype_t *sdtype,
74-
void *rbuf, int *rcounts, int *disps,
74+
void *rbuf, const int *rcounts, const int *disps,
7575
struct ompi_datatype_t *rdtype,
7676
int root,
7777
struct ompi_communicator_t *comm,
7878
mca_coll_base_module_t *module);
7979

80-
int mca_coll_sync_reduce(void *sbuf, void *rbuf, int count,
80+
int mca_coll_sync_reduce(const void *sbuf, void *rbuf, int count,
8181
struct ompi_datatype_t *dtype,
8282
struct ompi_op_t *op,
8383
int root,
8484
struct ompi_communicator_t *comm,
8585
mca_coll_base_module_t *module);
8686

87-
int mca_coll_sync_reduce_scatter(void *sbuf, void *rbuf,
88-
int *rcounts,
87+
int mca_coll_sync_reduce_scatter(const void *sbuf, void *rbuf,
88+
const int *rcounts,
8989
struct ompi_datatype_t *dtype,
9090
struct ompi_op_t *op,
9191
struct ompi_communicator_t *comm,
9292
mca_coll_base_module_t *module);
9393

94-
int mca_coll_sync_scan(void *sbuf, void *rbuf, int count,
94+
int mca_coll_sync_scan(const void *sbuf, void *rbuf, int count,
9595
struct ompi_datatype_t *dtype,
9696
struct ompi_op_t *op,
9797
struct ompi_communicator_t *comm,
9898
mca_coll_base_module_t *module);
9999

100-
int mca_coll_sync_scatter(void *sbuf, int scount,
100+
int mca_coll_sync_scatter(const void *sbuf, int scount,
101101
struct ompi_datatype_t *sdtype,
102102
void *rbuf, int rcount,
103103
struct ompi_datatype_t *rdtype,
104104
int root,
105105
struct ompi_communicator_t *comm,
106106
mca_coll_base_module_t *module);
107107

108-
int mca_coll_sync_scatterv(void *sbuf, int *scounts, int *disps,
108+
int mca_coll_sync_scatterv(const void *sbuf, const int *scounts, const int *disps,
109109
struct ompi_datatype_t *sdtype,
110110
void *rbuf, int rcount,
111111
struct ompi_datatype_t *rdtype,

ompi/mca/coll/sync/coll_sync_exscan.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
* Copyright (c) 2004-2006 The University of Tennessee and The University
66
* of Tennessee Research Foundation. All rights
77
* reserved.
8-
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
8+
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
1313
* $COPYRIGHT$
14-
*
14+
*
1515
* Additional copyrights may follow
16-
*
16+
*
1717
* $HEADER$
1818
*/
1919

@@ -29,7 +29,7 @@
2929
* Accepts: - same arguments as MPI_Exscan()
3030
* Returns: - MPI_SUCCESS or error code
3131
*/
32-
int mca_coll_sync_exscan(void *sbuf, void *rbuf, int count,
32+
int mca_coll_sync_exscan(const void *sbuf, void *rbuf, int count,
3333
struct ompi_datatype_t *dtype,
3434
struct ompi_op_t *op,
3535
struct ompi_communicator_t *comm,

ompi/mca/coll/sync/coll_sync_gather.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
* Copyright (c) 2004-2005 The University of Tennessee and The University
66
* of Tennessee Research Foundation. All rights
77
* reserved.
8-
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
8+
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
1313
* $COPYRIGHT$
14-
*
14+
*
1515
* Additional copyrights may follow
16-
*
16+
*
1717
* $HEADER$
1818
*/
1919

@@ -29,7 +29,7 @@
2929
* Accepts: - same arguments as MPI_Gather()
3030
* Returns: - MPI_SUCCESS or error code
3131
*/
32-
int mca_coll_sync_gather(void *sbuf, int scount,
32+
int mca_coll_sync_gather(const void *sbuf, int scount,
3333
struct ompi_datatype_t *sdtype,
3434
void *rbuf, int rcount,
3535
struct ompi_datatype_t *rdtype,
@@ -39,11 +39,11 @@ int mca_coll_sync_gather(void *sbuf, int scount,
3939
mca_coll_sync_module_t *s = (mca_coll_sync_module_t*) module;
4040

4141
if (s->in_operation) {
42-
return s->c_coll.coll_gather(sbuf, scount, sdtype,
42+
return s->c_coll.coll_gather(sbuf, scount, sdtype,
4343
rbuf, rcount, rdtype, root, comm,
4444
s->c_coll.coll_gather_module);
4545
} else {
46-
COLL_SYNC(s, s->c_coll.coll_gather(sbuf, scount, sdtype,
46+
COLL_SYNC(s, s->c_coll.coll_gather(sbuf, scount, sdtype,
4747
rbuf, rcount, rdtype, root, comm,
4848
s->c_coll.coll_gather_module));
4949
}

ompi/mca/coll/sync/coll_sync_gatherv.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
* Copyright (c) 2004-2005 The University of Tennessee and The University
66
* of Tennessee Research Foundation. All rights
77
* reserved.
8-
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
8+
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
1313
* $COPYRIGHT$
14-
*
14+
*
1515
* Additional copyrights may follow
16-
*
16+
*
1717
* $HEADER$
1818
*/
1919

@@ -29,9 +29,9 @@
2929
* Accepts: - same arguments as MPI_Gatherv()
3030
* Returns: - MPI_SUCCESS or error code
3131
*/
32-
int mca_coll_sync_gatherv(void *sbuf, int scount,
32+
int mca_coll_sync_gatherv(const void *sbuf, int scount,
3333
struct ompi_datatype_t *sdtype,
34-
void *rbuf, int *rcounts, int *disps,
34+
void *rbuf, const int *rcounts, const int *disps,
3535
struct ompi_datatype_t *rdtype, int root,
3636
struct ompi_communicator_t *comm,
3737
mca_coll_base_module_t *module)
@@ -44,7 +44,7 @@ int mca_coll_sync_gatherv(void *sbuf, int scount,
4444
s->c_coll.coll_gatherv_module);
4545
} else {
4646
COLL_SYNC(s, s->c_coll.coll_gatherv(sbuf, scount, sdtype,
47-
rbuf, rcounts, disps, rdtype,
47+
rbuf, rcounts, disps, rdtype,
4848
root, comm,
4949
s->c_coll.coll_gatherv_module));
5050
}

ompi/mca/coll/sync/coll_sync_reduce.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
* Copyright (c) 2004-2006 The University of Tennessee and The University
66
* of Tennessee Research Foundation. All rights
77
* reserved.
8-
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
8+
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* $COPYRIGHT$
13-
*
13+
*
1414
* Additional copyrights may follow
15-
*
15+
*
1616
* $HEADER$
1717
*/
1818

@@ -28,7 +28,7 @@
2828
* Accepts: - same as MPI_Reduce()
2929
* Returns: - MPI_SUCCESS or error code
3030
*/
31-
int mca_coll_sync_reduce(void *sbuf, void *rbuf, int count,
31+
int mca_coll_sync_reduce(const void *sbuf, void *rbuf, int count,
3232
struct ompi_datatype_t *dtype,
3333
struct ompi_op_t *op,
3434
int root, struct ompi_communicator_t *comm,
@@ -40,7 +40,7 @@ int mca_coll_sync_reduce(void *sbuf, void *rbuf, int count,
4040
return s->c_coll.coll_reduce(sbuf, rbuf, count, dtype, op, root, comm,
4141
s->c_coll.coll_reduce_module);
4242
} else {
43-
COLL_SYNC(s, s->c_coll.coll_reduce(sbuf, rbuf, count, dtype,
43+
COLL_SYNC(s, s->c_coll.coll_reduce(sbuf, rbuf, count, dtype,
4444
op, root, comm,
4545
s->c_coll.coll_reduce_module));
4646
}

ompi/mca/coll/sync/coll_sync_reduce_scatter.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
* Copyright (c) 2004-2006 The University of Tennessee and The University
66
* of Tennessee Research Foundation. All rights
77
* reserved.
8-
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
8+
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
1313
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
1414
* $COPYRIGHT$
15-
*
15+
*
1616
* Additional copyrights may follow
17-
*
17+
*
1818
* $HEADER$
1919
*/
2020

@@ -30,7 +30,7 @@
3030
* Accepts: - same as MPI_Reduce_scatter()
3131
* Returns: - MPI_SUCCESS or error code
3232
*/
33-
int mca_coll_sync_reduce_scatter(void *sbuf, void *rbuf, int *rcounts,
33+
int mca_coll_sync_reduce_scatter(const void *sbuf, void *rbuf, const int *rcounts,
3434
struct ompi_datatype_t *dtype,
3535
struct ompi_op_t *op,
3636
struct ompi_communicator_t *comm,
@@ -39,11 +39,11 @@ int mca_coll_sync_reduce_scatter(void *sbuf, void *rbuf, int *rcounts,
3939
mca_coll_sync_module_t *s = (mca_coll_sync_module_t*) module;
4040

4141
if (s->in_operation) {
42-
return s->c_coll.coll_reduce_scatter(sbuf, rbuf, rcounts,
42+
return s->c_coll.coll_reduce_scatter(sbuf, rbuf, rcounts,
4343
dtype, op, comm,
4444
s->c_coll.coll_reduce_scatter_module);
4545
} else {
46-
COLL_SYNC(s, s->c_coll.coll_reduce_scatter(sbuf, rbuf, rcounts,
46+
COLL_SYNC(s, s->c_coll.coll_reduce_scatter(sbuf, rbuf, rcounts,
4747
dtype, op, comm,
4848
s->c_coll.coll_reduce_scatter_module));
4949
}

ompi/mca/coll/sync/coll_sync_scan.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
* Copyright (c) 2004-2006 The University of Tennessee and The University
66
* of Tennessee Research Foundation. All rights
77
* reserved.
8-
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
8+
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* $COPYRIGHT$
13-
*
13+
*
1414
* Additional copyrights may follow
15-
*
15+
*
1616
* $HEADER$
1717
*/
1818

@@ -28,7 +28,7 @@
2828
* Accepts: - same arguments as MPI_Scan()
2929
* Returns: - MPI_SUCCESS or error code
3030
*/
31-
int mca_coll_sync_scan(void *sbuf, void *rbuf, int count,
31+
int mca_coll_sync_scan(const void *sbuf, void *rbuf, int count,
3232
struct ompi_datatype_t *dtype,
3333
struct ompi_op_t *op,
3434
struct ompi_communicator_t *comm,

ompi/mca/coll/sync/coll_sync_scatter.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
* Copyright (c) 2004-2005 The University of Tennessee and The University
66
* of Tennessee Research Foundation. All rights
77
* reserved.
8-
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
8+
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
1313
* $COPYRIGHT$
14-
*
14+
*
1515
* Additional copyrights may follow
16-
*
16+
*
1717
* $HEADER$
1818
*/
1919

@@ -29,7 +29,7 @@
2929
* Accepts: - same arguments as MPI_Scatter()
3030
* Returns: - MPI_SUCCESS or error code
3131
*/
32-
int mca_coll_sync_scatter(void *sbuf, int scount,
32+
int mca_coll_sync_scatter(const void *sbuf, int scount,
3333
struct ompi_datatype_t *sdtype,
3434
void *rbuf, int rcount,
3535
struct ompi_datatype_t *rdtype,

ompi/mca/coll/sync/coll_sync_scatterv.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
* Copyright (c) 2004-2005 The University of Tennessee and The University
66
* of Tennessee Research Foundation. All rights
77
* reserved.
8-
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
8+
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
1313
* $COPYRIGHT$
14-
*
14+
*
1515
* Additional copyrights may follow
16-
*
16+
*
1717
* $HEADER$
1818
*/
1919

@@ -29,8 +29,8 @@
2929
* Accepts: - same arguments as MPI_Scatterv()
3030
* Returns: - MPI_SUCCESS or error code
3131
*/
32-
int mca_coll_sync_scatterv(void *sbuf, int *scounts,
33-
int *disps, struct ompi_datatype_t *sdtype,
32+
int mca_coll_sync_scatterv(const void *sbuf, const int *scounts,
33+
const int *disps, struct ompi_datatype_t *sdtype,
3434
void *rbuf, int rcount,
3535
struct ompi_datatype_t *rdtype, int root,
3636
struct ompi_communicator_t *comm,

0 commit comments

Comments
 (0)