Skip to content

Unify the PMIx2x components and minor cleanup of coll/sync #1994

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions config/opal_check_pmi.m4
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ AC_DEFUN([OPAL_CHECK_PMI],[

AC_DEFUN([OPAL_CHECK_PMIX],[

OPAL_VAR_SCOPE_PUSH([opal_external_pmix_save_CPPFLAGS opal_external_pmix_save_LDFLAGS opal_external_pmix_save_LIBS])

AC_ARG_WITH([pmix],
[AC_HELP_STRING([--with-pmix(=DIR)],
[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.])])
Expand All @@ -241,14 +243,38 @@ AC_DEFUN([OPAL_CHECK_PMIX],[
AS_IF([test -z "$with_pmix" || test "$with_pmix" = "yes" || test "$with_pmix" = "internal"],
[AC_MSG_RESULT([no])
opal_external_pmix_happy=no],

[AC_MSG_RESULT([yes])
# check for external pmix lib */
AS_IF([test "$with_pmix" = "external"],
[pmix_ext_install_dir=/usr],
[pmix_ext_install_dir=$with_pmix])

# Make sure we have the headers and libs in the correct location
OPAL_CHECK_WITHDIR([external-pmix], [$pmix_ext_install_dir/include], [pmix.h])
OPAL_CHECK_WITHDIR([external-libpmix], [$pmix_ext_install_dir/lib], [libpmix.*])

# check the version
opal_external_pmix_save_CPPFLAGS=$CPPFLAGS
opal_external_pmix_save_LDFLAGS=$LDFLAGS
opal_external_pmix_save_LIBS=$LIBS

LDFLAGS="-L$pmix_ext_install_dir/lib $LDFLAGS"
AC_SEARCH_LIBS([PMIx_Register_event_handler], [pmix],
[opal_external_pmix_version=2],
[opal_external_pmix_version=1])

AC_MSG_CHECKING([PMIx version])
AC_MSG_RESULT([$opal_external_pmix_version])

CPPFLAGS=$opal_external_pmix_save_CPPFLAGS
LDFLAGS=$opal_external_pmix_save_LDFLAGS
LIBS=$opal_external_pmix_save_LIBS

opal_external_pmix_CPPFLAGS="-I$pmix_ext_install_dir/include"
opal_external_pmix_LDFLAGS=-L$pmix_ext_install_dir/lib
opal_external_pmix_LIBS=-lpmix
opal_external_pmix_happy=yes])

OPAL_VAR_SCOPE_POP
])
20 changes: 10 additions & 10 deletions ompi/mca/coll/sync/coll_sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,57 +55,57 @@ int mca_coll_sync_bcast(void *buff, int count,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);

int mca_coll_sync_exscan(void *sbuf, void *rbuf, int count,
int mca_coll_sync_exscan(const void *sbuf, void *rbuf, int count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);

int mca_coll_sync_gather(void *sbuf, int scount,
int mca_coll_sync_gather(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void *rbuf, int rcount,
struct ompi_datatype_t *rdtype,
int root,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);

int mca_coll_sync_gatherv(void *sbuf, int scount,
int mca_coll_sync_gatherv(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void *rbuf, int *rcounts, int *disps,
void *rbuf, const int *rcounts, const int *disps,
struct ompi_datatype_t *rdtype,
int root,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);

int mca_coll_sync_reduce(void *sbuf, void *rbuf, int count,
int mca_coll_sync_reduce(const void *sbuf, void *rbuf, int count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
int root,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);

int mca_coll_sync_reduce_scatter(void *sbuf, void *rbuf,
int *rcounts,
int mca_coll_sync_reduce_scatter(const void *sbuf, void *rbuf,
const int *rcounts,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);

int mca_coll_sync_scan(void *sbuf, void *rbuf, int count,
int mca_coll_sync_scan(const void *sbuf, void *rbuf, int count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);

int mca_coll_sync_scatter(void *sbuf, int scount,
int mca_coll_sync_scatter(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void *rbuf, int rcount,
struct ompi_datatype_t *rdtype,
int root,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module);

int mca_coll_sync_scatterv(void *sbuf, int *scounts, int *disps,
int mca_coll_sync_scatterv(const void *sbuf, const int *scounts, const int *disps,
struct ompi_datatype_t *sdtype,
void *rbuf, int rcount,
struct ompi_datatype_t *rdtype,
Expand Down
8 changes: 4 additions & 4 deletions ompi/mca/coll/sync/coll_sync_exscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
* Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
*
* Additional copyrights may follow
*
*
* $HEADER$
*/

Expand All @@ -29,7 +29,7 @@
* Accepts: - same arguments as MPI_Exscan()
* Returns: - MPI_SUCCESS or error code
*/
int mca_coll_sync_exscan(void *sbuf, void *rbuf, int count,
int mca_coll_sync_exscan(const void *sbuf, void *rbuf, int count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm,
Expand Down
12 changes: 6 additions & 6 deletions ompi/mca/coll/sync/coll_sync_gather.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
*
* Additional copyrights may follow
*
*
* $HEADER$
*/

Expand All @@ -29,7 +29,7 @@
* Accepts: - same arguments as MPI_Gather()
* Returns: - MPI_SUCCESS or error code
*/
int mca_coll_sync_gather(void *sbuf, int scount,
int mca_coll_sync_gather(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void *rbuf, int rcount,
struct ompi_datatype_t *rdtype,
Expand All @@ -39,11 +39,11 @@ int mca_coll_sync_gather(void *sbuf, int scount,
mca_coll_sync_module_t *s = (mca_coll_sync_module_t*) module;

if (s->in_operation) {
return s->c_coll.coll_gather(sbuf, scount, sdtype,
return s->c_coll.coll_gather(sbuf, scount, sdtype,
rbuf, rcount, rdtype, root, comm,
s->c_coll.coll_gather_module);
} else {
COLL_SYNC(s, s->c_coll.coll_gather(sbuf, scount, sdtype,
COLL_SYNC(s, s->c_coll.coll_gather(sbuf, scount, sdtype,
rbuf, rcount, rdtype, root, comm,
s->c_coll.coll_gather_module));
}
Expand Down
12 changes: 6 additions & 6 deletions ompi/mca/coll/sync/coll_sync_gatherv.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
*
* Additional copyrights may follow
*
*
* $HEADER$
*/

Expand All @@ -29,9 +29,9 @@
* Accepts: - same arguments as MPI_Gatherv()
* Returns: - MPI_SUCCESS or error code
*/
int mca_coll_sync_gatherv(void *sbuf, int scount,
int mca_coll_sync_gatherv(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void *rbuf, int *rcounts, int *disps,
void *rbuf, const int *rcounts, const int *disps,
struct ompi_datatype_t *rdtype, int root,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module)
Expand All @@ -44,7 +44,7 @@ int mca_coll_sync_gatherv(void *sbuf, int scount,
s->c_coll.coll_gatherv_module);
} else {
COLL_SYNC(s, s->c_coll.coll_gatherv(sbuf, scount, sdtype,
rbuf, rcounts, disps, rdtype,
rbuf, rcounts, disps, rdtype,
root, comm,
s->c_coll.coll_gatherv_module));
}
Expand Down
10 changes: 5 additions & 5 deletions ompi/mca/coll/sync/coll_sync_reduce.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
* Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
*
* Additional copyrights may follow
*
*
* $HEADER$
*/

Expand All @@ -28,7 +28,7 @@
* Accepts: - same as MPI_Reduce()
* Returns: - MPI_SUCCESS or error code
*/
int mca_coll_sync_reduce(void *sbuf, void *rbuf, int count,
int mca_coll_sync_reduce(const void *sbuf, void *rbuf, int count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
int root, struct ompi_communicator_t *comm,
Expand All @@ -40,7 +40,7 @@ int mca_coll_sync_reduce(void *sbuf, void *rbuf, int count,
return s->c_coll.coll_reduce(sbuf, rbuf, count, dtype, op, root, comm,
s->c_coll.coll_reduce_module);
} else {
COLL_SYNC(s, s->c_coll.coll_reduce(sbuf, rbuf, count, dtype,
COLL_SYNC(s, s->c_coll.coll_reduce(sbuf, rbuf, count, dtype,
op, root, comm,
s->c_coll.coll_reduce_module));
}
Expand Down
12 changes: 6 additions & 6 deletions ompi/mca/coll/sync/coll_sync_reduce_scatter.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
* Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
*
* Additional copyrights may follow
*
*
* $HEADER$
*/

Expand All @@ -30,7 +30,7 @@
* Accepts: - same as MPI_Reduce_scatter()
* Returns: - MPI_SUCCESS or error code
*/
int mca_coll_sync_reduce_scatter(void *sbuf, void *rbuf, int *rcounts,
int mca_coll_sync_reduce_scatter(const void *sbuf, void *rbuf, const int *rcounts,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm,
Expand All @@ -39,11 +39,11 @@ int mca_coll_sync_reduce_scatter(void *sbuf, void *rbuf, int *rcounts,
mca_coll_sync_module_t *s = (mca_coll_sync_module_t*) module;

if (s->in_operation) {
return s->c_coll.coll_reduce_scatter(sbuf, rbuf, rcounts,
return s->c_coll.coll_reduce_scatter(sbuf, rbuf, rcounts,
dtype, op, comm,
s->c_coll.coll_reduce_scatter_module);
} else {
COLL_SYNC(s, s->c_coll.coll_reduce_scatter(sbuf, rbuf, rcounts,
COLL_SYNC(s, s->c_coll.coll_reduce_scatter(sbuf, rbuf, rcounts,
dtype, op, comm,
s->c_coll.coll_reduce_scatter_module));
}
Expand Down
8 changes: 4 additions & 4 deletions ompi/mca/coll/sync/coll_sync_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
* Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
*
* Additional copyrights may follow
*
*
* $HEADER$
*/

Expand All @@ -28,7 +28,7 @@
* Accepts: - same arguments as MPI_Scan()
* Returns: - MPI_SUCCESS or error code
*/
int mca_coll_sync_scan(void *sbuf, void *rbuf, int count,
int mca_coll_sync_scan(const void *sbuf, void *rbuf, int count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm,
Expand Down
8 changes: 4 additions & 4 deletions ompi/mca/coll/sync/coll_sync_scatter.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
*
* Additional copyrights may follow
*
*
* $HEADER$
*/

Expand All @@ -29,7 +29,7 @@
* Accepts: - same arguments as MPI_Scatter()
* Returns: - MPI_SUCCESS or error code
*/
int mca_coll_sync_scatter(void *sbuf, int scount,
int mca_coll_sync_scatter(const void *sbuf, int scount,
struct ompi_datatype_t *sdtype,
void *rbuf, int rcount,
struct ompi_datatype_t *rdtype,
Expand Down
10 changes: 5 additions & 5 deletions ompi/mca/coll/sync/coll_sync_scatterv.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
*
* Additional copyrights may follow
*
*
* $HEADER$
*/

Expand All @@ -29,8 +29,8 @@
* Accepts: - same arguments as MPI_Scatterv()
* Returns: - MPI_SUCCESS or error code
*/
int mca_coll_sync_scatterv(void *sbuf, int *scounts,
int *disps, struct ompi_datatype_t *sdtype,
int mca_coll_sync_scatterv(const void *sbuf, const int *scounts,
const int *disps, struct ompi_datatype_t *sdtype,
void *rbuf, int rcount,
struct ompi_datatype_t *rdtype, int root,
struct ompi_communicator_t *comm,
Expand Down
Loading