diff --git a/ompi/mca/coll/base/coll_base_alltoall.c b/ompi/mca/coll/base/coll_base_alltoall.c index 6c8b59100f..3509ed3641 100644 --- a/ompi/mca/coll/base/coll_base_alltoall.c +++ b/ompi/mca/coll/base/coll_base_alltoall.c @@ -14,6 +14,7 @@ * reserved. * Copyright (c) 2014-2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -390,7 +391,7 @@ int ompi_coll_base_alltoall_intra_linear_sync(const void *sbuf, int scount, (max_outstanding_reqs <= 0)) ? (size - 1) : (max_outstanding_reqs)); if (0 < total_reqs) { - reqs = coll_base_comm_get_reqs(module->base_data, 2 * total_reqs); + reqs = ompi_coll_base_comm_get_reqs(module->base_data, 2 * total_reqs); if (NULL == reqs) { error = -1; line = __LINE__; goto error_hndl; } } @@ -613,7 +614,7 @@ int ompi_coll_base_alltoall_intra_basic_linear(const void *sbuf, int scount, /* Initiate all send/recv to/from others. */ - req = rreq = coll_base_comm_get_reqs(data, (size - 1) * 2); + req = rreq = ompi_coll_base_comm_get_reqs(data, (size - 1) * 2); if (NULL == req) { err = OMPI_ERR_OUT_OF_RESOURCE; line = __LINE__; goto err_hndl; } prcv = (char *) rbuf; diff --git a/ompi/mca/coll/base/coll_base_alltoallv.c b/ompi/mca/coll/base/coll_base_alltoallv.c index d7a2dbb949..aec8b85944 100644 --- a/ompi/mca/coll/base/coll_base_alltoallv.c +++ b/ompi/mca/coll/base/coll_base_alltoallv.c @@ -16,6 +16,7 @@ * Copyright (c) 2013 FUJITSU LIMITED. All rights reserved. * Copyright (c) 2014-2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -231,7 +232,7 @@ ompi_coll_base_alltoallv_intra_basic_linear(const void *sbuf, const int *scounts /* Now, initiate all send/recv to/from others. */ nreqs = 0; - reqs = preq = coll_base_comm_get_reqs(data, 2 * size); + reqs = preq = ompi_coll_base_comm_get_reqs(data, 2 * size); if( NULL == reqs ) { err = OMPI_ERR_OUT_OF_RESOURCE; goto err_hndl; } /* Post all receives first */ diff --git a/ompi/mca/coll/base/coll_base_barrier.c b/ompi/mca/coll/base/coll_base_barrier.c index 3b3fb8ad73..a190f3be72 100644 --- a/ompi/mca/coll/base/coll_base_barrier.c +++ b/ompi/mca/coll/base/coll_base_barrier.c @@ -15,6 +15,7 @@ * reserved. * Copyright (c) 2015-2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -342,7 +343,7 @@ int ompi_coll_base_barrier_intra_basic_linear(struct ompi_communicator_t *comm, /* The root collects and broadcasts the messages. */ else { - requests = coll_base_comm_get_reqs(module->base_data, size); + requests = ompi_coll_base_comm_get_reqs(module->base_data, size); if( NULL == requests ) { err = OMPI_ERR_OUT_OF_RESOURCE; line = __LINE__; goto err_hndl; } for (i = 1; i < size; ++i) { diff --git a/ompi/mca/coll/base/coll_base_bcast.c b/ompi/mca/coll/base/coll_base_bcast.c index 737af89fe3..38210bab9d 100644 --- a/ompi/mca/coll/base/coll_base_bcast.c +++ b/ompi/mca/coll/base/coll_base_bcast.c @@ -13,6 +13,7 @@ * Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -68,7 +69,7 @@ ompi_coll_base_bcast_intra_generic( void* buffer, tmpbuf = (char *) buffer; if( tree->tree_nextsize != 0 ) { - send_reqs = coll_base_comm_get_reqs(module->base_data, tree->tree_nextsize); + send_reqs = ompi_coll_base_comm_get_reqs(module->base_data, tree->tree_nextsize); if( NULL == send_reqs ) { err = OMPI_ERR_OUT_OF_RESOURCE; line = __LINE__; goto error_hndl; } } @@ -628,7 +629,7 @@ ompi_coll_base_bcast_intra_basic_linear(void *buff, int count, } /* Root sends data to all others. */ - preq = reqs = coll_base_comm_get_reqs(module->base_data, size-1); + preq = reqs = ompi_coll_base_comm_get_reqs(module->base_data, size-1); if( NULL == reqs ) { err = OMPI_ERR_OUT_OF_RESOURCE; goto err_hndl; } for (i = 0; i < size; ++i) { diff --git a/ompi/mca/coll/base/coll_base_frame.c b/ompi/mca/coll/base/coll_base_frame.c index edbbe04db1..cd080e5203 100644 --- a/ompi/mca/coll/base/coll_base_frame.c +++ b/ompi/mca/coll/base/coll_base_frame.c @@ -14,6 +14,7 @@ * reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -109,7 +110,7 @@ coll_base_comm_destruct(mca_coll_base_comm_t *data) OBJ_CLASS_INSTANCE(mca_coll_base_comm_t, opal_object_t, coll_base_comm_construct, coll_base_comm_destruct); -ompi_request_t** coll_base_comm_get_reqs(mca_coll_base_comm_t* data, int nreqs) +ompi_request_t** ompi_coll_base_comm_get_reqs(mca_coll_base_comm_t* data, int nreqs) { if( 0 == nreqs ) return NULL; diff --git a/ompi/mca/coll/base/coll_base_functions.h b/ompi/mca/coll/base/coll_base_functions.h index 54aa9e2435..9e81e2bd18 100644 --- a/ompi/mca/coll/base/coll_base_functions.h +++ b/ompi/mca/coll/base/coll_base_functions.h @@ -455,6 +455,6 @@ static inline void ompi_coll_base_free_reqs(ompi_request_t **reqs, int count) * Return the array of requests on the data. If the array was not initialized * or if it's size was too small, allocate it to fit the requested size. */ -ompi_request_t** coll_base_comm_get_reqs(mca_coll_base_comm_t* data, int nreqs); +ompi_request_t** ompi_coll_base_comm_get_reqs(mca_coll_base_comm_t* data, int nreqs); #endif /* MCA_COLL_BASE_EXPORT_H */ diff --git a/ompi/mca/coll/base/coll_base_gather.c b/ompi/mca/coll/base/coll_base_gather.c index cb4fafcf5f..83766bff2c 100644 --- a/ompi/mca/coll/base/coll_base_gather.c +++ b/ompi/mca/coll/base/coll_base_gather.c @@ -14,6 +14,7 @@ * reserved. * Copyright (c) 2015-2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -267,7 +268,7 @@ ompi_coll_base_gather_intra_linear_sync(const void *sbuf, int scount, */ char *ptmp; ompi_request_t *first_segment_req; - reqs = coll_base_comm_get_reqs(module->base_data, size); + reqs = ompi_coll_base_comm_get_reqs(module->base_data, size); if (NULL == reqs) { ret = -1; line = __LINE__; goto error_hndl; } ompi_datatype_type_size(rdtype, &typelng); diff --git a/ompi/mca/coll/base/coll_base_reduce.c b/ompi/mca/coll/base/coll_base_reduce.c index f91a16b8f1..0d9daafbc3 100644 --- a/ompi/mca/coll/base/coll_base_reduce.c +++ b/ompi/mca/coll/base/coll_base_reduce.c @@ -287,7 +287,7 @@ int ompi_coll_base_reduce_generic( const void* sendbuf, void* recvbuf, int origi int creq = 0; - sreq = coll_base_comm_get_reqs(module->base_data, max_outstanding_reqs); + sreq = ompi_coll_base_comm_get_reqs(module->base_data, max_outstanding_reqs); if (NULL == sreq) { line = __LINE__; ret = -1; goto error_hndl; } /* post first group of requests */ diff --git a/ompi/mca/coll/basic/coll_basic_allgather.c b/ompi/mca/coll/basic/coll_basic_allgather.c index 66ff5eed7f..446a5fe49a 100644 --- a/ompi/mca/coll/basic/coll_basic_allgather.c +++ b/ompi/mca/coll/basic/coll_basic_allgather.c @@ -11,6 +11,7 @@ * All rights reserved. * Copyright (c) 2014-2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -78,7 +79,7 @@ mca_coll_basic_allgather_inter(const void *sbuf, int scount, if (OMPI_SUCCESS != err) { line = __LINE__; goto exit; } /* Get a requests arrays of the right size */ - reqs = coll_base_comm_get_reqs(module->base_data, rsize + 1); + reqs = ompi_coll_base_comm_get_reqs(module->base_data, rsize + 1); if( NULL == reqs ) { line = __LINE__; err = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } /* Do a send-recv between the two root procs. to avoid deadlock */ diff --git a/ompi/mca/coll/basic/coll_basic_allreduce.c b/ompi/mca/coll/basic/coll_basic_allreduce.c index 11e090e019..84f60f2f68 100644 --- a/ompi/mca/coll/basic/coll_basic_allreduce.c +++ b/ompi/mca/coll/basic/coll_basic_allreduce.c @@ -11,6 +11,7 @@ * All rights reserved. * Copyright (c) 2015-2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -109,7 +110,7 @@ mca_coll_basic_allreduce_inter(const void *sbuf, void *rbuf, int count, pml_buffer = tmpbuf - gap; if (rsize > 1) { - reqs = coll_base_comm_get_reqs(module->base_data, rsize - 1); + reqs = ompi_coll_base_comm_get_reqs(module->base_data, rsize - 1); if( NULL == reqs ) { err = OMPI_ERR_OUT_OF_RESOURCE; line = __LINE__; goto exit; } } diff --git a/ompi/mca/coll/basic/coll_basic_alltoall.c b/ompi/mca/coll/basic/coll_basic_alltoall.c index acb08b8455..6d3ff46adc 100644 --- a/ompi/mca/coll/basic/coll_basic_alltoall.c +++ b/ompi/mca/coll/basic/coll_basic_alltoall.c @@ -14,6 +14,7 @@ * reserved. * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -77,7 +78,7 @@ mca_coll_basic_alltoall_inter(const void *sbuf, int scount, /* Initiate all send/recv to/from others. */ nreqs = size * 2; - req = rreq = coll_base_comm_get_reqs( module->base_data, nreqs); + req = rreq = ompi_coll_base_comm_get_reqs( module->base_data, nreqs); if( NULL == req ) { return OMPI_ERR_OUT_OF_RESOURCE; } sreq = rreq + size; diff --git a/ompi/mca/coll/basic/coll_basic_alltoallv.c b/ompi/mca/coll/basic/coll_basic_alltoallv.c index aa66aa3c07..26e585ce2e 100644 --- a/ompi/mca/coll/basic/coll_basic_alltoallv.c +++ b/ompi/mca/coll/basic/coll_basic_alltoallv.c @@ -15,6 +15,7 @@ * Copyright (c) 2013 FUJITSU LIMITED. All rights reserved. * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -68,7 +69,7 @@ mca_coll_basic_alltoallv_inter(const void *sbuf, const int *scounts, const int * /* Initiate all send/recv to/from others. */ nreqs = rsize * 2; - preq = coll_base_comm_get_reqs(module->base_data, nreqs); + preq = ompi_coll_base_comm_get_reqs(module->base_data, nreqs); if( NULL == preq ) { return OMPI_ERR_OUT_OF_RESOURCE; } /* Post all receives first */ diff --git a/ompi/mca/coll/basic/coll_basic_alltoallw.c b/ompi/mca/coll/basic/coll_basic_alltoallw.c index fcdc4262c9..93fa880fc2 100644 --- a/ompi/mca/coll/basic/coll_basic_alltoallw.c +++ b/ompi/mca/coll/basic/coll_basic_alltoallw.c @@ -17,6 +17,7 @@ * Copyright (c) 2014-2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -179,7 +180,7 @@ mca_coll_basic_alltoallw_intra(const void *sbuf, const int *scounts, const int * /* Initiate all send/recv to/from others. */ nreqs = 0; - reqs = preq = coll_base_comm_get_reqs(module->base_data, 2 * size); + reqs = preq = ompi_coll_base_comm_get_reqs(module->base_data, 2 * size); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } /* Post all receives first -- a simple optimization */ @@ -269,7 +270,7 @@ mca_coll_basic_alltoallw_inter(const void *sbuf, const int *scounts, const int * /* Initiate all send/recv to/from others. */ nreqs = 0; - reqs = preq = coll_base_comm_get_reqs(module->base_data, 2 * size); + reqs = preq = ompi_coll_base_comm_get_reqs(module->base_data, 2 * size); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } /* Post all receives first -- a simple optimization */ diff --git a/ompi/mca/coll/basic/coll_basic_bcast.c b/ompi/mca/coll/basic/coll_basic_bcast.c index 9dbbb9ac36..3003582ded 100644 --- a/ompi/mca/coll/basic/coll_basic_bcast.c +++ b/ompi/mca/coll/basic/coll_basic_bcast.c @@ -12,6 +12,7 @@ * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -81,7 +82,7 @@ mca_coll_basic_bcast_log_intra(void *buff, int count, /* Send data to the children. */ - reqs = coll_base_comm_get_reqs(module->base_data, size); + reqs = ompi_coll_base_comm_get_reqs(module->base_data, size); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } err = MPI_SUCCESS; @@ -156,7 +157,7 @@ mca_coll_basic_bcast_lin_inter(void *buff, int count, MCA_COLL_BASE_TAG_BCAST, comm, MPI_STATUS_IGNORE)); } else { - reqs = coll_base_comm_get_reqs(module->base_data, rsize); + reqs = ompi_coll_base_comm_get_reqs(module->base_data, rsize); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } /* root section */ diff --git a/ompi/mca/coll/basic/coll_basic_gatherv.c b/ompi/mca/coll/basic/coll_basic_gatherv.c index 047a70d4e0..60cb9ee8e6 100644 --- a/ompi/mca/coll/basic/coll_basic_gatherv.c +++ b/ompi/mca/coll/basic/coll_basic_gatherv.c @@ -11,6 +11,7 @@ * All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -142,7 +143,7 @@ mca_coll_basic_gatherv_inter(const void *sbuf, int scount, return OMPI_ERROR; } - reqs = coll_base_comm_get_reqs(module->base_data, size); + reqs = ompi_coll_base_comm_get_reqs(module->base_data, size); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } for (i = 0; i < size; ++i) { diff --git a/ompi/mca/coll/basic/coll_basic_neighbor_allgather.c b/ompi/mca/coll/basic/coll_basic_neighbor_allgather.c index 3bd17f0614..8f79b43d87 100644 --- a/ompi/mca/coll/basic/coll_basic_neighbor_allgather.c +++ b/ompi/mca/coll/basic/coll_basic_neighbor_allgather.c @@ -14,6 +14,7 @@ * reserved. * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -52,7 +53,7 @@ mca_coll_basic_neighbor_allgather_cart(const void *sbuf, int scount, ompi_datatype_get_extent(rdtype, &lb, &extent); - reqs = preqs = coll_base_comm_get_reqs( module->base_data, 4 * cart->ndims ); + reqs = preqs = ompi_coll_base_comm_get_reqs( module->base_data, 4 * cart->ndims ); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } /* The ordering is defined as -1 then +1 in each dimension in @@ -139,7 +140,7 @@ mca_coll_basic_neighbor_allgather_graph(const void *sbuf, int scount, } ompi_datatype_get_extent(rdtype, &lb, &extent); - reqs = preqs = coll_base_comm_get_reqs( module->base_data, 2 * degree); + reqs = preqs = ompi_coll_base_comm_get_reqs( module->base_data, 2 * degree); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } for (neighbor = 0; neighbor < degree ; ++neighbor) { @@ -190,7 +191,7 @@ mca_coll_basic_neighbor_allgather_dist_graph(const void *sbuf, int scount, outedges = dist_graph->out; ompi_datatype_get_extent(rdtype, &lb, &extent); - reqs = preqs = coll_base_comm_get_reqs( module->base_data, indegree + outdegree); + reqs = preqs = ompi_coll_base_comm_get_reqs( module->base_data, indegree + outdegree); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } for (neighbor = 0; neighbor < indegree ; ++neighbor) { diff --git a/ompi/mca/coll/basic/coll_basic_neighbor_allgatherv.c b/ompi/mca/coll/basic/coll_basic_neighbor_allgatherv.c index 33465f5547..f837109f90 100644 --- a/ompi/mca/coll/basic/coll_basic_neighbor_allgatherv.c +++ b/ompi/mca/coll/basic/coll_basic_neighbor_allgatherv.c @@ -14,6 +14,7 @@ * reserved. * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -51,7 +52,7 @@ mca_coll_basic_neighbor_allgatherv_cart(const void *sbuf, int scount, struct omp ompi_datatype_get_extent(rdtype, &lb, &extent); - reqs = preqs = coll_base_comm_get_reqs( module->base_data, 4 * cart->ndims); + reqs = preqs = ompi_coll_base_comm_get_reqs( module->base_data, 4 * cart->ndims); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } /* The ordering is defined as -1 then +1 in each dimension in @@ -126,7 +127,7 @@ mca_coll_basic_neighbor_allgatherv_graph(const void *sbuf, int scount, struct om } ompi_datatype_get_extent(rdtype, &lb, &extent); - reqs = preqs = coll_base_comm_get_reqs( module->base_data, 2 * degree); + reqs = preqs = ompi_coll_base_comm_get_reqs( module->base_data, 2 * degree); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } for (neighbor = 0; neighbor < degree ; ++neighbor) { @@ -175,7 +176,7 @@ mca_coll_basic_neighbor_allgatherv_dist_graph(const void *sbuf, int scount, stru outedges = dist_graph->out; ompi_datatype_get_extent(rdtype, &lb, &extent); - reqs = preqs = coll_base_comm_get_reqs( module->base_data, indegree + outdegree); + reqs = preqs = ompi_coll_base_comm_get_reqs( module->base_data, indegree + outdegree); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } for (neighbor = 0; neighbor < indegree ; ++neighbor) { diff --git a/ompi/mca/coll/basic/coll_basic_neighbor_alltoall.c b/ompi/mca/coll/basic/coll_basic_neighbor_alltoall.c index 804d398d50..70fdf9dc1b 100644 --- a/ompi/mca/coll/basic/coll_basic_neighbor_alltoall.c +++ b/ompi/mca/coll/basic/coll_basic_neighbor_alltoall.c @@ -14,6 +14,7 @@ * reserved. * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -50,7 +51,7 @@ mca_coll_basic_neighbor_alltoall_cart(const void *sbuf, int scount, struct ompi_ ompi_datatype_get_extent(rdtype, &lb, &rdextent); ompi_datatype_get_extent(sdtype, &lb, &sdextent); - reqs = preqs = coll_base_comm_get_reqs( module->base_data, 4 * cart->ndims); + reqs = preqs = ompi_coll_base_comm_get_reqs( module->base_data, 4 * cart->ndims); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } /* post receives first */ @@ -157,7 +158,7 @@ mca_coll_basic_neighbor_alltoall_graph(const void *sbuf, int scount, struct ompi ompi_datatype_get_extent(rdtype, &lb, &rdextent); ompi_datatype_get_extent(sdtype, &lb, &sdextent); - reqs = preqs = coll_base_comm_get_reqs( module->base_data, 2 * degree); + reqs = preqs = ompi_coll_base_comm_get_reqs( module->base_data, 2 * degree); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } /* post receives first */ @@ -215,7 +216,7 @@ mca_coll_basic_neighbor_alltoall_dist_graph(const void *sbuf, int scount,struct ompi_datatype_get_extent(rdtype, &lb, &rdextent); ompi_datatype_get_extent(sdtype, &lb, &sdextent); - reqs = preqs = coll_base_comm_get_reqs( module->base_data, indegree + outdegree); + reqs = preqs = ompi_coll_base_comm_get_reqs( module->base_data, indegree + outdegree); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } /* post receives first */ diff --git a/ompi/mca/coll/basic/coll_basic_neighbor_alltoallv.c b/ompi/mca/coll/basic/coll_basic_neighbor_alltoallv.c index d6c4177785..8449778140 100644 --- a/ompi/mca/coll/basic/coll_basic_neighbor_alltoallv.c +++ b/ompi/mca/coll/basic/coll_basic_neighbor_alltoallv.c @@ -14,6 +14,7 @@ * reserved. * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -51,7 +52,7 @@ mca_coll_basic_neighbor_alltoallv_cart(const void *sbuf, const int scounts[], co ompi_datatype_get_extent(rdtype, &lb, &rdextent); ompi_datatype_get_extent(sdtype, &lb, &sdextent); - reqs = preqs = coll_base_comm_get_reqs( module->base_data, 4 * cart->ndims ); + reqs = preqs = ompi_coll_base_comm_get_reqs( module->base_data, 4 * cart->ndims ); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } /* post receives first */ @@ -144,7 +145,7 @@ mca_coll_basic_neighbor_alltoallv_graph(const void *sbuf, const int scounts[], c ompi_datatype_get_extent(rdtype, &lb, &rdextent); ompi_datatype_get_extent(sdtype, &lb, &sdextent); - reqs = preqs = coll_base_comm_get_reqs( module->base_data, 2 * degree ); + reqs = preqs = ompi_coll_base_comm_get_reqs( module->base_data, 2 * degree ); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } /* post all receives first */ @@ -201,7 +202,7 @@ mca_coll_basic_neighbor_alltoallv_dist_graph(const void *sbuf, const int scounts ompi_datatype_get_extent(rdtype, &lb, &rdextent); ompi_datatype_get_extent(sdtype, &lb, &sdextent); - reqs = preqs = coll_base_comm_get_reqs( module->base_data, indegree + outdegree); + reqs = preqs = ompi_coll_base_comm_get_reqs( module->base_data, indegree + outdegree); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } /* post all receives first */ diff --git a/ompi/mca/coll/basic/coll_basic_neighbor_alltoallw.c b/ompi/mca/coll/basic/coll_basic_neighbor_alltoallw.c index 5b15574d0e..9060c82c10 100644 --- a/ompi/mca/coll/basic/coll_basic_neighbor_alltoallw.c +++ b/ompi/mca/coll/basic/coll_basic_neighbor_alltoallw.c @@ -49,7 +49,7 @@ mca_coll_basic_neighbor_alltoallw_cart(const void *sbuf, const int scounts[], co if (0 == cart->ndims) return OMPI_SUCCESS; - reqs = preqs = coll_base_comm_get_reqs( module->base_data, 4 * cart->ndims ); + reqs = preqs = ompi_coll_base_comm_get_reqs( module->base_data, 4 * cart->ndims ); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } /* post receives first */ @@ -134,7 +134,7 @@ mca_coll_basic_neighbor_alltoallw_graph(const void *sbuf, const int scounts[], c mca_topo_base_graph_neighbors_count (comm, rank, °ree); if (0 == degree) return OMPI_SUCCESS; - reqs = preqs = coll_base_comm_get_reqs( module->base_data, 2 * degree ); + reqs = preqs = ompi_coll_base_comm_get_reqs( module->base_data, 2 * degree ); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } edges = graph->edges; @@ -195,7 +195,7 @@ mca_coll_basic_neighbor_alltoallw_dist_graph(const void *sbuf, const int scounts if (0 == indegree+outdegree) return OMPI_SUCCESS; - reqs = preqs = coll_base_comm_get_reqs( module->base_data, indegree + outdegree ); + reqs = preqs = ompi_coll_base_comm_get_reqs( module->base_data, indegree + outdegree ); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } /* post all receives first */ diff --git a/ompi/mca/coll/basic/coll_basic_scatter.c b/ompi/mca/coll/basic/coll_basic_scatter.c index eef5f3136b..ea5aa7aecb 100644 --- a/ompi/mca/coll/basic/coll_basic_scatter.c +++ b/ompi/mca/coll/basic/coll_basic_scatter.c @@ -11,6 +11,7 @@ * All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -68,7 +69,7 @@ mca_coll_basic_scatter_inter(const void *sbuf, int scount, return OMPI_ERROR; } - reqs = coll_base_comm_get_reqs(module->base_data, size); + reqs = ompi_coll_base_comm_get_reqs(module->base_data, size); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } incr *= scount; diff --git a/ompi/mca/coll/basic/coll_basic_scatterv.c b/ompi/mca/coll/basic/coll_basic_scatterv.c index fe0a49be22..16602158b2 100644 --- a/ompi/mca/coll/basic/coll_basic_scatterv.c +++ b/ompi/mca/coll/basic/coll_basic_scatterv.c @@ -11,6 +11,7 @@ * All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -144,7 +145,7 @@ mca_coll_basic_scatterv_inter(const void *sbuf, const int *scounts, return OMPI_ERROR; } - reqs = coll_base_comm_get_reqs(module->base_data, size); + reqs = ompi_coll_base_comm_get_reqs(module->base_data, size); if( NULL == reqs ) { return OMPI_ERR_OUT_OF_RESOURCE; } for (i = 0; i < size; ++i) { diff --git a/ompi/mca/fcoll/base/base.h b/ompi/mca/fcoll/base/base.h index e0951cfc01..2ee125ac16 100644 --- a/ompi/mca/fcoll/base/base.h +++ b/ompi/mca/fcoll/base/base.h @@ -11,6 +11,7 @@ * All rights reserved. * Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -47,7 +48,7 @@ OMPI_DECLSPEC int mca_fcoll_base_find_available(bool enable_progress_threads, OMPI_DECLSPEC int mca_fcoll_base_init_file (struct mca_io_ompio_file_t *file); OMPI_DECLSPEC int mca_fcoll_base_get_param (struct mca_io_ompio_file_t *file, int keyval); -OMPI_DECLSPEC int fcoll_base_sort_iovec (struct iovec *iov, int num_entries, int *sorted); +OMPI_DECLSPEC int ompi_fcoll_base_sort_iovec (struct iovec *iov, int num_entries, int *sorted); /* * Globals diff --git a/ompi/mca/fcoll/base/fcoll_base_coll_array.c b/ompi/mca/fcoll/base/fcoll_base_coll_array.c index 573094dd1b..4812426f56 100644 --- a/ompi/mca/fcoll/base/fcoll_base_coll_array.c +++ b/ompi/mca/fcoll/base/fcoll_base_coll_array.c @@ -13,6 +13,7 @@ * Copyright (c) 2008-2016 University of Houston. All rights reserved. * Copyright (c) 2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -34,7 +35,7 @@ #include "ompi/mca/common/ompio/common_ompio.h" -int fcoll_base_coll_allgatherv_array (void *sbuf, +int ompi_fcoll_base_coll_allgatherv_array (void *sbuf, int scount, ompi_datatype_t *sdtype, void *rbuf, @@ -76,7 +77,7 @@ int fcoll_base_coll_allgatherv_array (void *sbuf, send_type = sdtype; } - err = fcoll_base_coll_gatherv_array (send_buf, + err = ompi_fcoll_base_coll_gatherv_array (send_buf, rcounts[j], send_type, rbuf, @@ -104,7 +105,7 @@ int fcoll_base_coll_allgatherv_array (void *sbuf, return err; } - fcoll_base_coll_bcast_array (rbuf, + ompi_fcoll_base_coll_bcast_array (rbuf, 1, newtype, root_index, @@ -117,7 +118,7 @@ int fcoll_base_coll_allgatherv_array (void *sbuf, return OMPI_SUCCESS; } -int fcoll_base_coll_gatherv_array (void *sbuf, +int ompi_fcoll_base_coll_gatherv_array (void *sbuf, int scount, ompi_datatype_t *sdtype, void *rbuf, @@ -206,7 +207,7 @@ int fcoll_base_coll_gatherv_array (void *sbuf, return err; } -int fcoll_base_coll_scatterv_array (void *sbuf, +int ompi_fcoll_base_coll_scatterv_array (void *sbuf, int *scounts, int *disps, ompi_datatype_t *sdtype, @@ -296,7 +297,7 @@ int fcoll_base_coll_scatterv_array (void *sbuf, return err; } -int fcoll_base_coll_allgather_array (void *sbuf, +int ompi_fcoll_base_coll_allgather_array (void *sbuf, int scount, ompi_datatype_t *sdtype, void *rbuf, @@ -324,7 +325,7 @@ int fcoll_base_coll_allgather_array (void *sbuf, } /* Gather and broadcast. */ - err = fcoll_base_coll_gather_array (sbuf, + err = ompi_fcoll_base_coll_gather_array (sbuf, scount, sdtype, rbuf, @@ -336,7 +337,7 @@ int fcoll_base_coll_allgather_array (void *sbuf, comm); if (OMPI_SUCCESS == err) { - err = fcoll_base_coll_bcast_array (rbuf, + err = ompi_fcoll_base_coll_bcast_array (rbuf, rcount * procs_per_group, rdtype, root_index, @@ -349,7 +350,7 @@ int fcoll_base_coll_allgather_array (void *sbuf, return err; } -int fcoll_base_coll_gather_array (void *sbuf, +int ompi_fcoll_base_coll_gather_array (void *sbuf, int scount, ompi_datatype_t *sdtype, void *rbuf, @@ -439,7 +440,7 @@ int fcoll_base_coll_gather_array (void *sbuf, return err; } -int fcoll_base_coll_bcast_array (void *buff, +int ompi_fcoll_base_coll_bcast_array (void *buff, int count, ompi_datatype_t *datatype, int root_index, diff --git a/ompi/mca/fcoll/base/fcoll_base_coll_array.h b/ompi/mca/fcoll/base/fcoll_base_coll_array.h index a0f97d7b2a..7f6c21ca48 100644 --- a/ompi/mca/fcoll/base/fcoll_base_coll_array.h +++ b/ompi/mca/fcoll/base/fcoll_base_coll_array.h @@ -13,6 +13,7 @@ * Copyright (c) 2008-2016 University of Houston. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -41,7 +42,7 @@ * Modified versions of Collective operations * Based on an array of procs in group */ -OMPI_DECLSPEC int fcoll_base_coll_gatherv_array (void *sbuf, +OMPI_DECLSPEC int ompi_fcoll_base_coll_gatherv_array (void *sbuf, int scount, ompi_datatype_t *sdtype, void *rbuf, @@ -52,7 +53,7 @@ OMPI_DECLSPEC int fcoll_base_coll_gatherv_array (void *sbuf, int *procs_in_group, int procs_per_group, ompi_communicator_t *comm); -OMPI_DECLSPEC int fcoll_base_coll_scatterv_array (void *sbuf, +OMPI_DECLSPEC int ompi_fcoll_base_coll_scatterv_array (void *sbuf, int *scounts, int *disps, ompi_datatype_t *sdtype, @@ -63,7 +64,7 @@ OMPI_DECLSPEC int fcoll_base_coll_scatterv_array (void *sbuf, int *procs_in_group, int procs_per_group, ompi_communicator_t *comm); -OMPI_DECLSPEC int fcoll_base_coll_allgather_array (void *sbuf, +OMPI_DECLSPEC int ompi_fcoll_base_coll_allgather_array (void *sbuf, int scount, ompi_datatype_t *sdtype, void *rbuf, @@ -74,7 +75,7 @@ OMPI_DECLSPEC int fcoll_base_coll_allgather_array (void *sbuf, int procs_per_group, ompi_communicator_t *comm); -OMPI_DECLSPEC int fcoll_base_coll_allgatherv_array (void *sbuf, +OMPI_DECLSPEC int ompi_fcoll_base_coll_allgatherv_array (void *sbuf, int scount, ompi_datatype_t *sdtype, void *rbuf, @@ -85,7 +86,7 @@ OMPI_DECLSPEC int fcoll_base_coll_allgatherv_array (void *sbuf, int *procs_in_group, int procs_per_group, ompi_communicator_t *comm); -OMPI_DECLSPEC int fcoll_base_coll_gather_array (void *sbuf, +OMPI_DECLSPEC int ompi_fcoll_base_coll_gather_array (void *sbuf, int scount, ompi_datatype_t *sdtype, void *rbuf, @@ -95,7 +96,7 @@ OMPI_DECLSPEC int fcoll_base_coll_gather_array (void *sbuf, int *procs_in_group, int procs_per_group, ompi_communicator_t *comm); -OMPI_DECLSPEC int fcoll_base_coll_bcast_array (void *buff, +OMPI_DECLSPEC int ompi_fcoll_base_coll_bcast_array (void *buff, int count, ompi_datatype_t *datatype, int root_index, diff --git a/ompi/mca/fcoll/base/fcoll_base_sort.c b/ompi/mca/fcoll/base/fcoll_base_sort.c index 685a6d8b11..03a74aaf2c 100644 --- a/ompi/mca/fcoll/base/fcoll_base_sort.c +++ b/ompi/mca/fcoll/base/fcoll_base_sort.c @@ -11,6 +11,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2016 University of Houston. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -23,7 +24,7 @@ #include "ompi/mca/common/ompio/common_ompio.h" -int fcoll_base_sort_iovec (struct iovec *iov, +int ompi_fcoll_base_sort_iovec (struct iovec *iov, int num_entries, int *sorted) { diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c index ae71905971..bfaad026a4 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c @@ -12,6 +12,7 @@ * Copyright (c) 2008-2015 University of Houston. All rights reserved. * Copyright (c) 2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -164,7 +165,7 @@ mca_fcoll_dynamic_file_read_all (mca_io_ompio_file_t *fh, #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_rcomm_time = MPI_Wtime(); #endif - ret = fcoll_base_coll_allgather_array (&max_data, + ret = ompi_fcoll_base_coll_allgather_array (&max_data, 1, MPI_LONG, total_bytes_per_process, @@ -216,7 +217,7 @@ mca_fcoll_dynamic_file_read_all (mca_io_ompio_file_t *fh, #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_rcomm_time = MPI_Wtime(); #endif - ret = fcoll_base_coll_allgather_array (&local_count, + ret = ompi_fcoll_base_coll_allgather_array (&local_count, 1, MPI_INT, fview_count, @@ -274,7 +275,7 @@ mca_fcoll_dynamic_file_read_all (mca_io_ompio_file_t *fh, #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_rcomm_time = MPI_Wtime(); #endif - ret = fcoll_base_coll_allgatherv_array (local_iov_array, + ret = ompi_fcoll_base_coll_allgatherv_array (local_iov_array, local_count, fh->f_iov_type, global_iov_array, @@ -309,7 +310,7 @@ mca_fcoll_dynamic_file_read_all (mca_io_ompio_file_t *fh, ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - fcoll_base_sort_iovec (global_iov_array, total_fview_count, sorted); + ompi_fcoll_base_sort_iovec (global_iov_array, total_fview_count, sorted); } if (NULL != local_iov_array) { diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c index f1ba18014c..bc94068a14 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c @@ -12,6 +12,7 @@ * Copyright (c) 2008-2015 University of Houston. All rights reserved. * Copyright (c) 2015-2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -168,7 +169,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_comm_time = MPI_Wtime(); #endif - ret = fcoll_base_coll_allgather_array (&max_data, + ret = ompi_fcoll_base_coll_allgather_array (&max_data, 1, MPI_LONG, total_bytes_per_process, @@ -231,7 +232,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_comm_time = MPI_Wtime(); #endif - ret = fcoll_base_coll_allgather_array (&local_count, + ret = ompi_fcoll_base_coll_allgather_array (&local_count, 1, MPI_INT, fview_count, @@ -293,7 +294,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_comm_time = MPI_Wtime(); #endif - ret = fcoll_base_coll_allgatherv_array (local_iov_array, + ret = ompi_fcoll_base_coll_allgatherv_array (local_iov_array, local_count, fh->f_iov_type, global_iov_array, @@ -327,7 +328,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - fcoll_base_sort_iovec (global_iov_array, total_fview_count, sorted); + ompi_fcoll_base_sort_iovec (global_iov_array, total_fview_count, sorted); } if (NULL != local_iov_array){ diff --git a/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2_file_read_all.c b/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2_file_read_all.c index fd94b4ef15..b4a5492db2 100644 --- a/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2_file_read_all.c +++ b/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2_file_read_all.c @@ -12,6 +12,7 @@ * Copyright (c) 2008-2015 University of Houston. All rights reserved. * Copyright (c) 2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -164,7 +165,7 @@ mca_fcoll_dynamic_gen2_file_read_all (mca_io_ompio_file_t *fh, #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_rcomm_time = MPI_Wtime(); #endif - ret = fcoll_base_coll_allgather_array (&max_data, + ret = ompi_fcoll_base_coll_allgather_array (&max_data, 1, MPI_LONG, total_bytes_per_process, @@ -216,7 +217,7 @@ mca_fcoll_dynamic_gen2_file_read_all (mca_io_ompio_file_t *fh, #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_rcomm_time = MPI_Wtime(); #endif - ret = fcoll_base_coll_allgather_array (&local_count, + ret = ompi_fcoll_base_coll_allgather_array (&local_count, 1, MPI_INT, fview_count, @@ -274,7 +275,7 @@ mca_fcoll_dynamic_gen2_file_read_all (mca_io_ompio_file_t *fh, #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_rcomm_time = MPI_Wtime(); #endif - ret = fcoll_base_coll_allgatherv_array (local_iov_array, + ret = ompi_fcoll_base_coll_allgatherv_array (local_iov_array, local_count, fh->f_iov_type, global_iov_array, @@ -309,7 +310,7 @@ mca_fcoll_dynamic_gen2_file_read_all (mca_io_ompio_file_t *fh, ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - fcoll_base_sort_iovec (global_iov_array, total_fview_count, sorted); + ompi_fcoll_base_sort_iovec (global_iov_array, total_fview_count, sorted); } if (NULL != local_iov_array) { diff --git a/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2_file_write_all.c b/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2_file_write_all.c index f9d713725d..a72817d7a5 100644 --- a/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2_file_write_all.c +++ b/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2_file_write_all.c @@ -12,6 +12,7 @@ * Copyright (c) 2008-2016 University of Houston. All rights reserved. * Copyright (c) 2015-2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -274,7 +275,7 @@ int mca_fcoll_dynamic_gen2_file_write_all (mca_io_ompio_file_t *fh, fh->f_comm->c_coll->coll_allgather_module); } else { - ret = fcoll_base_coll_allgather_array (broken_total_lengths, + ret = ompi_fcoll_base_coll_allgather_array (broken_total_lengths, dynamic_gen2_num_io_procs, MPI_LONG, total_bytes_per_process, @@ -333,7 +334,7 @@ int mca_fcoll_dynamic_gen2_file_write_all (mca_io_ompio_file_t *fh, fh->f_comm->c_coll->coll_allgather_module); } else { - ret = fcoll_base_coll_allgather_array (broken_counts, + ret = ompi_fcoll_base_coll_allgather_array (broken_counts, dynamic_gen2_num_io_procs, MPI_INT, result_counts, @@ -420,7 +421,7 @@ int mca_fcoll_dynamic_gen2_file_write_all (mca_io_ompio_file_t *fh, fh->f_comm->c_coll->coll_allgatherv_module ); } else { - ret = fcoll_base_coll_allgatherv_array (broken_iov_arrays[i], + ret = ompi_fcoll_base_coll_allgatherv_array (broken_iov_arrays[i], broken_counts[i], fh->f_iov_type, aggr_data[i]->global_iov_array, @@ -455,7 +456,7 @@ int mca_fcoll_dynamic_gen2_file_write_all (mca_io_ompio_file_t *fh, ret = OMPI_ERR_OUT_OF_RESOURCE; goto exit; } - fcoll_base_sort_iovec (aggr_data[i]->global_iov_array, total_fview_count, aggr_data[i]->sorted); + ompi_fcoll_base_sort_iovec (aggr_data[i]->global_iov_array, total_fview_count, aggr_data[i]->sorted); } if (NULL != local_iov_array){ diff --git a/ompi/mca/fcoll/static/fcoll_static_file_read_all.c b/ompi/mca/fcoll/static/fcoll_static_file_read_all.c index c15c4db084..6afed7f29f 100644 --- a/ompi/mca/fcoll/static/fcoll_static_file_read_all.c +++ b/ompi/mca/fcoll/static/fcoll_static_file_read_all.c @@ -14,6 +14,7 @@ * Copyright (c) 2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. * + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -294,7 +295,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_rexch = MPI_Wtime(); #endif - ret = fcoll_base_coll_allgather_array (&iov_size, + ret = ompi_fcoll_base_coll_allgather_array (&iov_size, 1, MPI_INT, iovec_count_per_process, @@ -337,7 +338,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_rexch = MPI_Wtime(); #endif - ret = fcoll_base_coll_gatherv_array (local_iov_array, + ret = ompi_fcoll_base_coll_gatherv_array (local_iov_array, iov_size, io_array_type, global_iov_array, @@ -496,7 +497,7 @@ mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_rexch = MPI_Wtime(); #endif - fcoll_base_coll_gather_array (&bytes_to_read_in_cycle, + ompi_fcoll_base_coll_gather_array (&bytes_to_read_in_cycle, 1, MPI_INT, bytes_per_process, diff --git a/ompi/mca/fcoll/static/fcoll_static_file_write_all.c b/ompi/mca/fcoll/static/fcoll_static_file_write_all.c index 66518f134c..99255b0589 100644 --- a/ompi/mca/fcoll/static/fcoll_static_file_write_all.c +++ b/ompi/mca/fcoll/static/fcoll_static_file_write_all.c @@ -13,6 +13,7 @@ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights reserved. * Copyright (c) 2015-2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -295,7 +296,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_exch = MPI_Wtime(); #endif - ret = fcoll_base_coll_allgather_array (&iov_size, + ret = ompi_fcoll_base_coll_allgather_array (&iov_size, 1, MPI_INT, iovec_count_per_process, @@ -339,7 +340,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN start_exch = MPI_Wtime(); #endif - ret = fcoll_base_coll_gatherv_array (local_iov_array, + ret = ompi_fcoll_base_coll_gatherv_array (local_iov_array, iov_size, io_array_type, global_iov_array, @@ -500,7 +501,7 @@ mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, start_exch = MPI_Wtime(); #endif /* gather from each process how many bytes each will be sending */ - ret = fcoll_base_coll_gather_array (&bytes_to_write_in_cycle, + ret = ompi_fcoll_base_coll_gather_array (&bytes_to_write_in_cycle, 1, MPI_INT, bytes_per_process, diff --git a/ompi/mca/io/ompio/io_ompio_aggregators.c b/ompi/mca/io/ompio/io_ompio_aggregators.c index ed25b269ed..8d3096bcf3 100644 --- a/ompi/mca/io/ompio/io_ompio_aggregators.c +++ b/ompi/mca/io/ompio/io_ompio_aggregators.c @@ -15,6 +15,7 @@ * Copyright (c) 2012-2013 Inria. All rights reserved. * Copyright (c) 2015-2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -921,7 +922,7 @@ int mca_io_ompio_merge_groups(mca_io_ompio_file_t *fh, //merge_aggrs[0] is considered the new aggregator //New aggregator collects group sizes of the groups to be merged - ret = fcoll_base_coll_allgather_array (&fh->f_init_procs_per_group, + ret = ompi_fcoll_base_coll_allgather_array (&fh->f_init_procs_per_group, 1, MPI_INT, sizes_old_group, @@ -957,7 +958,7 @@ int mca_io_ompio_merge_groups(mca_io_ompio_file_t *fh, //New aggregator also collects the grouping distribution //This is the actual merge //use allgatherv array - ret = fcoll_base_coll_allgatherv_array (fh->f_init_procs_in_group, + ret = ompi_fcoll_base_coll_allgatherv_array (fh->f_init_procs_in_group, fh->f_init_procs_per_group, MPI_INT, fh->f_procs_in_group, @@ -1140,7 +1141,7 @@ int mca_io_ompio_prepare_to_group(mca_io_ompio_file_t *fh, } //Gather start offsets across processes in a group on aggregator - ret = fcoll_base_coll_allgather_array (start_offset_len, + ret = ompi_fcoll_base_coll_allgather_array (start_offset_len, 3, OMPI_OFFSET_DATATYPE, start_offsets_lens_tmp, @@ -1151,7 +1152,7 @@ int mca_io_ompio_prepare_to_group(mca_io_ompio_file_t *fh, fh->f_init_procs_per_group, fh->f_comm); if ( OMPI_SUCCESS != ret ) { - opal_output (1, "mca_io_ompio_prepare_to_grou[: error in fcoll_base_coll_allgather_array\n"); + opal_output (1, "mca_io_ompio_prepare_to_grou[: error in ompi_fcoll_base_coll_allgather_array\n"); goto exit; } end_offsets_tmp = (OMPI_MPI_OFFSET_TYPE* )malloc (fh->f_init_procs_per_group * sizeof(OMPI_MPI_OFFSET_TYPE)); @@ -1191,7 +1192,7 @@ int mca_io_ompio_prepare_to_group(mca_io_ompio_file_t *fh, goto exit; } //Communicate bytes per group between all aggregators - ret = fcoll_base_coll_allgather_array (bytes_per_group, + ret = ompi_fcoll_base_coll_allgather_array (bytes_per_group, 1, OMPI_OFFSET_DATATYPE, aggr_bytes_per_group_tmp, @@ -1202,7 +1203,7 @@ int mca_io_ompio_prepare_to_group(mca_io_ompio_file_t *fh, fh->f_init_num_aggrs, fh->f_comm); if ( OMPI_SUCCESS != ret ) { - opal_output (1, "mca_io_ompio_prepare_to_grou[: error in fcoll_base_coll_allgather_array 2\n"); + opal_output (1, "mca_io_ompio_prepare_to_grou[: error in ompi_fcoll_base_coll_allgather_array 2\n"); free(decision_list_tmp); goto exit; } @@ -1276,7 +1277,7 @@ int mca_io_ompio_prepare_to_group(mca_io_ompio_file_t *fh, *decision_list = &decision_list_tmp[0]; } //Communicate flag to all group members - ret = fcoll_base_coll_bcast_array (ompio_grouping_flag, + ret = ompi_fcoll_base_coll_bcast_array (ompio_grouping_flag, 1, MPI_INT, 0, diff --git a/ompi/mca/pml/v/pml_v_component.c b/ompi/mca/pml/v/pml_v_component.c index eb09036fb7..650f681cc4 100644 --- a/ompi/mca/pml/v/pml_v_component.c +++ b/ompi/mca/pml/v/pml_v_component.c @@ -7,6 +7,7 @@ * reserved. * Copyright (c) 2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -100,7 +101,7 @@ static int mca_pml_v_component_register(void) static int mca_pml_v_component_open(void) { int rc; - pml_v_output_open(ompi_pml_v_output, ompi_pml_v_verbose); + ompi_pml_v_output_open(ompi_pml_v_output, ompi_pml_v_verbose); V_OUTPUT_VERBOSE(500, "loaded"); @@ -111,7 +112,7 @@ static int mca_pml_v_component_open(void) } if( NULL == mca_vprotocol_base_include_list ) { - pml_v_output_close(); + ompi_pml_v_output_close(); return mca_base_framework_close(&ompi_vprotocol_base_framework); } @@ -136,7 +137,7 @@ static int mca_pml_v_component_close(void) } /* Make sure to close out output even if vprotocol isn't in use */ - pml_v_output_close (); + ompi_pml_v_output_close (); /* Mark that we have changed something */ snprintf(mca_pml_base_selected_component.pmlm_version.mca_component_name, @@ -188,7 +189,7 @@ static int mca_pml_v_component_parasite_close(void) mca_pml_base_selected_component = mca_pml_v.host_pml_component; (void) mca_base_framework_close(&ompi_vprotocol_base_framework); - pml_v_output_close(); + ompi_pml_v_output_close(); mca_pml.pml_enable = mca_pml_v.host_pml.pml_enable; /* don't need to call the host component's close: pml_base will do it */ diff --git a/ompi/mca/pml/v/pml_v_output.c b/ompi/mca/pml/v/pml_v_output.c index 4d9102a822..6fa44042ad 100644 --- a/ompi/mca/pml/v/pml_v_output.c +++ b/ompi/mca/pml/v/pml_v_output.c @@ -1,6 +1,7 @@ /* * Copyright (c) 2004-2007 The Trustees of the University of Tennessee. * All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -19,7 +20,7 @@ #endif #include -int pml_v_output_open(char *output, int verbosity) { +int ompi_pml_v_output_open(char *output, int verbosity) { opal_output_stream_t lds; char hostname[OPAL_MAXHOSTNAMELEN] = "NA"; @@ -49,7 +50,7 @@ int pml_v_output_open(char *output, int verbosity) { return mca_pml_v.output; } -void pml_v_output_close(void) { +void ompi_pml_v_output_close(void) { opal_output_close(mca_pml_v.output); mca_pml_v.output = -1; } diff --git a/ompi/mca/pml/v/pml_v_output.h b/ompi/mca/pml/v/pml_v_output.h index 77bb5b1405..3ddf213e26 100644 --- a/ompi/mca/pml/v/pml_v_output.h +++ b/ompi/mca/pml/v/pml_v_output.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2004-2007 The Trustees of the University of Tennessee. * All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -18,8 +19,8 @@ BEGIN_C_DECLS -int pml_v_output_open(char *output, int verbosity); -void pml_v_output_close(void); +int ompi_pml_v_output_open(char *output, int verbosity); +void ompi_pml_v_output_close(void); static inline void V_OUTPUT_ERR(const char *fmt, ... ) __opal_attribute_format__(__printf__, 1, 2); static inline void V_OUTPUT_ERR(const char *fmt, ... ) diff --git a/ompi/mpi/fortran/mpif-h/register_datarep_f.c b/ompi/mpi/fortran/mpif-h/register_datarep_f.c index 0121d92121..63e31191ba 100644 --- a/ompi/mpi/fortran/mpif-h/register_datarep_f.c +++ b/ompi/mpi/fortran/mpif-h/register_datarep_f.c @@ -12,6 +12,7 @@ * Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2015-2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -95,12 +96,12 @@ typedef struct intercept_extra_state { ompi_mpi2_fortran_datarep_conversion_fn_t *write_fn_f77; ompi_mpi2_fortran_datarep_extent_fn_t *extent_fn_f77; MPI_Aint *extra_state_f77; -} intercept_extra_state_t; +} ompi_intercept_extra_state_t; -OBJ_CLASS_DECLARATION(intercept_extra_state_t); +OBJ_CLASS_DECLARATION(ompi_intercept_extra_state_t); #if !OMPI_BUILD_MPI_PROFILING || OPAL_HAVE_WEAK_SYMBOLS -static void intercept_extra_state_constructor(intercept_extra_state_t *obj) +static void intercept_extra_state_constructor(ompi_intercept_extra_state_t *obj) { obj->read_fn_f77 = NULL; obj->write_fn_f77 = NULL; @@ -108,7 +109,7 @@ static void intercept_extra_state_constructor(intercept_extra_state_t *obj) obj->extra_state_f77 = NULL; } -OBJ_CLASS_INSTANCE(intercept_extra_state_t, +OBJ_CLASS_INSTANCE(ompi_intercept_extra_state_t, opal_list_item_t, intercept_extra_state_constructor, NULL); #endif /* !OMPI_BUILD_MPI_PROFILING */ @@ -137,10 +138,10 @@ void ompi_register_datarep_f(char *datarep, char *c_datarep; int c_ierr, ret; MPI_Datarep_conversion_function *read_fn_c, *write_fn_c; - intercept_extra_state_t *intercept; + ompi_intercept_extra_state_t *intercept; /* Malloc space for the intercept callback data */ - intercept = OBJ_NEW(intercept_extra_state_t); + intercept = OBJ_NEW(ompi_intercept_extra_state_t); if (NULL == intercept) { c_ierr = OMPI_ERRHANDLER_INVOKE(MPI_FILE_NULL, OMPI_ERR_OUT_OF_RESOURCE, FUNC_NAME); @@ -210,8 +211,8 @@ static int read_intercept_fn(void *userbuf, MPI_Datatype type_c, int count_c, { MPI_Fint ierr, count_f77 = OMPI_FINT_2_INT(count_c); MPI_Fint type_f77 = PMPI_Type_c2f(type_c); - intercept_extra_state_t *intercept_data = - (intercept_extra_state_t*) extra_state; + ompi_intercept_extra_state_t *intercept_data = + (ompi_intercept_extra_state_t*) extra_state; intercept_data->read_fn_f77((char *) userbuf, &type_f77, &count_f77, (char *) filebuf, &position, intercept_data->extra_state_f77, @@ -228,8 +229,8 @@ static int write_intercept_fn(void *userbuf, MPI_Datatype type_c, int count_c, { MPI_Fint ierr, count_f77 = OMPI_FINT_2_INT(count_c); MPI_Fint type_f77 = PMPI_Type_c2f(type_c); - intercept_extra_state_t *intercept_data = - (intercept_extra_state_t*) extra_state; + ompi_intercept_extra_state_t *intercept_data = + (ompi_intercept_extra_state_t*) extra_state; intercept_data->write_fn_f77((char *) userbuf, &type_f77, &count_f77, (char *) filebuf, &position, intercept_data->extra_state_f77, @@ -244,8 +245,8 @@ static int extent_intercept_fn(MPI_Datatype type_c, MPI_Aint *file_extent_f77, void *extra_state) { MPI_Fint ierr, type_f77 = PMPI_Type_c2f(type_c); - intercept_extra_state_t *intercept_data = - (intercept_extra_state_t*) extra_state; + ompi_intercept_extra_state_t *intercept_data = + (ompi_intercept_extra_state_t*) extra_state; intercept_data->extent_fn_f77(&type_f77, file_extent_f77, intercept_data->extra_state_f77, &ierr); diff --git a/ompi/mpi/tool/category_changed.c b/ompi/mpi/tool/category_changed.c index d6a18c8ba8..aed854ba66 100644 --- a/ompi/mpi/tool/category_changed.c +++ b/ompi/mpi/tool/category_changed.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -27,9 +28,9 @@ int MPI_T_category_changed(int *stamp) return MPI_T_ERR_NOT_INITIALIZED; } - mpit_lock (); + ompi_mpit_lock (); *stamp = mca_base_var_group_get_stamp (); - mpit_unlock (); + ompi_mpit_unlock (); return MPI_SUCCESS; } diff --git a/ompi/mpi/tool/category_get_categories.c b/ompi/mpi/tool/category_get_categories.c index 5be82880b4..0e85d9edd4 100644 --- a/ompi/mpi/tool/category_get_categories.c +++ b/ompi/mpi/tool/category_get_categories.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -32,7 +33,7 @@ int MPI_T_category_get_categories(int cat_index, int len, int indices[]) return MPI_T_ERR_NOT_INITIALIZED; } - mpit_lock (); + ompi_mpit_lock (); do { rc = mca_base_var_group_get (cat_index, &group); @@ -49,7 +50,7 @@ int MPI_T_category_get_categories(int cat_index, int len, int indices[]) } } while (0); - mpit_unlock (); + ompi_mpit_unlock (); return rc; } diff --git a/ompi/mpi/tool/category_get_cvars.c b/ompi/mpi/tool/category_get_cvars.c index ea9424f5ca..9983958aef 100644 --- a/ompi/mpi/tool/category_get_cvars.c +++ b/ompi/mpi/tool/category_get_cvars.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -32,7 +33,7 @@ int MPI_T_category_get_cvars(int cat_index, int len, int indices[]) return MPI_T_ERR_NOT_INITIALIZED; } - mpit_lock (); + ompi_mpit_lock (); do { rc = mca_base_var_group_get (cat_index, &group); @@ -49,7 +50,7 @@ int MPI_T_category_get_cvars(int cat_index, int len, int indices[]) } } while (0); - mpit_unlock (); + ompi_mpit_unlock (); return rc; } diff --git a/ompi/mpi/tool/category_get_index.c b/ompi/mpi/tool/category_get_index.c index 6edb6f2af4..f25473c7b8 100644 --- a/ompi/mpi/tool/category_get_index.c +++ b/ompi/mpi/tool/category_get_index.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2014 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -33,9 +34,9 @@ int MPI_T_category_get_index (const char *name, int *category_index) return MPI_ERR_ARG; } - mpit_lock (); + ompi_mpit_lock (); ret = mca_base_var_group_find_by_name (name, category_index); - mpit_unlock (); + ompi_mpit_unlock (); if (OPAL_SUCCESS != ret) { return MPI_T_ERR_INVALID_NAME; } diff --git a/ompi/mpi/tool/category_get_info.c b/ompi/mpi/tool/category_get_info.c index c10a2aa708..2b6766e54f 100644 --- a/ompi/mpi/tool/category_get_info.c +++ b/ompi/mpi/tool/category_get_info.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -32,7 +33,7 @@ int MPI_T_category_get_info(int cat_index, char *name, int *name_len, return MPI_T_ERR_NOT_INITIALIZED; } - mpit_lock (); + ompi_mpit_lock (); do { rc = mca_base_var_group_get (cat_index, &group); @@ -57,7 +58,7 @@ int MPI_T_category_get_info(int cat_index, char *name, int *name_len, mpit_copy_string (desc, desc_len, group->group_description); } while (0); - mpit_unlock (); + ompi_mpit_unlock (); return rc; } diff --git a/ompi/mpi/tool/category_get_num.c b/ompi/mpi/tool/category_get_num.c index dbab0b2bf6..cfbfcd8b0e 100644 --- a/ompi/mpi/tool/category_get_num.c +++ b/ompi/mpi/tool/category_get_num.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -31,9 +32,9 @@ int MPI_T_category_get_num (int *num_cat) return MPI_ERR_ARG; } - mpit_lock (); + ompi_mpit_lock (); *num_cat = mca_base_var_group_get_count (); - mpit_unlock (); + ompi_mpit_unlock (); return MPI_SUCCESS; } diff --git a/ompi/mpi/tool/category_get_pvars.c b/ompi/mpi/tool/category_get_pvars.c index 3936fb9b02..e6337ed2fe 100644 --- a/ompi/mpi/tool/category_get_pvars.c +++ b/ompi/mpi/tool/category_get_pvars.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-213 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -32,7 +33,7 @@ int MPI_T_category_get_pvars(int cat_index, int len, int indices[]) return MPI_T_ERR_NOT_INITIALIZED; } - mpit_lock (); + ompi_mpit_lock (); do { rc = mca_base_var_group_get (cat_index, &group); @@ -49,7 +50,7 @@ int MPI_T_category_get_pvars(int cat_index, int len, int indices[]) } } while (0); - mpit_unlock (); + ompi_mpit_unlock (); return rc; } diff --git a/ompi/mpi/tool/cvar_get_index.c b/ompi/mpi/tool/cvar_get_index.c index e587adf7f3..2445d0462c 100644 --- a/ompi/mpi/tool/cvar_get_index.c +++ b/ompi/mpi/tool/cvar_get_index.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2014 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -33,9 +34,9 @@ int MPI_T_cvar_get_index (const char *name, int *cvar_index) return MPI_ERR_ARG; } - mpit_lock (); + ompi_mpit_lock (); ret = mca_base_var_find_by_name (name, cvar_index); - mpit_unlock (); + ompi_mpit_unlock (); if (OPAL_SUCCESS != ret) { return MPI_T_ERR_INVALID_NAME; } diff --git a/ompi/mpi/tool/cvar_get_info.c b/ompi/mpi/tool/cvar_get_info.c index e6f70c0c74..ba3bde12f8 100644 --- a/ompi/mpi/tool/cvar_get_info.c +++ b/ompi/mpi/tool/cvar_get_info.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -32,7 +33,7 @@ int MPI_T_cvar_get_info(int cvar_index, char *name, int *name_len, int *verbosit return MPI_T_ERR_NOT_INITIALIZED; } - mpit_lock (); + ompi_mpit_lock (); do { rc = mca_base_var_get (cvar_index, &var); @@ -69,7 +70,7 @@ int MPI_T_cvar_get_info(int cvar_index, char *name, int *name_len, int *verbosit } } while (0); - mpit_unlock (); + ompi_mpit_unlock (); return rc; } diff --git a/ompi/mpi/tool/cvar_get_num.c b/ompi/mpi/tool/cvar_get_num.c index 7ece8df6d8..10e04514ee 100644 --- a/ompi/mpi/tool/cvar_get_num.c +++ b/ompi/mpi/tool/cvar_get_num.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -30,9 +31,9 @@ int MPI_T_cvar_get_num (int *num_cvar) { return MPI_ERR_ARG; } - mpit_lock (); + ompi_mpit_lock (); *num_cvar = mca_base_var_get_count(); - mpit_unlock (); + ompi_mpit_unlock (); return MPI_SUCCESS; } diff --git a/ompi/mpi/tool/cvar_handle_alloc.c b/ompi/mpi/tool/cvar_handle_alloc.c index 0ef8eea42d..6e0ae41dd3 100644 --- a/ompi/mpi/tool/cvar_handle_alloc.c +++ b/ompi/mpi/tool/cvar_handle_alloc.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -35,7 +36,7 @@ int MPI_T_cvar_handle_alloc (int cvar_index, void *obj_handle, return MPI_ERR_ARG; } - mpit_lock (); + ompi_mpit_lock (); *handle = NULL; @@ -68,7 +69,7 @@ int MPI_T_cvar_handle_alloc (int cvar_index, void *obj_handle, *handle = (MPI_T_cvar_handle) new_handle; } while (0); - mpit_unlock (); + ompi_mpit_unlock (); return rc; } diff --git a/ompi/mpi/tool/cvar_read.c b/ompi/mpi/tool/cvar_read.c index e79df41f81..63ce6aa105 100644 --- a/ompi/mpi/tool/cvar_read.c +++ b/ompi/mpi/tool/cvar_read.c @@ -4,6 +4,7 @@ * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2016 Intel, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -35,7 +36,7 @@ int MPI_T_cvar_read (MPI_T_cvar_handle handle, void *buf) return MPI_ERR_ARG; } - mpit_lock (); + ompi_mpit_lock (); do { rc = mca_base_var_get_value(handle->var->mbv_index, &value, NULL, NULL); @@ -78,7 +79,7 @@ int MPI_T_cvar_read (MPI_T_cvar_handle handle, void *buf) } } while (0); - mpit_unlock (); + ompi_mpit_unlock (); return rc; } diff --git a/ompi/mpi/tool/cvar_write.c b/ompi/mpi/tool/cvar_write.c index a76e6a39c5..4d660416e0 100644 --- a/ompi/mpi/tool/cvar_write.c +++ b/ompi/mpi/tool/cvar_write.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -33,7 +34,7 @@ int MPI_T_cvar_write (MPI_T_cvar_handle handle, const void *buf) return MPI_ERR_ARG; } - mpit_lock (); + ompi_mpit_lock (); do { if (MCA_BASE_VAR_SCOPE_CONSTANT == handle->var->mbv_scope || @@ -53,7 +54,7 @@ int MPI_T_cvar_write (MPI_T_cvar_handle handle, const void *buf) } } while (0); - mpit_unlock (); + ompi_mpit_unlock (); return rc; } diff --git a/ompi/mpi/tool/enum_get_info.c b/ompi/mpi/tool/enum_get_info.c index 129682c2d3..4e87bd0a67 100644 --- a/ompi/mpi/tool/enum_get_info.c +++ b/ompi/mpi/tool/enum_get_info.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -29,7 +30,7 @@ int MPI_T_enum_get_info(MPI_T_enum enumtype, int *num, char *name, int *name_len return MPI_T_ERR_NOT_INITIALIZED; } - mpit_lock (); + ompi_mpit_lock (); do { if (num) { @@ -43,7 +44,7 @@ int MPI_T_enum_get_info(MPI_T_enum enumtype, int *num, char *name, int *name_len mpit_copy_string (name, name_len, enumtype->enum_name); } while (0); - mpit_unlock (); + ompi_mpit_unlock (); return rc; } diff --git a/ompi/mpi/tool/enum_get_item.c b/ompi/mpi/tool/enum_get_item.c index f86f3abecd..e9e8fff9ac 100644 --- a/ompi/mpi/tool/enum_get_item.c +++ b/ompi/mpi/tool/enum_get_item.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -31,7 +32,7 @@ int MPI_T_enum_get_item(MPI_T_enum enumtype, int index, int *value, char *name, return MPI_T_ERR_NOT_INITIALIZED; } - mpit_lock (); + ompi_mpit_lock (); do { rc = enumtype->get_count (enumtype, &count); @@ -54,7 +55,7 @@ int MPI_T_enum_get_item(MPI_T_enum enumtype, int index, int *value, char *name, mpit_copy_string(name, name_len, tmp); } while (0); - mpit_unlock (); + ompi_mpit_unlock (); return rc; } diff --git a/ompi/mpi/tool/finalize.c b/ompi/mpi/tool/finalize.c index 38a0ce31ee..27abe888b3 100644 --- a/ompi/mpi/tool/finalize.c +++ b/ompi/mpi/tool/finalize.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -28,14 +29,14 @@ int MPI_T_finalize (void) { - mpit_lock (); + ompi_mpit_lock (); if (!mpit_is_initialized ()) { - mpit_unlock (); + ompi_mpit_unlock (); return MPI_T_ERR_NOT_INITIALIZED; } - if (0 == --mpit_init_count) { + if (0 == --ompi_mpit_init_count) { (void) ompi_info_close_components (); if ((!ompi_mpi_initialized || ompi_mpi_finalized) && @@ -49,7 +50,7 @@ int MPI_T_finalize (void) (void) opal_finalize_util (); } - mpit_unlock (); + ompi_mpit_unlock (); return MPI_SUCCESS; } diff --git a/ompi/mpi/tool/init_thread.c b/ompi/mpi/tool/init_thread.c index 8f0fb6b3c6..53c8e4cf98 100644 --- a/ompi/mpi/tool/init_thread.c +++ b/ompi/mpi/tool/init_thread.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -24,9 +25,9 @@ #include "ompi/mpi/tool/profile/defines.h" #endif -extern opal_mutex_t mpit_big_lock; +extern opal_mutex_t ompi_mpit_big_lock; -extern volatile uint32_t mpit_init_count; +extern volatile uint32_t ompi_mpit_init_count; extern volatile int32_t initted; @@ -34,10 +35,10 @@ int MPI_T_init_thread (int required, int *provided) { int rc = MPI_SUCCESS; - mpit_lock (); + ompi_mpit_lock (); do { - if (0 != mpit_init_count++) { + if (0 != ompi_mpit_init_count++) { break; } @@ -60,7 +61,7 @@ int MPI_T_init_thread (int required, int *provided) ompi_mpi_thread_level (required, provided); } while (0); - mpit_unlock (); + ompi_mpit_unlock (); return rc; } diff --git a/ompi/mpi/tool/mpit-internal.h b/ompi/mpi/tool/mpit-internal.h index 557472743b..fb6c6b6868 100644 --- a/ompi/mpi/tool/mpit-internal.h +++ b/ompi/mpi/tool/mpit-internal.h @@ -3,6 +3,7 @@ * Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2011 UT-Battelle, LLC. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -31,17 +32,17 @@ typedef struct ompi_mpit_cvar_handle_t { void *bound_object; } ompi_mpit_cvar_handle_t; -void mpit_lock (void); -void mpit_unlock (void); +void ompi_mpit_lock (void); +void ompi_mpit_unlock (void); -extern volatile uint32_t mpit_init_count; +extern volatile uint32_t ompi_mpit_init_count; int ompit_var_type_to_datatype (mca_base_var_type_t type, MPI_Datatype *datatype); int ompit_opal_to_mpit_error (int rc); static inline int mpit_is_initialized (void) { - return !!mpit_init_count; + return !!ompi_mpit_init_count; } static inline void mpit_copy_string (char *dest, int *len, const char *source) diff --git a/ompi/mpi/tool/mpit_common.c b/ompi/mpi/tool/mpit_common.c index 9443402c20..c21723faab 100644 --- a/ompi/mpi/tool/mpit_common.c +++ b/ompi/mpi/tool/mpit_common.c @@ -4,6 +4,7 @@ * reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -13,18 +14,18 @@ #include "ompi/mpi/tool/mpit-internal.h" -opal_mutex_t mpit_big_lock = OPAL_MUTEX_STATIC_INIT; +opal_mutex_t ompi_mpit_big_lock = OPAL_MUTEX_STATIC_INIT; -volatile uint32_t mpit_init_count = 0; +volatile uint32_t ompi_mpit_init_count = 0; -void mpit_lock (void) +void ompi_mpit_lock (void) { - opal_mutex_lock (&mpit_big_lock); + opal_mutex_lock (&ompi_mpit_big_lock); } -void mpit_unlock (void) +void ompi_mpit_unlock (void) { - opal_mutex_unlock (&mpit_big_lock); + opal_mutex_unlock (&ompi_mpit_big_lock); } int ompit_var_type_to_datatype (mca_base_var_type_t type, MPI_Datatype *datatype) diff --git a/ompi/mpi/tool/pvar_get_index.c b/ompi/mpi/tool/pvar_get_index.c index 88e71c5b4f..b7d5d5e524 100644 --- a/ompi/mpi/tool/pvar_get_index.c +++ b/ompi/mpi/tool/pvar_get_index.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -33,9 +34,9 @@ int MPI_T_pvar_get_index (const char *name, int var_class, int *pvar_index) return MPI_ERR_ARG; } - mpit_lock (); + ompi_mpit_lock (); ret = mca_base_pvar_find_by_name (name, var_class, pvar_index); - mpit_unlock (); + ompi_mpit_unlock (); if (OPAL_SUCCESS != ret) { return MPI_T_ERR_INVALID_NAME; } diff --git a/ompi/mpi/tool/pvar_get_info.c b/ompi/mpi/tool/pvar_get_info.c index 92aec5bea7..8121558f49 100644 --- a/ompi/mpi/tool/pvar_get_info.c +++ b/ompi/mpi/tool/pvar_get_info.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -33,7 +34,7 @@ int MPI_T_pvar_get_info(int pvar_index, char *name, int *name_len, return MPI_T_ERR_NOT_INITIALIZED; } - mpit_lock (); + ompi_mpit_lock (); do { /* Find the performance variable. mca_base_pvar_get() handles the @@ -88,7 +89,7 @@ int MPI_T_pvar_get_info(int pvar_index, char *name, int *name_len, } } while (0); - mpit_unlock (); + ompi_mpit_unlock (); return ret; } diff --git a/ompi/mpi/tool/pvar_handle_alloc.c b/ompi/mpi/tool/pvar_handle_alloc.c index 504fc6f74f..770f51323a 100644 --- a/ompi/mpi/tool/pvar_handle_alloc.c +++ b/ompi/mpi/tool/pvar_handle_alloc.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -31,7 +32,7 @@ int MPI_T_pvar_handle_alloc(MPI_T_pvar_session session, int pvar_index, return MPI_T_ERR_NOT_INITIALIZED; } - mpit_lock (); + ompi_mpit_lock (); do { /* Find the performance variable. mca_base_pvar_get() handles the @@ -52,7 +53,7 @@ int MPI_T_pvar_handle_alloc(MPI_T_pvar_session session, int pvar_index, handle, count); } while (0); - mpit_unlock (); + ompi_mpit_unlock (); return ompit_opal_to_mpit_error(ret); } diff --git a/ompi/mpi/tool/pvar_handle_free.c b/ompi/mpi/tool/pvar_handle_free.c index 9e50577d5b..095964778f 100644 --- a/ompi/mpi/tool/pvar_handle_free.c +++ b/ompi/mpi/tool/pvar_handle_free.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -29,7 +30,7 @@ int MPI_T_pvar_handle_free(MPI_T_pvar_session session, MPI_T_pvar_handle *handle return MPI_T_ERR_NOT_INITIALIZED; } - mpit_lock (); + ompi_mpit_lock (); do { /* Check that this is a valid handle */ @@ -49,7 +50,7 @@ int MPI_T_pvar_handle_free(MPI_T_pvar_session session, MPI_T_pvar_handle *handle *handle = MPI_T_PVAR_HANDLE_NULL; } while (0); - mpit_unlock (); + ompi_mpit_unlock (); return ret; } diff --git a/ompi/mpi/tool/pvar_read.c b/ompi/mpi/tool/pvar_read.c index 6710a3018e..8314c9d429 100644 --- a/ompi/mpi/tool/pvar_read.c +++ b/ompi/mpi/tool/pvar_read.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -34,11 +35,11 @@ int MPI_T_pvar_read(MPI_T_pvar_session session, MPI_T_pvar_handle handle, return MPI_T_ERR_INVALID_HANDLE; } - mpit_lock (); + ompi_mpit_lock (); ret = mca_base_pvar_handle_read_value (handle, buf); - mpit_unlock (); + ompi_mpit_unlock (); return ompit_opal_to_mpit_error (ret); } diff --git a/ompi/mpi/tool/pvar_reset.c b/ompi/mpi/tool/pvar_reset.c index cf05f58ea8..80e0bdeded 100644 --- a/ompi/mpi/tool/pvar_reset.c +++ b/ompi/mpi/tool/pvar_reset.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -29,7 +30,7 @@ int MPI_T_pvar_reset(MPI_T_pvar_session session, MPI_T_pvar_handle handle) return MPI_T_ERR_NOT_INITIALIZED; } - mpit_lock (); + ompi_mpit_lock (); if (MPI_T_PVAR_ALL_HANDLES == handle) { OPAL_LIST_FOREACH(handle, &session->handles, mca_base_pvar_handle_t) { @@ -44,7 +45,7 @@ int MPI_T_pvar_reset(MPI_T_pvar_session session, MPI_T_pvar_handle handle) ret = mca_base_pvar_handle_reset (handle); } - mpit_unlock (); + ompi_mpit_unlock (); return ompit_opal_to_mpit_error (ret); } diff --git a/ompi/mpi/tool/pvar_session_create.c b/ompi/mpi/tool/pvar_session_create.c index 204a27d3fc..6389125d52 100644 --- a/ompi/mpi/tool/pvar_session_create.c +++ b/ompi/mpi/tool/pvar_session_create.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -29,14 +30,14 @@ int MPI_T_pvar_session_create(MPI_T_pvar_session *session) return MPI_T_ERR_NOT_INITIALIZED; } - mpit_lock (); + ompi_mpit_lock (); *session = OBJ_NEW(mca_base_pvar_session_t); if (NULL == *session) { ret = MPI_ERR_NO_MEM; } - mpit_unlock (); + ompi_mpit_unlock (); return ret; } diff --git a/ompi/mpi/tool/pvar_start.c b/ompi/mpi/tool/pvar_start.c index 667c3cc486..d2fce3fa2a 100644 --- a/ompi/mpi/tool/pvar_start.c +++ b/ompi/mpi/tool/pvar_start.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -38,7 +39,7 @@ int MPI_T_pvar_start(MPI_T_pvar_session session, MPI_T_pvar_handle handle) return MPI_T_ERR_NOT_INITIALIZED; } - mpit_lock (); + ompi_mpit_lock (); if (MPI_T_PVAR_ALL_HANDLES == handle) { OPAL_LIST_FOREACH(handle, &session->handles, mca_base_pvar_handle_t) { @@ -53,7 +54,7 @@ int MPI_T_pvar_start(MPI_T_pvar_session session, MPI_T_pvar_handle handle) ret = pvar_handle_start (handle); } - mpit_unlock (); + ompi_mpit_unlock (); return ompit_opal_to_mpit_error (ret); } diff --git a/ompi/mpi/tool/pvar_stop.c b/ompi/mpi/tool/pvar_stop.c index 0866ac46a0..8923bbbf7b 100644 --- a/ompi/mpi/tool/pvar_stop.c +++ b/ompi/mpi/tool/pvar_stop.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -38,7 +39,7 @@ int MPI_T_pvar_stop(MPI_T_pvar_session session, MPI_T_pvar_handle handle) return MPI_T_ERR_NOT_INITIALIZED; } - mpit_lock (); + ompi_mpit_lock (); if (MPI_T_PVAR_ALL_HANDLES == handle) { OPAL_LIST_FOREACH(handle, &session->handles, mca_base_pvar_handle_t) { @@ -55,7 +56,7 @@ int MPI_T_pvar_stop(MPI_T_pvar_session session, MPI_T_pvar_handle handle) ret = pvar_handle_stop (handle); } - mpit_unlock (); + ompi_mpit_unlock (); return ompit_opal_to_mpit_error (ret); } diff --git a/ompi/mpi/tool/pvar_write.c b/ompi/mpi/tool/pvar_write.c index 3f5368d552..5bd1721360 100644 --- a/ompi/mpi/tool/pvar_write.c +++ b/ompi/mpi/tool/pvar_write.c @@ -3,6 +3,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -34,11 +35,11 @@ int MPI_T_pvar_write(MPI_T_pvar_session session, MPI_T_pvar_handle handle, return MPI_T_ERR_INVALID_HANDLE; } - mpit_lock (); + ompi_mpit_lock (); ret = mca_base_pvar_handle_write_value (handle, buf); - mpit_unlock (); + ompi_mpit_unlock (); return ompit_opal_to_mpit_error (ret); } diff --git a/ompi/patterns/comm/allgather.c b/ompi/patterns/comm/allgather.c index ceef10bbbe..1dbaafae77 100644 --- a/ompi/patterns/comm/allgather.c +++ b/ompi/patterns/comm/allgather.c @@ -5,6 +5,7 @@ * All rights reserved. * Copyright (c) 2014-2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -27,7 +28,7 @@ /** * All-reduce - subgroup in communicator */ -OMPI_DECLSPEC int comm_allgather_pml(void *src_buf, void *dest_buf, int count, +OMPI_DECLSPEC int ompi_comm_allgather_pml(void *src_buf, void *dest_buf, int count, ompi_datatype_t *dtype, int my_rank_in_group, int n_peers, int *ranks_in_comm,ompi_communicator_t *comm) { @@ -76,7 +77,7 @@ OMPI_DECLSPEC int comm_allgather_pml(void *src_buf, void *dest_buf, int count, /* get my reduction communication pattern */ memset(&my_exchange_node, 0, sizeof(netpatterns_pair_exchange_node_t)); - rc = netpatterns_setup_recursive_doubling_tree_node(n_peers, + rc = ompi_netpatterns_setup_recursive_doubling_tree_node(n_peers, my_rank_in_group, &my_exchange_node); if(OMPI_SUCCESS != rc){ return rc; @@ -283,7 +284,7 @@ OMPI_DECLSPEC int comm_allgather_pml(void *src_buf, void *dest_buf, int count, } } - netpatterns_cleanup_recursive_doubling_tree_node(&my_exchange_node); + ompi_netpatterns_cleanup_recursive_doubling_tree_node(&my_exchange_node); /* return */ return OMPI_SUCCESS; diff --git a/ompi/patterns/comm/allreduce.c b/ompi/patterns/comm/allreduce.c index 1552f33c51..7bd779a355 100644 --- a/ompi/patterns/comm/allreduce.c +++ b/ompi/patterns/comm/allreduce.c @@ -5,6 +5,7 @@ * All rights reserved. * Copyright (c) 2014-2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -29,7 +30,7 @@ /** * All-reduce for contigous primitive types */ -OMPI_DECLSPEC int comm_allreduce_pml(void *sbuf, void *rbuf, int count, +OMPI_DECLSPEC int ompi_comm_allreduce_pml(void *sbuf, void *rbuf, int count, ompi_datatype_t *dtype, int my_rank_in_group, struct ompi_op_t *op, int n_peers,int *ranks_in_comm, ompi_communicator_t *comm) @@ -79,7 +80,7 @@ OMPI_DECLSPEC int comm_allreduce_pml(void *sbuf, void *rbuf, int count, /* get my reduction communication pattern */ memset(&my_exchange_node, 0, sizeof(netpatterns_pair_exchange_node_t)); - rc = netpatterns_setup_recursive_doubling_tree_node(n_peers, + rc = ompi_netpatterns_setup_recursive_doubling_tree_node(n_peers, my_rank_in_group, &my_exchange_node); if(OMPI_SUCCESS != rc){ return rc; @@ -118,7 +119,7 @@ OMPI_DECLSPEC int comm_allreduce_pml(void *sbuf, void *rbuf, int count, -OMPI_COMMON_TAG_ALLREDUCE, comm, MPI_STATUSES_IGNORE)); if( 0 > rc ) { - fprintf(stderr," first recv failed in comm_allreduce_pml \n"); + fprintf(stderr," first recv failed in ompi_comm_allreduce_pml \n"); fflush(stderr); goto Error; } @@ -144,7 +145,7 @@ OMPI_DECLSPEC int comm_allreduce_pml(void *sbuf, void *rbuf, int count, -OMPI_COMMON_TAG_ALLREDUCE, MCA_PML_BASE_SEND_STANDARD, comm)); if( 0 > rc ) { - fprintf(stderr," first send failed in comm_allreduce_pml \n"); + fprintf(stderr," first send failed in ompi_comm_allreduce_pml \n"); fflush(stderr); goto Error; } @@ -173,7 +174,7 @@ OMPI_DECLSPEC int comm_allreduce_pml(void *sbuf, void *rbuf, int count, -OMPI_COMMON_TAG_ALLREDUCE, comm, MPI_STATUS_IGNORE); if( 0 > rc ) { - fprintf(stderr," irecv failed in comm_allreduce_pml at iterations %d \n", + fprintf(stderr," irecv failed in ompi_comm_allreduce_pml at iterations %d \n", exchange); fflush(stderr); goto Error; @@ -205,7 +206,7 @@ OMPI_DECLSPEC int comm_allreduce_pml(void *sbuf, void *rbuf, int count, -OMPI_COMMON_TAG_ALLREDUCE, comm, MPI_STATUSES_IGNORE)); if( 0 > rc ) { - fprintf(stderr," last recv failed in comm_allreduce_pml \n"); + fprintf(stderr," last recv failed in ompi_comm_allreduce_pml \n"); fflush(stderr); goto Error; } @@ -223,7 +224,7 @@ OMPI_DECLSPEC int comm_allreduce_pml(void *sbuf, void *rbuf, int count, -OMPI_COMMON_TAG_ALLREDUCE, MCA_PML_BASE_SEND_STANDARD, comm)); if( 0 > rc ) { - fprintf(stderr," last send failed in comm_allreduce_pml \n"); + fprintf(stderr," last send failed in ompi_comm_allreduce_pml \n"); fflush(stderr); goto Error; } @@ -238,7 +239,7 @@ OMPI_DECLSPEC int comm_allreduce_pml(void *sbuf, void *rbuf, int count, count_processed += count_this_stripe; } - netpatterns_cleanup_recursive_doubling_tree_node(&my_exchange_node); + ompi_netpatterns_cleanup_recursive_doubling_tree_node(&my_exchange_node); /* return */ return OMPI_SUCCESS; diff --git a/ompi/patterns/comm/bcast.c b/ompi/patterns/comm/bcast.c index 2a25d495db..bc54613cc0 100644 --- a/ompi/patterns/comm/bcast.c +++ b/ompi/patterns/comm/bcast.c @@ -5,6 +5,7 @@ * All rights reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -29,7 +30,7 @@ * This is a very simple algorithm - binary tree, transmitting the full * message at each step. */ -OMPI_DECLSPEC int comm_bcast_pml(void *buffer, int root, int count, +OMPI_DECLSPEC int ompi_comm_bcast_pml(void *buffer, int root, int count, ompi_datatype_t *dtype, int my_rank_in_group, int n_peers, int *ranks_in_comm,ompi_communicator_t *comm) { @@ -47,7 +48,7 @@ OMPI_DECLSPEC int comm_bcast_pml(void *buffer, int root, int count, /* * compute my communication pattern - binary tree */ - rc=netpatterns_setup_narray_tree(2, node_rank, n_peers, + rc=ompi_netpatterns_setup_narray_tree(2, node_rank, n_peers, &node_data); if( OMPI_SUCCESS != rc ) { goto Error; diff --git a/ompi/patterns/comm/coll_ops.h b/ompi/patterns/comm/coll_ops.h index 846e5660cc..5acb66c1e6 100644 --- a/ompi/patterns/comm/coll_ops.h +++ b/ompi/patterns/comm/coll_ops.h @@ -3,6 +3,7 @@ * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. * All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -26,14 +27,14 @@ BEGIN_C_DECLS -OMPI_DECLSPEC int comm_allgather_pml(void *src_buf, void *dest_buf, int count, +OMPI_DECLSPEC int ompi_comm_allgather_pml(void *src_buf, void *dest_buf, int count, ompi_datatype_t *dtype, int my_rank_in_group, int n_peers, int *ranks_in_comm,ompi_communicator_t *comm); -OMPI_DECLSPEC int comm_allreduce_pml(void *sbuf, void *rbuf, int count, +OMPI_DECLSPEC int ompi_comm_allreduce_pml(void *sbuf, void *rbuf, int count, ompi_datatype_t *dtype, int my_rank_in_group, struct ompi_op_t *op, int n_peers,int *ranks_in_comm, ompi_communicator_t *comm); -OMPI_DECLSPEC int comm_bcast_pml(void *buffer, int root, int count, +OMPI_DECLSPEC int ompi_comm_bcast_pml(void *buffer, int root, int count, ompi_datatype_t *dtype, int my_rank_in_group, int n_peers, int *ranks_in_comm,ompi_communicator_t *comm); diff --git a/ompi/patterns/net/allreduce.c b/ompi/patterns/net/allreduce.c index 1f0cc0b4a8..ecf95bfd97 100644 --- a/ompi/patterns/net/allreduce.c +++ b/ompi/patterns/net/allreduce.c @@ -3,6 +3,7 @@ * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. * All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -152,7 +153,7 @@ comm_allreduce(void *sbuf, void *rbuf, int count, opal_datatype_t *dtype, } /* get my reduction communication pattern */ - ret=netpatterns_setup_recursive_doubling_tree_node(n_peers,my_rank,&my_exchange_node); + ret=ompi_netpatterns_setup_recursive_doubling_tree_node(n_peers,my_rank,&my_exchange_node); if(OMPI_SUCCESS != ret){ return ret; } diff --git a/ompi/patterns/net/netpatterns.h b/ompi/patterns/net/netpatterns.h index 1759fd8e64..d75c721dd5 100644 --- a/ompi/patterns/net/netpatterns.h +++ b/ompi/patterns/net/netpatterns.h @@ -3,6 +3,7 @@ * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. * All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -20,21 +21,21 @@ BEGIN_C_DECLS -int netpatterns_base_err(const char* fmt, ...); -int netpatterns_register_mca_params(void); +int ompi_netpatterns_base_err(const char* fmt, ...); +int ompi_netpatterns_register_mca_params(void); #if OPAL_ENABLE_DEBUG -extern int netpatterns_base_verbose; /* disabled by default */ -OMPI_DECLSPEC extern int netpatterns_base_err(const char*, ...) __opal_attribute_format__(__printf__, 1, 2); +extern int ompi_netpatterns_base_verbose; /* disabled by default */ +OMPI_DECLSPEC extern int ompi_netpatterns_base_err(const char*, ...) __opal_attribute_format__(__printf__, 1, 2); #define NETPATTERNS_VERBOSE(args) \ do { \ - if(netpatterns_base_verbose > 0) { \ - netpatterns_base_err("[%s]%s[%s:%d:%s] ",\ + if(ompi_netpatterns_base_verbose > 0) { \ + ompi_netpatterns_base_err("[%s]%s[%s:%d:%s] ",\ ompi_process_info.nodename, \ OMPI_NAME_PRINT(OMPI_PROC_MY_NAME), \ __FILE__, __LINE__, __func__); \ - netpatterns_base_err args; \ - netpatterns_base_err("\n"); \ + ompi_netpatterns_base_err args; \ + ompi_netpatterns_base_err("\n"); \ } \ } while(0); #else @@ -121,24 +122,24 @@ netpatterns_narray_knomial_tree_node_t; /* Init code for common_netpatterns */ -OMPI_DECLSPEC int netpatterns_init(void); +OMPI_DECLSPEC int ompi_netpatterns_init(void); /* setup an n-array tree */ -OMPI_DECLSPEC int netpatterns_setup_narray_tree(int tree_order, int my_rank, int num_nodes, +OMPI_DECLSPEC int ompi_netpatterns_setup_narray_tree(int tree_order, int my_rank, int num_nodes, netpatterns_tree_node_t *my_node); /* setup an n-array tree with k-nomial levels */ -OMPI_DECLSPEC int netpatterns_setup_narray_knomial_tree( int tree_order, int my_rank, int num_nodes, +OMPI_DECLSPEC int ompi_netpatterns_setup_narray_knomial_tree( int tree_order, int my_rank, int num_nodes, netpatterns_narray_knomial_tree_node_t *my_node); /* cleanup an n-array tree setup by the above function */ -OMPI_DECLSPEC void netpatterns_cleanup_narray_knomial_tree (netpatterns_narray_knomial_tree_node_t *my_node); +OMPI_DECLSPEC void ompi_netpatterns_cleanup_narray_knomial_tree (netpatterns_narray_knomial_tree_node_t *my_node); /* setup an multi-nomial tree - for each node in the tree * this returns it's parent, and it's children */ -OMPI_DECLSPEC int netpatterns_setup_multinomial_tree(int tree_order, int num_nodes, +OMPI_DECLSPEC int ompi_netpatterns_setup_multinomial_tree(int tree_order, int num_nodes, netpatterns_tree_node_t *tree_nodes); -OMPI_DECLSPEC int netpatterns_setup_narray_tree_contigous_ranks(int tree_order, +OMPI_DECLSPEC int ompi_netpatterns_setup_narray_tree_contigous_ranks(int tree_order, int num_nodes, netpatterns_tree_node_t **tree_nodes); /* calculate the nearest power of radix that is equal to or greater diff --git a/ompi/patterns/net/netpatterns_base.c b/ompi/patterns/net/netpatterns_base.c index bc51490def..62669533a1 100644 --- a/ompi/patterns/net/netpatterns_base.c +++ b/ompi/patterns/net/netpatterns_base.c @@ -2,6 +2,7 @@ * * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -13,22 +14,22 @@ #include "ompi/include/ompi/constants.h" #include "netpatterns.h" -int netpatterns_base_verbose = 0; /* disabled by default */ +int ompi_netpatterns_base_verbose = 0; /* disabled by default */ -int netpatterns_register_mca_params(void) +int ompi_netpatterns_register_mca_params(void) { - netpatterns_base_verbose = 0; + ompi_netpatterns_base_verbose = 0; mca_base_var_register("ompi", "common", "netpatterns", "base_verbose", "Verbosity level of the NETPATTERNS framework", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_READONLY, - &netpatterns_base_verbose); + &ompi_netpatterns_base_verbose); return OMPI_SUCCESS; } -int netpatterns_base_err(const char* fmt, ...) +int ompi_netpatterns_base_err(const char* fmt, ...) { va_list list; int ret; @@ -39,16 +40,16 @@ int netpatterns_base_err(const char* fmt, ...) return ret; } -int netpatterns_init(void) +int ompi_netpatterns_init(void) { /* There is no component for common_netpatterns so every component that uses it - should call netpatterns_init, still we want to run it only once */ + should call ompi_netpatterns_init, still we want to run it only once */ static int was_called = 0; if (0 == was_called) { was_called = 1; - return netpatterns_register_mca_params(); + return ompi_netpatterns_register_mca_params(); } return OMPI_SUCCESS; diff --git a/ompi/patterns/net/netpatterns_knomial_tree.c b/ompi/patterns/net/netpatterns_knomial_tree.c index f09ef968fb..09b45cc742 100644 --- a/ompi/patterns/net/netpatterns_knomial_tree.c +++ b/ompi/patterns/net/netpatterns_knomial_tree.c @@ -6,6 +6,7 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2014 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -33,7 +34,7 @@ /* setup recursive doubleing tree node */ -OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node( +OMPI_DECLSPEC int ompi_netpatterns_setup_recursive_knomial_allgather_tree_node( int num_nodes, int node_rank, int tree_order, int *hier_ranks, netpatterns_k_exchange_node_t *exchange_node) { @@ -52,7 +53,7 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node( NETPATTERNS_VERBOSE( - ("Enter netpatterns_setup_recursive_knomial_tree_node(num_nodes=%d, node_rank=%d, tree_order=%d)", + ("Enter ompi_netpatterns_setup_recursive_knomial_tree_node(num_nodes=%d, node_rank=%d, tree_order=%d)", num_nodes, node_rank, tree_order)); assert(num_nodes > 1); @@ -504,7 +505,7 @@ Error: return OMPI_ERROR; } -OMPI_DECLSPEC void netpatterns_cleanup_recursive_knomial_allgather_tree_node( +OMPI_DECLSPEC void ompi_netpatterns_cleanup_recursive_knomial_allgather_tree_node( netpatterns_k_exchange_node_t *exchange_node) { int i; @@ -531,7 +532,7 @@ OMPI_DECLSPEC void netpatterns_cleanup_recursive_knomial_allgather_tree_node( free(exchange_node->payload_info); } -OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_tree_node( +OMPI_DECLSPEC int ompi_netpatterns_setup_recursive_knomial_tree_node( int num_nodes, int node_rank, int tree_order, netpatterns_k_exchange_node_t *exchange_node) { @@ -541,7 +542,7 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_tree_node( int k_base, kpow_num, peer; NETPATTERNS_VERBOSE( - ("Enter netpatterns_setup_recursive_knomial_tree_node(num_nodes=%d, node_rank=%d, tree_order=%d)", + ("Enter ompi_netpatterns_setup_recursive_knomial_tree_node(num_nodes=%d, node_rank=%d, tree_order=%d)", num_nodes, node_rank, tree_order)); assert(num_nodes > 1); @@ -669,13 +670,13 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_tree_node( Error: - netpatterns_cleanup_recursive_knomial_tree_node (exchange_node); + ompi_netpatterns_cleanup_recursive_knomial_tree_node (exchange_node); /* error return */ return OMPI_ERROR; } -OMPI_DECLSPEC void netpatterns_cleanup_recursive_knomial_tree_node( +OMPI_DECLSPEC void ompi_netpatterns_cleanup_recursive_knomial_tree_node( netpatterns_k_exchange_node_t *exchange_node) { int i; @@ -697,7 +698,7 @@ OMPI_DECLSPEC void netpatterns_cleanup_recursive_knomial_tree_node( } #if 1 -OMPI_DECLSPEC int netpatterns_setup_recursive_doubling_n_tree_node(int num_nodes, int node_rank, int tree_order, +OMPI_DECLSPEC int ompi_netpatterns_setup_recursive_doubling_n_tree_node(int num_nodes, int node_rank, int tree_order, netpatterns_pair_exchange_node_t *exchange_node) { /* local variables */ @@ -705,7 +706,7 @@ OMPI_DECLSPEC int netpatterns_setup_recursive_doubling_n_tree_node(int num_nodes int n_levels; int shift, mask; - NETPATTERNS_VERBOSE(("Enter netpatterns_setup_recursive_doubling_n_tree_node(num_nodes=%d, node_rank=%d, tree_order=%d)", num_nodes, node_rank, tree_order)); + NETPATTERNS_VERBOSE(("Enter ompi_netpatterns_setup_recursive_doubling_n_tree_node(num_nodes=%d, node_rank=%d, tree_order=%d)", num_nodes, node_rank, tree_order)); assert(num_nodes > 1); while (tree_order > num_nodes) { @@ -838,7 +839,7 @@ Error: return OMPI_ERROR; } -OMPI_DECLSPEC void netpatterns_cleanup_recursive_doubling_tree_node( +OMPI_DECLSPEC void ompi_netpatterns_cleanup_recursive_doubling_tree_node( netpatterns_pair_exchange_node_t *exchange_node) { NETPATTERNS_VERBOSE(("About to release rank_extra_sources_array and rank_exchanges")); @@ -852,15 +853,15 @@ OMPI_DECLSPEC void netpatterns_cleanup_recursive_doubling_tree_node( } #endif -OMPI_DECLSPEC int netpatterns_setup_recursive_doubling_tree_node(int num_nodes, int node_rank, +OMPI_DECLSPEC int ompi_netpatterns_setup_recursive_doubling_tree_node(int num_nodes, int node_rank, netpatterns_pair_exchange_node_t *exchange_node) { - return netpatterns_setup_recursive_doubling_n_tree_node(num_nodes, node_rank, 2, exchange_node); + return ompi_netpatterns_setup_recursive_doubling_n_tree_node(num_nodes, node_rank, 2, exchange_node); } #if 0 /*OMPI_DECLSPEC int old_netpatterns_setup_recursive_doubling_tree_node(int num_nodes, int node_rank,*/ -OMPI_DECLSPEC int netpatterns_setup_recursive_doubling_n_tree_node(int num_nodes, int node_rank,int tree_order, +OMPI_DECLSPEC int ompi_netpatterns_setup_recursive_doubling_n_tree_node(int num_nodes, int node_rank,int tree_order, netpatterns_pair_exchange_node_t *exchange_node) { /* local variables */ diff --git a/ompi/patterns/net/netpatterns_knomial_tree.h b/ompi/patterns/net/netpatterns_knomial_tree.h index a5736a1d87..16dd6d8186 100644 --- a/ompi/patterns/net/netpatterns_knomial_tree.h +++ b/ompi/patterns/net/netpatterns_knomial_tree.h @@ -5,6 +5,7 @@ * All rights reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -110,27 +111,27 @@ struct netpatterns_k_exchange_node_t { typedef struct netpatterns_k_exchange_node_t netpatterns_k_exchange_node_t; -OMPI_DECLSPEC int netpatterns_setup_recursive_doubling_n_tree_node(int num_nodes, int node_rank, int tree_order, +OMPI_DECLSPEC int ompi_netpatterns_setup_recursive_doubling_n_tree_node(int num_nodes, int node_rank, int tree_order, netpatterns_pair_exchange_node_t *exchange_node); -OMPI_DECLSPEC void netpatterns_cleanup_recursive_doubling_tree_node( +OMPI_DECLSPEC void ompi_netpatterns_cleanup_recursive_doubling_tree_node( netpatterns_pair_exchange_node_t *exchange_node); -OMPI_DECLSPEC int netpatterns_setup_recursive_doubling_tree_node(int num_nodes, int node_rank, +OMPI_DECLSPEC int ompi_netpatterns_setup_recursive_doubling_tree_node(int num_nodes, int node_rank, netpatterns_pair_exchange_node_t *exchange_node); -OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_tree_node( +OMPI_DECLSPEC int ompi_netpatterns_setup_recursive_knomial_tree_node( int num_nodes, int node_rank, int tree_order, netpatterns_k_exchange_node_t *exchange_node); -OMPI_DECLSPEC void netpatterns_cleanup_recursive_knomial_tree_node( +OMPI_DECLSPEC void ompi_netpatterns_cleanup_recursive_knomial_tree_node( netpatterns_k_exchange_node_t *exchange_node); -OMPI_DECLSPEC int netpatterns_setup_recursive_knomial_allgather_tree_node( +OMPI_DECLSPEC int ompi_netpatterns_setup_recursive_knomial_allgather_tree_node( int num_nodes, int node_rank, int tree_order, int *hier_ranks, netpatterns_k_exchange_node_t *exchange_node); -OMPI_DECLSPEC void netpatterns_cleanup_recursive_knomial_allgather_tree_node( +OMPI_DECLSPEC void ompi_netpatterns_cleanup_recursive_knomial_allgather_tree_node( netpatterns_k_exchange_node_t *exchange_node); /* Input: k_exchange_node structure diff --git a/ompi/patterns/net/netpatterns_multinomial_tree.c b/ompi/patterns/net/netpatterns_multinomial_tree.c index 54fc41f4c9..bb397c9123 100644 --- a/ompi/patterns/net/netpatterns_multinomial_tree.c +++ b/ompi/patterns/net/netpatterns_multinomial_tree.c @@ -1,6 +1,7 @@ /* * Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved. * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -26,7 +27,7 @@ /* setup an multi-nomial tree - for each node in the tree * this returns it's parent, and it's children */ -OMPI_DECLSPEC int netpatterns_setup_multinomial_tree(int tree_order, int num_nodes, +OMPI_DECLSPEC int ompi_netpatterns_setup_multinomial_tree(int tree_order, int num_nodes, netpatterns_tree_node_t *tree_nodes) { /* local variables */ diff --git a/ompi/patterns/net/netpatterns_nary_tree.c b/ompi/patterns/net/netpatterns_nary_tree.c index 6ab4b5be6e..08f1543173 100644 --- a/ompi/patterns/net/netpatterns_nary_tree.c +++ b/ompi/patterns/net/netpatterns_nary_tree.c @@ -4,6 +4,7 @@ * Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. * Copyright (c) 2014 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -32,7 +33,7 @@ /* setup an n-array tree */ -int netpatterns_setup_narray_tree(int tree_order, int my_rank, int num_nodes, +int ompi_netpatterns_setup_narray_tree(int tree_order, int my_rank, int num_nodes, netpatterns_tree_node_t *my_node) { /* local variables */ @@ -159,7 +160,7 @@ Error: return OMPI_ERROR; } -void netpatterns_cleanup_narray_knomial_tree (netpatterns_narray_knomial_tree_node_t *my_node) +void ompi_netpatterns_cleanup_narray_knomial_tree (netpatterns_narray_knomial_tree_node_t *my_node) { if (my_node->children_ranks) { free (my_node->children_ranks); @@ -167,11 +168,11 @@ void netpatterns_cleanup_narray_knomial_tree (netpatterns_narray_knomial_tree_no } if (0 != my_node->my_rank) { - netpatterns_cleanup_recursive_knomial_tree_node (&my_node->k_node); + ompi_netpatterns_cleanup_recursive_knomial_tree_node (&my_node->k_node); } } -int netpatterns_setup_narray_knomial_tree( +int ompi_netpatterns_setup_narray_knomial_tree( int tree_order, int my_rank, int num_nodes, netpatterns_narray_knomial_tree_node_t *my_node) { @@ -231,7 +232,7 @@ int netpatterns_setup_narray_knomial_tree( my_rank-cum_cnt; my_node->level_size = cnt; - rc = netpatterns_setup_recursive_knomial_tree_node( + rc = ompi_netpatterns_setup_recursive_knomial_tree_node( my_node->level_size, my_node->rank_on_level, tree_order, &my_node->k_node); if (OMPI_SUCCESS != rc) { @@ -430,7 +431,7 @@ error: * ranks may be rotated based on who the actual root is, to obtain the * appropriate communication pattern for such roots. */ -OMPI_DECLSPEC int netpatterns_setup_narray_tree_contigous_ranks( +OMPI_DECLSPEC int ompi_netpatterns_setup_narray_tree_contigous_ranks( int tree_order, int num_nodes, netpatterns_tree_node_t **tree_nodes) { diff --git a/opal/mca/base/mca_base_pvar.c b/opal/mca/base/mca_base_pvar.c index 1c4f043ec7..0190ae9bac 100644 --- a/opal/mca/base/mca_base_pvar.c +++ b/opal/mca/base/mca_base_pvar.c @@ -7,6 +7,7 @@ * Copyright (c) 2015 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -148,7 +149,7 @@ static int mca_base_pvar_default_get_value (const mca_base_pvar_t *pvar, void *v /* not used */ (void) obj_handle; - memmove (value, pvar->ctx, var_type_sizes[pvar->type]); + memmove (value, pvar->ctx, ompi_var_type_sizes[pvar->type]); return OPAL_SUCCESS; } @@ -158,7 +159,7 @@ static int mca_base_pvar_default_set_value (mca_base_pvar_t *pvar, const void *v /* not used */ (void) obj_handle; - memmove (pvar->ctx, value, var_type_sizes[pvar->type]); + memmove (pvar->ctx, value, ompi_var_type_sizes[pvar->type]); return OPAL_SUCCESS; } @@ -481,7 +482,7 @@ int mca_base_pvar_handle_alloc (mca_base_pvar_session_t *session, int index, voi /* get the size of this datatype since read functions will expect an array of datatype not mca_base_pvar_value_t's. */ - datatype_size = var_type_sizes[pvar->type]; + datatype_size = ompi_var_type_sizes[pvar->type]; if (0 == datatype_size) { ret = OPAL_ERROR; break; @@ -689,7 +690,7 @@ int mca_base_pvar_handle_read_value (mca_base_pvar_handle_t *handle, void *value if (mca_base_pvar_is_sum (handle->pvar) || mca_base_pvar_is_watermark (handle->pvar) || !mca_base_pvar_handle_is_running (handle)) { /* read the value cached in the handle. */ - memmove (value, handle->current_value, handle->count * var_type_sizes[handle->pvar->type]); + memmove (value, handle->current_value, handle->count * ompi_var_type_sizes[handle->pvar->type]); } else { /* read the value directly from the variable. */ ret = handle->pvar->get_value (handle->pvar, value, handle->obj_handle); @@ -718,7 +719,7 @@ int mca_base_pvar_handle_write_value (mca_base_pvar_handle_t *handle, const void return ret; } - memmove (handle->current_value, value, handle->count * var_type_sizes[handle->pvar->type]); + memmove (handle->current_value, value, handle->count * ompi_var_type_sizes[handle->pvar->type]); /* read the value directly from the variable. */ ret = handle->pvar->set_value (handle->pvar, value, handle->obj_handle); @@ -799,7 +800,7 @@ int mca_base_pvar_handle_reset (mca_base_pvar_handle_t *handle) /* reset this handle to a state analagous to when it was created */ if (mca_base_pvar_is_sum (handle->pvar)) { /* reset the running sum to 0 */ - memset (handle->current_value, 0, handle->count * var_type_sizes[handle->pvar->type]); + memset (handle->current_value, 0, handle->count * ompi_var_type_sizes[handle->pvar->type]); if (mca_base_pvar_handle_is_running (handle)) { ret = handle->pvar->get_value (handle->pvar, handle->last_value, handle->obj_handle); @@ -879,7 +880,7 @@ int mca_base_pvar_dump(int index, char ***out, mca_base_var_dump_type_t output_t } } - (void)asprintf(out[0] + line++, "%stype:%s", tmp, var_type_names[pvar->type]); + (void)asprintf(out[0] + line++, "%stype:%s", tmp, ompi_var_type_names[pvar->type]); free(tmp); // release tmp storage } else { /* there will be at most three lines in the pretty print case */ @@ -889,7 +890,7 @@ int mca_base_pvar_dump(int index, char ***out, mca_base_var_dump_type_t output_t } (void)asprintf (out[0] + line++, "performance \"%s\" (type: %s, class: %s)", full_name, - var_type_names[pvar->type], pvar_class_names[pvar->var_class]); + ompi_var_type_names[pvar->type], pvar_class_names[pvar->var_class]); if (pvar->description) { (void)asprintf(out[0] + line++, "%s", pvar->description); diff --git a/opal/mca/base/mca_base_var.c b/opal/mca/base/mca_base_var.c index 458eccb06c..85b804e75a 100644 --- a/opal/mca/base/mca_base_var.c +++ b/opal/mca/base/mca_base_var.c @@ -79,7 +79,7 @@ static int mca_base_var_count = 0; static opal_hash_table_t mca_base_var_index_hash; -const char *var_type_names[] = { +const char *ompi_var_type_names[] = { "int", "unsigned_int", "unsigned_long", @@ -91,7 +91,7 @@ const char *var_type_names[] = { "double" }; -const size_t var_type_sizes[] = { +const size_t ompi_var_type_sizes[] = { sizeof (int), sizeof (unsigned), sizeof (unsigned long), @@ -771,7 +771,7 @@ int mca_base_var_set_value (int vari, const void *value, size_t size, mca_base_v } if (MCA_BASE_VAR_TYPE_STRING != var->mbv_type && MCA_BASE_VAR_TYPE_VERSION_STRING != var->mbv_type) { - memmove (var->mbv_storage, value, var_type_sizes[var->mbv_type]); + memmove (var->mbv_storage, value, ompi_var_type_sizes[var->mbv_type]); } else { var_set_string (var, (char *) value); } @@ -2118,7 +2118,7 @@ int mca_base_var_dump(int vari, char ***out, mca_base_var_dump_type_t output_typ /* Is this variable deprecated? */ asprintf(out[0] + line++, "%sdeprecated:%s", tmp, VAR_IS_DEPRECATED(var[0]) ? "yes" : "no"); - asprintf(out[0] + line++, "%stype:%s", tmp, var_type_names[var->mbv_type]); + asprintf(out[0] + line++, "%stype:%s", tmp, ompi_var_type_names[var->mbv_type]); /* Does this parameter have any synonyms or is it a synonym? */ if (VAR_IS_SYNONYM(var[0])) { @@ -2149,7 +2149,7 @@ int mca_base_var_dump(int vari, char ***out, mca_base_var_dump_type_t output_typ asprintf (out[0], "%s \"%s\" (current value: \"%s\", data source: %s, level: %d %s, type: %s", VAR_IS_DEFAULT_ONLY(var[0]) ? "informational" : "parameter", full_name, value_string, source_string, var->mbv_info_lvl + 1, - info_lvl_strings[var->mbv_info_lvl], var_type_names[var->mbv_type]); + info_lvl_strings[var->mbv_info_lvl], ompi_var_type_names[var->mbv_type]); tmp = out[0][0]; if (VAR_IS_DEPRECATED(var[0])) { diff --git a/opal/mca/base/mca_base_var.h b/opal/mca/base/mca_base_var.h index 6f9967c039..6f697fb593 100644 --- a/opal/mca/base/mca_base_var.h +++ b/opal/mca/base/mca_base_var.h @@ -14,6 +14,7 @@ * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2016 Intel, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -95,7 +96,7 @@ typedef enum { MCA_BASE_VAR_TYPE_MAX } mca_base_var_type_t; -extern const char *var_type_names[]; +extern const char *ompi_var_type_names[]; /** * Source of an MCA variable's value diff --git a/opal/mca/base/mca_base_vari.h b/opal/mca/base/mca_base_vari.h index f1a4722f05..51f879dfda 100644 --- a/opal/mca/base/mca_base_vari.h +++ b/opal/mca/base/mca_base_vari.h @@ -15,6 +15,7 @@ * reserved. * Copyright (c) 2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -71,8 +72,8 @@ typedef enum { #define VAR_IS_SETTABLE(var) (!!((var).mbv_flags & MCA_BASE_VAR_FLAG_SETTABLE)) #define VAR_IS_DEPRECATED(var) (!!((var).mbv_flags & MCA_BASE_VAR_FLAG_DEPRECATED)) -extern const char *var_type_names[]; -extern const size_t var_type_sizes[]; +extern const char *ompi_var_type_names[]; +extern const size_t ompi_var_type_sizes[]; extern bool mca_base_var_initialized; /** diff --git a/opal/mca/crs/base/base.h b/opal/mca/crs/base/base.h index a7c30a12f7..4ea7087a86 100644 --- a/opal/mca/crs/base/base.h +++ b/opal/mca/crs/base/base.h @@ -11,6 +11,7 @@ * All rights reserved. * Copyright (c) 2007 Evergrid, Inc. All rights reserved. * + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -120,9 +121,9 @@ BEGIN_C_DECLS typedef int (*opal_crs_base_self_restart_fn_t)(void); typedef int (*opal_crs_base_self_continue_fn_t)(void); - extern opal_crs_base_self_checkpoint_fn_t crs_base_self_checkpoint_fn; - extern opal_crs_base_self_restart_fn_t crs_base_self_restart_fn; - extern opal_crs_base_self_continue_fn_t crs_base_self_continue_fn; + extern opal_crs_base_self_checkpoint_fn_t ompi_crs_base_self_checkpoint_fn; + extern opal_crs_base_self_restart_fn_t ompi_crs_base_self_restart_fn; + extern opal_crs_base_self_continue_fn_t ompi_crs_base_self_continue_fn; OPAL_DECLSPEC int opal_crs_base_self_register_checkpoint_callback (opal_crs_base_self_checkpoint_fn_t function); diff --git a/opal/mca/crs/base/crs_base_fns.c b/opal/mca/crs/base/crs_base_fns.c index 923184e017..ef5370451d 100644 --- a/opal/mca/crs/base/crs_base_fns.c +++ b/opal/mca/crs/base/crs_base_fns.c @@ -14,6 +14,7 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -47,9 +48,9 @@ #include "opal/mca/crs/crs.h" #include "opal/mca/crs/base/base.h" -opal_crs_base_self_checkpoint_fn_t crs_base_self_checkpoint_fn = NULL; -opal_crs_base_self_restart_fn_t crs_base_self_restart_fn = NULL; -opal_crs_base_self_continue_fn_t crs_base_self_continue_fn = NULL; +opal_crs_base_self_checkpoint_fn_t ompi_crs_base_self_checkpoint_fn = NULL; +opal_crs_base_self_restart_fn_t ompi_crs_base_self_restart_fn = NULL; +opal_crs_base_self_continue_fn_t ompi_crs_base_self_continue_fn = NULL; /****************** * Local Functions @@ -330,19 +331,19 @@ int opal_crs_base_clear_options(opal_crs_base_ckpt_options_t *target) int opal_crs_base_self_register_checkpoint_callback(opal_crs_base_self_checkpoint_fn_t function) { - crs_base_self_checkpoint_fn = function; + ompi_crs_base_self_checkpoint_fn = function; return OPAL_SUCCESS; } int opal_crs_base_self_register_restart_callback(opal_crs_base_self_restart_fn_t function) { - crs_base_self_restart_fn = function; + ompi_crs_base_self_restart_fn = function; return OPAL_SUCCESS; } int opal_crs_base_self_register_continue_callback(opal_crs_base_self_continue_fn_t function) { - crs_base_self_continue_fn = function; + ompi_crs_base_self_continue_fn = function; return OPAL_SUCCESS; } diff --git a/opal/mca/crs/blcr/crs_blcr_module.c b/opal/mca/crs/blcr/crs_blcr_module.c index eb9d627442..c84e79bfbe 100644 --- a/opal/mca/crs/blcr/crs_blcr_module.c +++ b/opal/mca/crs/blcr/crs_blcr_module.c @@ -10,6 +10,7 @@ * Copyright (c) 2007 Evergrid, Inc. All rights reserved. * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. * + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -640,7 +641,7 @@ static int opal_crs_blcr_thread_callback(void *arg) { else #endif { - if(OPAL_SUCCESS != (ret = trigger_user_inc_callback(OPAL_CR_INC_CRS_PRE_CKPT, + if(OPAL_SUCCESS != (ret = ompi_trigger_user_inc_callback(OPAL_CR_INC_CRS_PRE_CKPT, OPAL_CR_INC_STATE_PREPARE)) ) { ; } @@ -665,7 +666,7 @@ static int opal_crs_blcr_thread_callback(void *arg) { blcr_current_state = OPAL_CRS_CONTINUE; } - if( OPAL_SUCCESS != (ret = trigger_user_inc_callback(OPAL_CR_INC_CRS_POST_CKPT, + if( OPAL_SUCCESS != (ret = ompi_trigger_user_inc_callback(OPAL_CR_INC_CRS_POST_CKPT, (blcr_current_state == OPAL_CRS_CONTINUE ? OPAL_CR_INC_STATE_CONTINUE : OPAL_CR_INC_STATE_RESTART))) ) { diff --git a/opal/mca/event/external/event_external_component.c b/opal/mca/event/external/event_external_component.c index 3ac2a83292..aa0ebe0f24 100644 --- a/opal/mca/event/external/event_external_component.c +++ b/opal/mca/event/external/event_external_component.c @@ -35,7 +35,7 @@ const char *opal_event_external_component_version_string = static int event_external_open(void); static int event_external_register (void); -char *event_module_include = NULL; +char *ompi_event_module_include = NULL; /* * Instantiate the public struct with all of our public information @@ -82,9 +82,9 @@ static int event_external_register (void) { all_available_eventops = event_get_supported_methods(); #ifdef __APPLE__ - event_module_include ="select"; + ompi_event_module_include ="select"; #else - event_module_include = "poll"; + ompi_event_module_include = "poll"; #endif avail = opal_argv_join((char**)all_available_eventops, ','); @@ -99,7 +99,7 @@ static int event_external_register (void) { MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_LOCAL, - &event_module_include); + &ompi_event_module_include); free(help_msg); /* release the help message */ free(avail); avail = NULL; diff --git a/opal/mca/event/external/event_external_module.c b/opal/mca/event/external/event_external_module.c index 9eb773dc71..2ee67c7ad5 100644 --- a/opal/mca/event/external/event_external_module.c +++ b/opal/mca/event/external/event_external_module.c @@ -17,7 +17,7 @@ #include "opal/util/argv.h" -extern char *event_module_include; +extern char *ompi_event_module_include; static struct event_config *config = NULL; opal_event_base_t* opal_event_base_create(void) @@ -45,11 +45,11 @@ int opal_event_init(void) all_available_eventops = event_get_supported_methods(); - if (NULL == event_module_include) { + if (NULL == ompi_event_module_include) { /* Shouldn't happen, but... */ - event_module_include = strdup("select"); + ompi_event_module_include = strdup("select"); } - includes = opal_argv_split(event_module_include,','); + includes = opal_argv_split(ompi_event_module_include,','); /* get a configuration object */ config = event_config_new(); diff --git a/opal/mca/event/libevent2022/libevent/event-internal.h b/opal/mca/event/libevent2022/libevent/event-internal.h index 4163a7d7ae..3ffe509aa9 100644 --- a/opal/mca/event/libevent2022/libevent/event-internal.h +++ b/opal/mca/event/libevent2022/libevent/event-internal.h @@ -161,8 +161,8 @@ struct event_changelist { #ifndef _EVENT_DISABLE_DEBUG_MODE /* Global internal flag: set to one if debug mode is on. */ -extern int _event_debug_mode_on; -#define EVENT_DEBUG_MODE_IS_ON() (_event_debug_mode_on) +extern int ompi__event_debug_mode_on; +#define EVENT_DEBUG_MODE_IS_ON() (ompi__event_debug_mode_on) #else #define EVENT_DEBUG_MODE_IS_ON() (0) #endif diff --git a/opal/mca/event/libevent2022/libevent/event.c b/opal/mca/event/libevent2022/libevent/event.c index b9f47c42a0..cdeddce132 100644 --- a/opal/mca/event/libevent2022/libevent/event.c +++ b/opal/mca/event/libevent2022/libevent/event.c @@ -93,7 +93,7 @@ extern const struct eventop win32ops; #endif /* Array of backends in order of preference. */ -static const struct eventop *eventops[] = { +static const struct eventop *ompi_eventops[] = { #if defined(_EVENT_HAVE_EVENT_PORTS) && _EVENT_HAVE_EVENT_PORTS &evportops, #endif @@ -120,8 +120,8 @@ static const struct eventop *eventops[] = { /**** End Open MPI Changes ****/ /* Global state; deprecated */ -struct event_base *event_global_current_base_ = NULL; -#define current_base event_global_current_base_ +struct event_base *ompi_event_global_current_base_ = NULL; +#define current_base ompi_event_global_current_base_ /* Global state */ @@ -181,7 +181,7 @@ eq_debug_entry(const struct event_debug_entry *a, return a->ptr == b->ptr; } -int _event_debug_mode_on = 0; +int ompi__event_debug_mode_on = 0; /* Set if it's too late to enable event_debug_mode. */ static int event_debug_mode_too_late = 0; #ifndef _EVENT_DISABLE_THREAD_SUPPORT @@ -197,7 +197,7 @@ HT_GENERATE(event_debug_map, event_debug_entry, node, hash_debug_entry, /* Macro: record that ev is now setup (that is, ready for an add) */ #define _event_debug_note_setup(ev) do { \ - if (_event_debug_mode_on) { \ + if (ompi__event_debug_mode_on) { \ struct event_debug_entry *dent,find; \ find.ptr = (ev); \ EVLOCK_LOCK(_event_debug_map_lock, 0); \ @@ -219,7 +219,7 @@ HT_GENERATE(event_debug_map, event_debug_entry, node, hash_debug_entry, } while (0) /* Macro: record that ev is no longer setup */ #define _event_debug_note_teardown(ev) do { \ - if (_event_debug_mode_on) { \ + if (ompi__event_debug_mode_on) { \ struct event_debug_entry *dent,find; \ find.ptr = (ev); \ EVLOCK_LOCK(_event_debug_map_lock, 0); \ @@ -232,7 +232,7 @@ HT_GENERATE(event_debug_map, event_debug_entry, node, hash_debug_entry, } while (0) /* Macro: record that ev is now added */ #define _event_debug_note_add(ev) do { \ - if (_event_debug_mode_on) { \ + if (ompi__event_debug_mode_on) { \ struct event_debug_entry *dent,find; \ find.ptr = (ev); \ EVLOCK_LOCK(_event_debug_map_lock, 0); \ @@ -253,7 +253,7 @@ HT_GENERATE(event_debug_map, event_debug_entry, node, hash_debug_entry, } while (0) /* Macro: record that ev is no longer added */ #define _event_debug_note_del(ev) do { \ - if (_event_debug_mode_on) { \ + if (ompi__event_debug_mode_on) { \ struct event_debug_entry *dent,find; \ find.ptr = (ev); \ EVLOCK_LOCK(_event_debug_map_lock, 0); \ @@ -274,7 +274,7 @@ HT_GENERATE(event_debug_map, event_debug_entry, node, hash_debug_entry, } while (0) /* Macro: assert that ev is setup (i.e., okay to add or inspect) */ #define _event_debug_assert_is_setup(ev) do { \ - if (_event_debug_mode_on) { \ + if (ompi__event_debug_mode_on) { \ struct event_debug_entry *dent,find; \ find.ptr = (ev); \ EVLOCK_LOCK(_event_debug_map_lock, 0); \ @@ -293,7 +293,7 @@ HT_GENERATE(event_debug_map, event_debug_entry, node, hash_debug_entry, /* Macro: assert that ev is not added (i.e., okay to tear down or set * up again) */ #define _event_debug_assert_not_added(ev) do { \ - if (_event_debug_mode_on) { \ + if (ompi__event_debug_mode_on) { \ struct event_debug_entry *dent,find; \ find.ptr = (ev); \ EVLOCK_LOCK(_event_debug_map_lock, 0); \ @@ -521,13 +521,13 @@ void event_enable_debug_mode(void) { #ifndef _EVENT_DISABLE_DEBUG_MODE - if (_event_debug_mode_on) + if (ompi__event_debug_mode_on) event_errx(1, "%s was called twice!", __func__); if (event_debug_mode_too_late) event_errx(1, "%s must be called *before* creating any events " "or event_bases",__func__); - _event_debug_mode_on = 1; + ompi__event_debug_mode_on = 1; HT_INIT(event_debug_map, &global_debug_map); #endif @@ -590,23 +590,23 @@ event_base_new_with_config(const struct event_config *cfg) should_check_environment = !(cfg && (cfg->flags & EVENT_BASE_FLAG_IGNORE_ENV)); - for (i = 0; eventops[i] && !base->evbase; i++) { + for (i = 0; ompi_eventops[i] && !base->evbase; i++) { if (cfg != NULL) { /* determine if this backend should be avoided */ if (event_config_is_avoided_method(cfg, - eventops[i]->name)) + ompi_eventops[i]->name)) continue; - if ((eventops[i]->features & cfg->require_features) + if ((ompi_eventops[i]->features & cfg->require_features) != cfg->require_features) continue; } /* also obey the environment variables */ if (should_check_environment && - event_is_method_disabled(eventops[i]->name)) + event_is_method_disabled(ompi_eventops[i]->name)) continue; - base->evsel = eventops[i]; + base->evsel = ompi_eventops[i]; base->evbase = base->evsel->init(base); } @@ -898,7 +898,7 @@ event_get_supported_methods(void) int i = 0, k; /* count all methods */ - for (method = &eventops[0]; *method != NULL; ++method) { + for (method = &ompi_eventops[0]; *method != NULL; ++method) { ++i; } @@ -908,8 +908,8 @@ event_get_supported_methods(void) return (NULL); /* populate the array with the supported methods */ - for (k = 0, i = 0; eventops[k] != NULL; ++k) { - tmp[i++] = eventops[k]->name; + for (k = 0, i = 0; ompi_eventops[k] != NULL; ++k) { + tmp[i++] = ompi_eventops[k]->name; } tmp[i] = NULL; diff --git a/opal/mca/event/libevent2022/libevent/evmap-internal.h b/opal/mca/event/libevent2022/libevent/evmap-internal.h index 23b5a8a0cd..00833accc5 100644 --- a/opal/mca/event/libevent2022/libevent/evmap-internal.h +++ b/opal/mca/event/libevent2022/libevent/evmap-internal.h @@ -51,7 +51,7 @@ void evmap_signal_clear(struct event_signal_map* ctx); /** Add an IO event (some combination of EV_READ or EV_WRITE) to an event_base's list of events on a given file descriptor, and tell the - underlying eventops about the fd if its state has changed. + underlying ompi_eventops about the fd if its state has changed. Requires that ev is not already added. @@ -62,7 +62,7 @@ void evmap_signal_clear(struct event_signal_map* ctx); int evmap_io_add(struct event_base *base, evutil_socket_t fd, struct event *ev); /** Remove an IO event (some combination of EV_READ or EV_WRITE) to an event_base's list of events on a given file descriptor, and tell the - underlying eventops about the fd if its state has changed. + underlying ompi_eventops about the fd if its state has changed. @param base the event_base to operate on. @param fd the file descriptor corresponding to ev. diff --git a/opal/mca/event/libevent2022/libevent/evthread-internal.h b/opal/mca/event/libevent2022/libevent/evthread-internal.h index ccfcdde84d..69f07414e2 100644 --- a/opal/mca/event/libevent2022/libevent/evthread-internal.h +++ b/opal/mca/event/libevent2022/libevent/evthread-internal.h @@ -47,55 +47,55 @@ struct event_base; #if ! defined(_EVENT_DISABLE_THREAD_SUPPORT) && defined(EVTHREAD_EXPOSE_STRUCTS) /* Global function pointers to lock-related functions. NULL if locking isn't enabled. */ -extern struct evthread_lock_callbacks _evthread_lock_fns; -extern struct evthread_condition_callbacks _evthread_cond_fns; -extern unsigned long (*_evthread_id_fn)(void); -extern int _evthread_lock_debugging_enabled; +extern struct evthread_lock_callbacks ompi__evthread_lock_fns; +extern struct evthread_condition_callbacks ompi__evthread_cond_fns; +extern unsigned long (*ompi__evthread_id_fn)(void); +extern int ompi__evthread_lock_debugging_enabled; /** Return the ID of the current thread, or 1 if threading isn't enabled. */ #define EVTHREAD_GET_ID() \ - (_evthread_id_fn ? _evthread_id_fn() : 1) + (ompi__evthread_id_fn ? ompi__evthread_id_fn() : 1) /** Return true iff we're in the thread that is currently (or most recently) * running a given event_base's loop. Requires lock. */ #define EVBASE_IN_THREAD(base) \ - (_evthread_id_fn == NULL || \ - (base)->th_owner_id == _evthread_id_fn()) + (ompi__evthread_id_fn == NULL || \ + (base)->th_owner_id == ompi__evthread_id_fn()) /** Return true iff we need to notify the base's main thread about changes to * its state, because it's currently running the main loop in another * thread. Requires lock. */ #define EVBASE_NEED_NOTIFY(base) \ - (_evthread_id_fn != NULL && \ + (ompi__evthread_id_fn != NULL && \ (base)->running_loop && \ - (base)->th_owner_id != _evthread_id_fn()) + (base)->th_owner_id != ompi__evthread_id_fn()) /** Allocate a new lock, and store it in lockvar, a void*. Sets lockvar to NULL if locking is not enabled. */ #define EVTHREAD_ALLOC_LOCK(lockvar, locktype) \ - ((lockvar) = _evthread_lock_fns.alloc ? \ - _evthread_lock_fns.alloc(locktype) : NULL) + ((lockvar) = ompi__evthread_lock_fns.alloc ? \ + ompi__evthread_lock_fns.alloc(locktype) : NULL) /** Free a given lock, if it is present and locking is enabled. */ #define EVTHREAD_FREE_LOCK(lockvar, locktype) \ do { \ void *_lock_tmp_ = (lockvar); \ - if (_lock_tmp_ && _evthread_lock_fns.free) \ - _evthread_lock_fns.free(_lock_tmp_, (locktype)); \ + if (_lock_tmp_ && ompi__evthread_lock_fns.free) \ + ompi__evthread_lock_fns.free(_lock_tmp_, (locktype)); \ } while (0) /** Acquire a lock. */ #define EVLOCK_LOCK(lockvar,mode) \ do { \ if (lockvar) \ - _evthread_lock_fns.lock(mode, lockvar); \ + ompi__evthread_lock_fns.lock(mode, lockvar); \ } while (0) /** Release a lock */ #define EVLOCK_UNLOCK(lockvar,mode) \ do { \ if (lockvar) \ - _evthread_lock_fns.unlock(mode, lockvar); \ + ompi__evthread_lock_fns.unlock(mode, lockvar); \ } while (0) /** Helper: put lockvar1 and lockvar2 into pointerwise ascending order. */ @@ -123,7 +123,7 @@ extern int _evthread_lock_debugging_enabled; * locked and held by us. */ #define EVLOCK_ASSERT_LOCKED(lock) \ do { \ - if ((lock) && _evthread_lock_debugging_enabled) { \ + if ((lock) && ompi__evthread_lock_debugging_enabled) { \ EVUTIL_ASSERT(_evthread_is_debug_lock_held(lock)); \ } \ } while (0) @@ -134,8 +134,8 @@ static inline int EVLOCK_TRY_LOCK(void *lock); static inline int EVLOCK_TRY_LOCK(void *lock) { - if (lock && _evthread_lock_fns.lock) { - int r = _evthread_lock_fns.lock(EVTHREAD_TRY, lock); + if (lock && ompi__evthread_lock_fns.lock) { + int r = ompi__evthread_lock_fns.lock(EVTHREAD_TRY, lock); return !r; } else { /* Locking is disabled either globally or for this thing; @@ -147,35 +147,35 @@ EVLOCK_TRY_LOCK(void *lock) /** Allocate a new condition variable and store it in the void *, condvar */ #define EVTHREAD_ALLOC_COND(condvar) \ do { \ - (condvar) = _evthread_cond_fns.alloc_condition ? \ - _evthread_cond_fns.alloc_condition(0) : NULL; \ + (condvar) = ompi__evthread_cond_fns.alloc_condition ? \ + ompi__evthread_cond_fns.alloc_condition(0) : NULL; \ } while (0) /** Deallocate and free a condition variable in condvar */ #define EVTHREAD_FREE_COND(cond) \ do { \ if (cond) \ - _evthread_cond_fns.free_condition((cond)); \ + ompi__evthread_cond_fns.free_condition((cond)); \ } while (0) /** Signal one thread waiting on cond */ #define EVTHREAD_COND_SIGNAL(cond) \ - ( (cond) ? _evthread_cond_fns.signal_condition((cond), 0) : 0 ) + ( (cond) ? ompi__evthread_cond_fns.signal_condition((cond), 0) : 0 ) /** Signal all threads waiting on cond */ #define EVTHREAD_COND_BROADCAST(cond) \ - ( (cond) ? _evthread_cond_fns.signal_condition((cond), 1) : 0 ) + ( (cond) ? ompi__evthread_cond_fns.signal_condition((cond), 1) : 0 ) /** Wait until the condition 'cond' is signalled. Must be called while * holding 'lock'. The lock will be released until the condition is * signalled, at which point it will be acquired again. Returns 0 for * success, -1 for failure. */ #define EVTHREAD_COND_WAIT(cond, lock) \ - ( (cond) ? _evthread_cond_fns.wait_condition((cond), (lock), NULL) : 0 ) + ( (cond) ? ompi__evthread_cond_fns.wait_condition((cond), (lock), NULL) : 0 ) /** As EVTHREAD_COND_WAIT, but gives up after 'tv' has elapsed. Returns 1 * on timeout. */ #define EVTHREAD_COND_WAIT_TIMED(cond, lock, tv) \ - ( (cond) ? _evthread_cond_fns.wait_condition((cond), (lock), (tv)) : 0 ) + ( (cond) ? ompi__evthread_cond_fns.wait_condition((cond), (lock), (tv)) : 0 ) /** True iff locking functions have been configured. */ #define EVTHREAD_LOCKING_ENABLED() \ - (_evthread_lock_fns.lock != NULL) + (ompi__evthread_lock_fns.lock != NULL) #elif ! defined(_EVENT_DISABLE_THREAD_SUPPORT) diff --git a/opal/mca/event/libevent2022/libevent/evthread.c b/opal/mca/event/libevent2022/libevent/evthread.c index 90e195d584..5f1e7a2b86 100644 --- a/opal/mca/event/libevent2022/libevent/evthread.c +++ b/opal/mca/event/libevent2022/libevent/evthread.c @@ -45,12 +45,12 @@ #endif /* globals */ -GLOBAL int _evthread_lock_debugging_enabled = 0; -GLOBAL struct evthread_lock_callbacks _evthread_lock_fns = { +GLOBAL int ompi__evthread_lock_debugging_enabled = 0; +GLOBAL struct evthread_lock_callbacks ompi__evthread_lock_fns = { 0, 0, NULL, NULL, NULL, NULL }; -GLOBAL unsigned long (*_evthread_id_fn)(void) = NULL; -GLOBAL struct evthread_condition_callbacks _evthread_cond_fns = { +GLOBAL unsigned long (*ompi__evthread_id_fn)(void) = NULL; +GLOBAL struct evthread_condition_callbacks ompi__evthread_cond_fns = { 0, NULL, NULL, NULL, NULL }; @@ -65,21 +65,21 @@ static struct evthread_condition_callbacks _original_cond_fns = { void evthread_set_id_callback(unsigned long (*id_fn)(void)) { - _evthread_id_fn = id_fn; + ompi__evthread_id_fn = id_fn; } int evthread_set_lock_callbacks(const struct evthread_lock_callbacks *cbs) { struct evthread_lock_callbacks *target = - _evthread_lock_debugging_enabled - ? &_original_lock_fns : &_evthread_lock_fns; + ompi__evthread_lock_debugging_enabled + ? &_original_lock_fns : &ompi__evthread_lock_fns; if (!cbs) { if (target->alloc) event_warnx("Trying to disable lock functions after " "they have been set up will probaby not work."); - memset(target, 0, sizeof(_evthread_lock_fns)); + memset(target, 0, sizeof(ompi__evthread_lock_fns)); return 0; } if (target->alloc) { @@ -98,7 +98,7 @@ evthread_set_lock_callbacks(const struct evthread_lock_callbacks *cbs) return -1; } if (cbs->alloc && cbs->free && cbs->lock && cbs->unlock) { - memcpy(target, cbs, sizeof(_evthread_lock_fns)); + memcpy(target, cbs, sizeof(ompi__evthread_lock_fns)); return event_global_setup_locks_(1); } else { return -1; @@ -109,15 +109,15 @@ int evthread_set_condition_callbacks(const struct evthread_condition_callbacks *cbs) { struct evthread_condition_callbacks *target = - _evthread_lock_debugging_enabled - ? &_original_cond_fns : &_evthread_cond_fns; + ompi__evthread_lock_debugging_enabled + ? &_original_cond_fns : &ompi__evthread_cond_fns; if (!cbs) { if (target->alloc_condition) event_warnx("Trying to disable condition functions " "after they have been set up will probaby not " "work."); - memset(target, 0, sizeof(_evthread_cond_fns)); + memset(target, 0, sizeof(ompi__evthread_cond_fns)); return 0; } if (target->alloc_condition) { @@ -136,12 +136,12 @@ evthread_set_condition_callbacks(const struct evthread_condition_callbacks *cbs) } if (cbs->alloc_condition && cbs->free_condition && cbs->signal_condition && cbs->wait_condition) { - memcpy(target, cbs, sizeof(_evthread_cond_fns)); + memcpy(target, cbs, sizeof(ompi__evthread_cond_fns)); } - if (_evthread_lock_debugging_enabled) { - _evthread_cond_fns.alloc_condition = cbs->alloc_condition; - _evthread_cond_fns.free_condition = cbs->free_condition; - _evthread_cond_fns.signal_condition = cbs->signal_condition; + if (ompi__evthread_lock_debugging_enabled) { + ompi__evthread_cond_fns.alloc_condition = cbs->alloc_condition; + ompi__evthread_cond_fns.free_condition = cbs->free_condition; + ompi__evthread_cond_fns.signal_condition = cbs->signal_condition; } return 0; } @@ -197,9 +197,9 @@ evthread_debug_lock_mark_locked(unsigned mode, struct debug_lock *lock) ++lock->count; if (!(lock->locktype & EVTHREAD_LOCKTYPE_RECURSIVE)) EVUTIL_ASSERT(lock->count == 1); - if (_evthread_id_fn) { + if (ompi__evthread_id_fn) { unsigned long me; - me = _evthread_id_fn(); + me = ompi__evthread_id_fn(); if (lock->count > 1) EVUTIL_ASSERT(lock->held_by == me); lock->held_by = me; @@ -230,8 +230,8 @@ evthread_debug_lock_mark_unlocked(unsigned mode, struct debug_lock *lock) EVUTIL_ASSERT(mode & (EVTHREAD_READ|EVTHREAD_WRITE)); else EVUTIL_ASSERT((mode & (EVTHREAD_READ|EVTHREAD_WRITE)) == 0); - if (_evthread_id_fn) { - EVUTIL_ASSERT(lock->held_by == _evthread_id_fn()); + if (ompi__evthread_id_fn) { + EVUTIL_ASSERT(lock->held_by == ompi__evthread_id_fn()); if (lock->count == 1) lock->held_by = 0; } @@ -274,17 +274,17 @@ evthread_enable_lock_debuging(void) debug_lock_lock, debug_lock_unlock }; - if (_evthread_lock_debugging_enabled) + if (ompi__evthread_lock_debugging_enabled) return; - memcpy(&_original_lock_fns, &_evthread_lock_fns, + memcpy(&_original_lock_fns, &ompi__evthread_lock_fns, sizeof(struct evthread_lock_callbacks)); - memcpy(&_evthread_lock_fns, &cbs, + memcpy(&ompi__evthread_lock_fns, &cbs, sizeof(struct evthread_lock_callbacks)); - memcpy(&_original_cond_fns, &_evthread_cond_fns, + memcpy(&_original_cond_fns, &ompi__evthread_cond_fns, sizeof(struct evthread_condition_callbacks)); - _evthread_cond_fns.wait_condition = debug_cond_wait; - _evthread_lock_debugging_enabled = 1; + ompi__evthread_cond_fns.wait_condition = debug_cond_wait; + ompi__evthread_lock_debugging_enabled = 1; /* XXX return value should get checked. */ event_global_setup_locks_(0); @@ -296,8 +296,8 @@ _evthread_is_debug_lock_held(void *lock_) struct debug_lock *lock = lock_; if (! lock->count) return 0; - if (_evthread_id_fn) { - unsigned long me = _evthread_id_fn(); + if (ompi__evthread_id_fn) { + unsigned long me = ompi__evthread_id_fn(); if (lock->held_by != me) return 0; } @@ -344,15 +344,15 @@ evthread_setup_global_lock_(void *lock_, unsigned locktype, int enable_locks) lock->count = 0; lock->held_by = 0; return lock; - } else if (enable_locks && ! _evthread_lock_debugging_enabled) { + } else if (enable_locks && ! ompi__evthread_lock_debugging_enabled) { /* Case 3: allocate a regular lock */ EVUTIL_ASSERT(lock_ == NULL); - return _evthread_lock_fns.alloc(locktype); + return ompi__evthread_lock_fns.alloc(locktype); } else { /* Case 4: Fill in a debug lock with a real lock */ struct debug_lock *lock = lock_; EVUTIL_ASSERT(enable_locks && - _evthread_lock_debugging_enabled); + ompi__evthread_lock_debugging_enabled); EVUTIL_ASSERT(lock->locktype == locktype); EVUTIL_ASSERT(lock->lock == NULL); lock->lock = _original_lock_fns.alloc( @@ -371,74 +371,74 @@ evthread_setup_global_lock_(void *lock_, unsigned locktype, int enable_locks) unsigned long _evthreadimpl_get_id() { - return _evthread_id_fn ? _evthread_id_fn() : 1; + return ompi__evthread_id_fn ? ompi__evthread_id_fn() : 1; } void * _evthreadimpl_lock_alloc(unsigned locktype) { - return _evthread_lock_fns.alloc ? - _evthread_lock_fns.alloc(locktype) : NULL; + return ompi__evthread_lock_fns.alloc ? + ompi__evthread_lock_fns.alloc(locktype) : NULL; } void _evthreadimpl_lock_free(void *lock, unsigned locktype) { - if (_evthread_lock_fns.free) - _evthread_lock_fns.free(lock, locktype); + if (ompi__evthread_lock_fns.free) + ompi__evthread_lock_fns.free(lock, locktype); } int _evthreadimpl_lock_lock(unsigned mode, void *lock) { - if (_evthread_lock_fns.lock) - return _evthread_lock_fns.lock(mode, lock); + if (ompi__evthread_lock_fns.lock) + return ompi__evthread_lock_fns.lock(mode, lock); else return 0; } int _evthreadimpl_lock_unlock(unsigned mode, void *lock) { - if (_evthread_lock_fns.unlock) - return _evthread_lock_fns.unlock(mode, lock); + if (ompi__evthread_lock_fns.unlock) + return ompi__evthread_lock_fns.unlock(mode, lock); else return 0; } void * _evthreadimpl_cond_alloc(unsigned condtype) { - return _evthread_cond_fns.alloc_condition ? - _evthread_cond_fns.alloc_condition(condtype) : NULL; + return ompi__evthread_cond_fns.alloc_condition ? + ompi__evthread_cond_fns.alloc_condition(condtype) : NULL; } void _evthreadimpl_cond_free(void *cond) { - if (_evthread_cond_fns.free_condition) - _evthread_cond_fns.free_condition(cond); + if (ompi__evthread_cond_fns.free_condition) + ompi__evthread_cond_fns.free_condition(cond); } int _evthreadimpl_cond_signal(void *cond, int broadcast) { - if (_evthread_cond_fns.signal_condition) - return _evthread_cond_fns.signal_condition(cond, broadcast); + if (ompi__evthread_cond_fns.signal_condition) + return ompi__evthread_cond_fns.signal_condition(cond, broadcast); else return 0; } int _evthreadimpl_cond_wait(void *cond, void *lock, const struct timeval *tv) { - if (_evthread_cond_fns.wait_condition) - return _evthread_cond_fns.wait_condition(cond, lock, tv); + if (ompi__evthread_cond_fns.wait_condition) + return ompi__evthread_cond_fns.wait_condition(cond, lock, tv); else return 0; } int _evthreadimpl_is_lock_debugging_enabled(void) { - return _evthread_lock_debugging_enabled; + return ompi__evthread_lock_debugging_enabled; } int _evthreadimpl_locking_enabled(void) { - return _evthread_lock_fns.lock != NULL; + return ompi__evthread_lock_fns.lock != NULL; } #endif diff --git a/opal/mca/event/libevent2022/libevent/log-internal.h b/opal/mca/event/libevent2022/libevent/log-internal.h index 9b8e0fa290..49a7c3359f 100644 --- a/opal/mca/event/libevent2022/libevent/log-internal.h +++ b/opal/mca/event/libevent2022/libevent/log-internal.h @@ -57,7 +57,7 @@ void _event_debugx(const char *fmt, ...) EV_CHECK_FMT(1,2); #undef EV_CHECK_FMT /**** OMPI CHANGE ****/ -extern int event_enable_debug_output; +extern int ompi_event_enable_debug_output; /**** END OMPI CHANGE ****/ #endif diff --git a/opal/mca/event/libevent2022/libevent/log.c b/opal/mca/event/libevent2022/libevent/log.c index b65517f769..43ee9b3804 100644 --- a/opal/mca/event/libevent2022/libevent/log.c +++ b/opal/mca/event/libevent2022/libevent/log.c @@ -64,7 +64,7 @@ static void event_exit(int errcode) EV_NORETURN; static event_fatal_cb fatal_fn = NULL; /**** OMPI CHANGE ****/ -int event_enable_debug_output = 0; +int ompi_event_enable_debug_output = 0; /**** END OMPI CHANGE ****/ void diff --git a/opal/mca/event/libevent2022/libevent/test/regress.c b/opal/mca/event/libevent2022/libevent/test/regress.c index 5935f9be07..aec74616bb 100644 --- a/opal/mca/event/libevent2022/libevent/test/regress.c +++ b/opal/mca/event/libevent2022/libevent/test/regress.c @@ -814,7 +814,7 @@ end: #ifndef WIN32 static void signal_cb(evutil_socket_t fd, short event, void *arg); -#define current_base event_global_current_base_ +#define current_base ompi_event_global_current_base_ extern struct event_base *current_base; static void diff --git a/opal/mca/event/libevent2022/libevent2022_component.c b/opal/mca/event/libevent2022/libevent2022_component.c index 1151428f91..6c8171dcf8 100644 --- a/opal/mca/event/libevent2022/libevent2022_component.c +++ b/opal/mca/event/libevent2022/libevent2022_component.c @@ -4,6 +4,7 @@ * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights reserved. * Copyright (c) 2015 Intel, Inc. All rights reserved. * + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -35,7 +36,7 @@ const char *opal_event_libevent2022_component_version_string = /* * MCA variables */ -char *event_module_include = NULL; +char *ompi_event_module_include = NULL; /* copied from event.c */ #if defined(_EVENT_HAVE_EVENT_PORTS) && _EVENT_HAVE_EVENT_PORTS @@ -61,7 +62,7 @@ extern const struct eventop win32ops; #endif /* Array of backends in order of preference. */ -const struct eventop *eventops[] = { +const struct eventop *ompi_eventops[] = { #if defined(_EVENT_HAVE_EVENT_PORTS) && _EVENT_HAVE_EVENT_PORTS &evportops, #endif @@ -122,7 +123,7 @@ const opal_event_component_t mca_event_libevent2022_component = { static int libevent2022_register (void) { - const struct eventop** _eventop = eventops; + const struct eventop** _eventop = ompi_eventops; char available_eventops[BUFSIZ] = "none"; char *help_msg = NULL; int ret; @@ -156,18 +157,18 @@ static int libevent2022_register (void) const int len = sizeof (available_eventops); int cur_len = snprintf (available_eventops, len, "%s", (*(_eventop++))->name); - for (int i = 1 ; eventops[i] && cur_len < len ; ++i) { + for (int i = 1 ; ompi_eventops[i] && cur_len < len ; ++i) { cur_len += snprintf (available_eventops + cur_len, len - cur_len, ", %s", - eventops[i]->name); + ompi_eventops[i]->name); } /* ensure the available_eventops string is always NULL-terminated */ available_eventops[len - 1] = '\0'; } #ifdef __APPLE__ - event_module_include ="select"; + ompi_event_module_include ="select"; #else - event_module_include = "poll"; + ompi_event_module_include = "poll"; #endif asprintf( &help_msg, @@ -181,7 +182,7 @@ static int libevent2022_register (void) MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3, MCA_BASE_VAR_SCOPE_LOCAL, - &event_module_include); + &ompi_event_module_include); free(help_msg); /* release the help message */ if (0 > ret) { diff --git a/opal/mca/event/libevent2022/libevent2022_module.c b/opal/mca/event/libevent2022/libevent2022_module.c index 050a898330..b36f4d4f98 100644 --- a/opal/mca/event/libevent2022/libevent2022_module.c +++ b/opal/mca/event/libevent2022/libevent2022_module.c @@ -7,6 +7,7 @@ * Copyright (c) 2015 Intel, Inc. All rights reserved. * Copyright (c) 2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -67,8 +68,8 @@ #include "opal/mca/event/event.h" static struct event_config *config=NULL; -extern char *event_module_include; -extern const struct eventop *eventops[]; +extern char *ompi_event_module_include; +extern const struct eventop *ompi_eventops[]; opal_event_base_t* opal_event_base_create(void) { @@ -93,29 +94,29 @@ int opal_event_init(void) dumpit = true; } - if (NULL == event_module_include) { + if (NULL == ompi_event_module_include) { /* Shouldn't happen, but... */ - event_module_include = strdup("select"); + ompi_event_module_include = strdup("select"); } - includes = opal_argv_split(event_module_include,','); + includes = opal_argv_split(ompi_event_module_include,','); /* get a configuration object */ config = event_config_new(); /* cycle thru the available subsystems */ - for (i = 0 ; NULL != eventops[i] ; ++i) { + for (i = 0 ; NULL != ompi_eventops[i] ; ++i) { /* if this module isn't included in the given ones, * then exclude it */ dumpit = true; for (j=0; NULL != includes[j]; j++) { if (0 == strcmp("all", includes[j]) || - 0 == strcmp(eventops[i]->name, includes[j])) { + 0 == strcmp(ompi_eventops[i]->name, includes[j])) { dumpit = false; break; } } if (dumpit) { - event_config_avoid_method(config, eventops[i]->name); + event_config_avoid_method(config, ompi_eventops[i]->name); } } opal_argv_free(includes); diff --git a/opal/mca/pmix/pmix2x/pmix/src/threads/wait_sync.h b/opal/mca/pmix/pmix2x/pmix/src/threads/wait_sync.h index 4430912606..e0ac8c63f1 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/threads/wait_sync.h +++ b/opal/mca/pmix/pmix2x/pmix/src/threads/wait_sync.h @@ -9,6 +9,7 @@ * Copyright (c) 2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2017 Intel, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -40,7 +41,7 @@ typedef struct pmix_wait_sync_t { #define REQUEST_PENDING (void*)0L #define REQUEST_COMPLETED (void*)1L -#define PMIX_SYNC_WAIT(sync) sync_wait_mt (sync) +#define PMIX_SYNC_WAIT(sync) ompi_sync_wait_mt (sync) /* The loop in release handles a race condition between the signaling * thread and the destruction of the condition variable. The signaling diff --git a/opal/runtime/opal_cr.c b/opal/runtime/opal_cr.c index bd75558e86..56729b5a7d 100644 --- a/opal/runtime/opal_cr.c +++ b/opal/runtime/opal_cr.c @@ -15,6 +15,7 @@ * Copyright (c) 2012-2013 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -620,7 +621,7 @@ int opal_cr_inc_core_prep(void) /* * Call User Level INC */ - if(OPAL_SUCCESS != (ret = trigger_user_inc_callback(OPAL_CR_INC_PRE_CRS_PRE_MPI, + if(OPAL_SUCCESS != (ret = ompi_trigger_user_inc_callback(OPAL_CR_INC_PRE_CRS_PRE_MPI, OPAL_CR_INC_STATE_PREPARE)) ) { return ret; } @@ -640,7 +641,7 @@ int opal_cr_inc_core_prep(void) /* * Call User Level INC */ - if(OPAL_SUCCESS != (ret = trigger_user_inc_callback(OPAL_CR_INC_PRE_CRS_POST_MPI, + if(OPAL_SUCCESS != (ret = ompi_trigger_user_inc_callback(OPAL_CR_INC_PRE_CRS_POST_MPI, OPAL_CR_INC_STATE_PREPARE)) ) { return ret; } @@ -728,7 +729,7 @@ int opal_cr_inc_core_recover(int state) cb_state = OPAL_CR_INC_STATE_ERROR; } - if(OPAL_SUCCESS != (ret = trigger_user_inc_callback(OPAL_CR_INC_POST_CRS_PRE_MPI, + if(OPAL_SUCCESS != (ret = ompi_trigger_user_inc_callback(OPAL_CR_INC_POST_CRS_PRE_MPI, cb_state)) ) { return ret; } @@ -745,7 +746,7 @@ int opal_cr_inc_core_recover(int state) return ret; } - if(OPAL_SUCCESS != (ret = trigger_user_inc_callback(OPAL_CR_INC_POST_CRS_POST_MPI, + if(OPAL_SUCCESS != (ret = ompi_trigger_user_inc_callback(OPAL_CR_INC_POST_CRS_POST_MPI, cb_state)) ) { return ret; } @@ -881,7 +882,7 @@ int opal_cr_user_inc_register_callback(opal_cr_user_inc_callback_event_t event, return OPAL_SUCCESS; } -int trigger_user_inc_callback(opal_cr_user_inc_callback_event_t event, +int ompi_trigger_user_inc_callback(opal_cr_user_inc_callback_event_t event, opal_cr_user_inc_callback_state_t state) { if( NULL == cur_user_coord_callback[event] ) { diff --git a/opal/runtime/opal_cr.h b/opal/runtime/opal_cr.h index 64c1ff4d3b..f8d3267658 100644 --- a/opal/runtime/opal_cr.h +++ b/opal/runtime/opal_cr.h @@ -10,6 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -329,7 +330,7 @@ typedef enum opal_cr_ckpt_cmd_state_t opal_cr_ckpt_cmd_state_t; opal_cr_user_inc_callback_fn_t function, opal_cr_user_inc_callback_fn_t *prev_function); - OPAL_DECLSPEC int trigger_user_inc_callback(opal_cr_user_inc_callback_event_t event, + OPAL_DECLSPEC int ompi_trigger_user_inc_callback(opal_cr_user_inc_callback_event_t event, opal_cr_user_inc_callback_state_t state); diff --git a/opal/runtime/opal_info_support.c b/opal/runtime/opal_info_support.c index e3fd23ac22..2912d0b646 100644 --- a/opal/runtime/opal_info_support.c +++ b/opal/runtime/opal_info_support.c @@ -593,7 +593,7 @@ void opal_info_do_type(opal_cmd_line_t *opal_info_cmd_line) if (OPAL_SUCCESS != ret) { continue; } - if (0 == strcmp(type, var_type_names[var->mbv_type]) && (var->mbv_info_lvl <= max_level)) { + if (0 == strcmp(type, ompi_var_type_names[var->mbv_type]) && (var->mbv_info_lvl <= max_level)) { ret = mca_base_var_dump(var->mbv_index, &strings, !opal_info_pretty ? MCA_BASE_VAR_DUMP_PARSABLE : MCA_BASE_VAR_DUMP_READABLE); if (OPAL_SUCCESS != ret) { continue; diff --git a/opal/threads/wait_sync.c b/opal/threads/wait_sync.c index 31361c6964..92b6096406 100644 --- a/opal/threads/wait_sync.c +++ b/opal/threads/wait_sync.c @@ -5,6 +5,7 @@ * reserved. * Copyright (c) 2016 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -23,7 +24,7 @@ static ompi_wait_sync_t* wait_sync_list = NULL; pthread_mutex_unlock( &(who)->lock); \ } while(0) -int sync_wait_mt(ompi_wait_sync_t *sync) +int ompi_sync_wait_mt(ompi_wait_sync_t *sync) { /* Don't stop if the waiting synchronization is completed. We avoid the * race condition around the release of the synchronization using the diff --git a/opal/threads/wait_sync.h b/opal/threads/wait_sync.h index 8d83effc9c..9a58288437 100644 --- a/opal/threads/wait_sync.h +++ b/opal/threads/wait_sync.h @@ -8,6 +8,7 @@ * Copyright (c) 2016 Mellanox Technologies. All rights reserved. * Copyright (c) 2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -37,7 +38,7 @@ typedef struct ompi_wait_sync_t { #define REQUEST_PENDING (void*)0L #define REQUEST_COMPLETED (void*)1L -#define SYNC_WAIT(sync) (opal_using_threads() ? sync_wait_mt (sync) : sync_wait_st (sync)) +#define SYNC_WAIT(sync) (opal_using_threads() ? ompi_sync_wait_mt (sync) : sync_wait_st (sync)) /* The loop in release handles a race condition between the signaling * thread and the destruction of the condition variable. The signaling @@ -75,7 +76,7 @@ typedef struct ompi_wait_sync_t { (sync)->signaling = false; \ } -OPAL_DECLSPEC int sync_wait_mt(ompi_wait_sync_t *sync); +OPAL_DECLSPEC int ompi_sync_wait_mt(ompi_wait_sync_t *sync); static inline int sync_wait_st (ompi_wait_sync_t *sync) { while (sync->count > 0) { diff --git a/opal/util/cmd_line.c b/opal/util/cmd_line.c index 7418ae8c9b..f17263ac3c 100644 --- a/opal/util/cmd_line.c +++ b/opal/util/cmd_line.c @@ -16,6 +16,7 @@ * Copyright (c) 2015-2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2016-2017 Intel, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -56,7 +57,7 @@ /* * Description of a command line option */ -struct cmd_line_option_t { +struct ompi_cmd_line_option_t { opal_list_item_t super; char clo_short_name; @@ -72,18 +73,18 @@ struct cmd_line_option_t { bool clo_variable_set; opal_cmd_line_otype_t clo_otype; }; -typedef struct cmd_line_option_t cmd_line_option_t; -static void option_constructor(cmd_line_option_t *cmd); -static void option_destructor(cmd_line_option_t *cmd); +typedef struct ompi_cmd_line_option_t ompi_cmd_line_option_t; +static void option_constructor(ompi_cmd_line_option_t *cmd); +static void option_destructor(ompi_cmd_line_option_t *cmd); -OBJ_CLASS_INSTANCE(cmd_line_option_t, +OBJ_CLASS_INSTANCE(ompi_cmd_line_option_t, opal_list_item_t, option_constructor, option_destructor); /* * An option that was used in the argv that was parsed */ -struct cmd_line_param_t { +struct ompi_cmd_line_param_t { opal_list_item_t super; /* Note that clp_arg points to storage "owned" by someone else; it @@ -95,7 +96,7 @@ struct cmd_line_param_t { /* Pointer to the existing option. This is also by reference; it should not be free()ed. */ - cmd_line_option_t *clp_option; + ompi_cmd_line_option_t *clp_option; /* This argv array is a list of all the parameters of this option. It is owned by this parameter, and should be freed when this @@ -104,10 +105,10 @@ struct cmd_line_param_t { int clp_argc; char **clp_argv; }; -typedef struct cmd_line_param_t cmd_line_param_t; -static void param_constructor(cmd_line_param_t *cmd); -static void param_destructor(cmd_line_param_t *cmd); -OBJ_CLASS_INSTANCE(cmd_line_param_t, +typedef struct ompi_cmd_line_param_t ompi_cmd_line_param_t; +static void param_constructor(ompi_cmd_line_param_t *cmd); +static void param_destructor(ompi_cmd_line_param_t *cmd); +OBJ_CLASS_INSTANCE(ompi_cmd_line_param_t, opal_list_item_t, param_constructor, param_destructor); @@ -137,13 +138,13 @@ static int split_shorts(opal_cmd_line_t *cmd, char *token, char **args, int *output_argc, char ***output_argv, int *num_args_used, bool ignore_unknown); -static cmd_line_option_t *find_option(opal_cmd_line_t *cmd, +static ompi_cmd_line_option_t *find_option(opal_cmd_line_t *cmd, const char *option_name) __opal_attribute_nonnull__(1) __opal_attribute_nonnull__(2); -static int set_dest(cmd_line_option_t *option, char *sval); -static void fill(const cmd_line_option_t *a, char result[3][BUFSIZ]); +static int set_dest(ompi_cmd_line_option_t *option, char *sval); +static void fill(const ompi_cmd_line_option_t *a, char result[3][BUFSIZ]); static int qsort_callback(const void *a, const void *b); static opal_cmd_line_otype_t get_help_otype(opal_cmd_line_t *cmd); -static char *build_parsable(cmd_line_option_t *option); +static char *build_parsable(ompi_cmd_line_option_t *option); /* @@ -248,8 +249,8 @@ int opal_cmd_line_parse(opal_cmd_line_t *cmd, bool ignore_unknown, bool ignore_u int argc, char **argv) { int i, j, orig, ret; - cmd_line_option_t *option; - cmd_line_param_t *param; + ompi_cmd_line_option_t *option; + ompi_cmd_line_param_t *param; bool is_unknown_option; bool is_unknown_token; bool is_option; @@ -385,7 +386,7 @@ int opal_cmd_line_parse(opal_cmd_line_t *cmd, bool ignore_unknown, bool ignore_u (insertted by split_shorts()), then print an error and return. */ - param = OBJ_NEW(cmd_line_param_t); + param = OBJ_NEW(ompi_cmd_line_param_t); if (NULL == param) { opal_mutex_unlock(&cmd->lcl_mutex); return OPAL_ERR_OUT_OF_RESOURCE; @@ -535,7 +536,7 @@ char *opal_cmd_line_get_usage_msg(opal_cmd_line_t *cmd) char *ret, temp[MAX_WIDTH * 2], line[MAX_WIDTH * 2]; char *start, *desc, *ptr; opal_list_item_t *item; - cmd_line_option_t *option, **sorted; + ompi_cmd_line_option_t *option, **sorted; opal_cmd_line_otype_t otype; /* Thread serialization */ @@ -550,7 +551,7 @@ char *opal_cmd_line_get_usage_msg(opal_cmd_line_t *cmd) /* First, take the original list and sort it */ - sorted = (cmd_line_option_t**)malloc(sizeof(cmd_line_option_t *) * + sorted = (ompi_cmd_line_option_t**)malloc(sizeof(ompi_cmd_line_option_t *) * opal_list_get_size(&cmd->lcl_options)); if (NULL == sorted) { opal_mutex_unlock(&cmd->lcl_mutex); @@ -558,9 +559,9 @@ char *opal_cmd_line_get_usage_msg(opal_cmd_line_t *cmd) } i = 0; OPAL_LIST_FOREACH(item, &cmd->lcl_options, opal_list_item_t) { - sorted[i++] = (cmd_line_option_t *) item; + sorted[i++] = (ompi_cmd_line_option_t *) item; } - qsort(sorted, i, sizeof(cmd_line_option_t*), qsort_callback); + qsort(sorted, i, sizeof(ompi_cmd_line_option_t*), qsort_callback); /* Find if a help argument was passed, and return its type if it was. */ @@ -761,8 +762,8 @@ bool opal_cmd_line_is_taken(opal_cmd_line_t *cmd, const char *opt) int opal_cmd_line_get_ninsts(opal_cmd_line_t *cmd, const char *opt) { int ret; - cmd_line_param_t *param; - cmd_line_option_t *option; + ompi_cmd_line_param_t *param; + ompi_cmd_line_option_t *option; /* Thread serialization */ @@ -774,7 +775,7 @@ int opal_cmd_line_get_ninsts(opal_cmd_line_t *cmd, const char *opt) ret = 0; option = find_option(cmd, opt); if (NULL != option) { - OPAL_LIST_FOREACH(param, &cmd->lcl_params, cmd_line_param_t) { + OPAL_LIST_FOREACH(param, &cmd->lcl_params, ompi_cmd_line_param_t) { if (param->clp_option == option) { ++ret; } @@ -799,8 +800,8 @@ char *opal_cmd_line_get_param(opal_cmd_line_t *cmd, const char *opt, int inst, int idx) { int num_found; - cmd_line_param_t *param; - cmd_line_option_t *option; + ompi_cmd_line_param_t *param; + ompi_cmd_line_option_t *option; /* Thread serialization */ @@ -817,7 +818,7 @@ char *opal_cmd_line_get_param(opal_cmd_line_t *cmd, const char *opt, int inst, parameter index greater than we will have */ if (idx < option->clo_num_params) { - OPAL_LIST_FOREACH(param, &cmd->lcl_params, cmd_line_param_t) { + OPAL_LIST_FOREACH(param, &cmd->lcl_params, ompi_cmd_line_param_t) { if (param->clp_argc > 0 && param->clp_option == option) { if (num_found == inst) { opal_mutex_unlock(&cmd->lcl_mutex); @@ -880,7 +881,7 @@ int opal_cmd_line_get_tail(opal_cmd_line_t *cmd, int *tailc, char ***tailv) * Static functions **************************************************************************/ -static void option_constructor(cmd_line_option_t *o) +static void option_constructor(ompi_cmd_line_option_t *o) { o->clo_short_name = '\0'; o->clo_single_dash_name = NULL; @@ -896,7 +897,7 @@ static void option_constructor(cmd_line_option_t *o) } -static void option_destructor(cmd_line_option_t *o) +static void option_destructor(ompi_cmd_line_option_t *o) { if (NULL != o->clo_single_dash_name) { free(o->clo_single_dash_name); @@ -913,7 +914,7 @@ static void option_destructor(cmd_line_option_t *o) } -static void param_constructor(cmd_line_param_t *p) +static void param_constructor(ompi_cmd_line_param_t *p) { p->clp_arg = NULL; p->clp_option = NULL; @@ -922,7 +923,7 @@ static void param_constructor(cmd_line_param_t *p) } -static void param_destructor(cmd_line_param_t *p) +static void param_destructor(ompi_cmd_line_param_t *p) { if (NULL != p->clp_argv) { opal_argv_free(p->clp_argv); @@ -982,7 +983,7 @@ static void cmd_line_destructor(opal_cmd_line_t *cmd) static int make_opt(opal_cmd_line_t *cmd, opal_cmd_line_init_t *e) { - cmd_line_option_t *option; + ompi_cmd_line_option_t *option; /* Bozo checks */ @@ -1009,7 +1010,7 @@ static int make_opt(opal_cmd_line_t *cmd, opal_cmd_line_init_t *e) } /* Allocate and fill an option item */ - option = OBJ_NEW(cmd_line_option_t); + option = OBJ_NEW(ompi_cmd_line_option_t); if (NULL == option) { return OPAL_ERR_OUT_OF_RESOURCE; } @@ -1087,7 +1088,7 @@ static int split_shorts(opal_cmd_line_t *cmd, char *token, char **args, int *num_args_used, bool ignore_unknown) { int i, j, len; - cmd_line_option_t *option; + ompi_cmd_line_option_t *option; char fake_token[3]; int num_args; @@ -1148,16 +1149,16 @@ static int split_shorts(opal_cmd_line_t *cmd, char *token, char **args, } -static cmd_line_option_t *find_option(opal_cmd_line_t *cmd, +static ompi_cmd_line_option_t *find_option(opal_cmd_line_t *cmd, const char *option_name) { - cmd_line_option_t *option; + ompi_cmd_line_option_t *option; /* Iterate through the list of options hanging off the opal_cmd_line_t and see if we find a match in either the short or long names */ - OPAL_LIST_FOREACH(option, &cmd->lcl_options, cmd_line_option_t) { + OPAL_LIST_FOREACH(option, &cmd->lcl_options, ompi_cmd_line_option_t) { if ((NULL != option->clo_long_name && 0 == strcmp(option_name, option->clo_long_name)) || (NULL != option->clo_single_dash_name && @@ -1174,7 +1175,7 @@ static cmd_line_option_t *find_option(opal_cmd_line_t *cmd, } -static int set_dest(cmd_line_option_t *option, char *sval) +static int set_dest(ompi_cmd_line_option_t *option, char *sval) { int ival = atol(sval); long lval = strtoul(sval, NULL, 10); @@ -1278,7 +1279,7 @@ static int set_dest(cmd_line_option_t *option, char *sval) /* * Helper function to qsort_callback */ -static void fill(const cmd_line_option_t *a, char result[3][BUFSIZ]) +static void fill(const ompi_cmd_line_option_t *a, char result[3][BUFSIZ]) { int i = 0; @@ -1305,8 +1306,8 @@ static int qsort_callback(const void *aa, const void *bb) { int ret, i; char str1[3][BUFSIZ], str2[3][BUFSIZ]; - const cmd_line_option_t *a = *((const cmd_line_option_t**) aa); - const cmd_line_option_t *b = *((const cmd_line_option_t**) bb); + const ompi_cmd_line_option_t *a = *((const ompi_cmd_line_option_t**) aa); + const ompi_cmd_line_option_t *b = *((const ompi_cmd_line_option_t**) bb); /* Icky comparison of command line options. There are multiple forms of each command line option, so we first have to check @@ -1384,7 +1385,7 @@ static opal_cmd_line_otype_t get_help_otype(opal_cmd_line_t *cmd) * Helper function to build a parsable string for the help * output. */ -static char *build_parsable(cmd_line_option_t *option) { +static char *build_parsable(ompi_cmd_line_option_t *option) { char *line; int length; diff --git a/opal/util/cmd_line.h b/opal/util/cmd_line.h index 9088063b90..546e49200b 100644 --- a/opal/util/cmd_line.h +++ b/opal/util/cmd_line.h @@ -14,6 +14,7 @@ * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * Copyright (c) 2016-2017 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -134,7 +135,7 @@ BEGIN_C_DECLS /** Thread safety */ opal_recursive_mutex_t lcl_mutex; - /** List of cmd_line_option_t's (defined internally) */ + /** List of ompi_cmd_line_option_t's (defined internally) */ opal_list_t lcl_options; /** Duplicate of argc from opal_cmd_line_parse() */ @@ -142,7 +143,7 @@ BEGIN_C_DECLS /** Duplicate of argv from opal_cmd_line_parse() */ char **lcl_argv; - /** Parsed output; list of cmd_line_param_t's (defined internally) */ + /** Parsed output; list of ompi_cmd_line_param_t's (defined internally) */ opal_list_t lcl_params; /** List of tail (unprocessed) arguments */ diff --git a/orte/mca/errmgr/default_orted/errmgr_default_orted.c b/orte/mca/errmgr/default_orted/errmgr_default_orted.c index 05e5e3e414..7d131559a9 100644 --- a/orte/mca/errmgr/default_orted/errmgr_default_orted.c +++ b/orte/mca/errmgr/default_orted/errmgr_default_orted.c @@ -9,6 +9,7 @@ * Copyright (c) 2011-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2014-2017 Intel, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -411,7 +412,7 @@ static void proc_errors(int fd, short args, void *cbdata) goto cleanup; } /* leave the exit code alone - process this as a waitpid */ - odls_base_default_wait_local_proc(child, NULL); + ompi_odls_base_default_wait_local_proc(child, NULL); goto cleanup; } OPAL_OUTPUT_VERBOSE((2, orte_errmgr_base_framework.framework_output, diff --git a/orte/mca/odls/base/odls_base_default_fns.c b/orte/mca/odls/base/odls_base_default_fns.c index 54f1b53e00..159ace9cbd 100644 --- a/orte/mca/odls/base/odls_base_default_fns.c +++ b/orte/mca/odls/base/odls_base_default_fns.c @@ -18,6 +18,7 @@ * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2017 Mellanox Technologies Ltd. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -1111,7 +1112,7 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata) /* set the waitpid callback here for thread protection and * to ensure we can capture the callback on shortlived apps */ ORTE_FLAG_SET(child, ORTE_PROC_FLAG_ALIVE); - orte_wait_cb(child, odls_base_default_wait_local_proc, NULL); + orte_wait_cb(child, ompi_odls_base_default_wait_local_proc, NULL); /* dispatch this child to the next available launch thread */ cd = OBJ_NEW(orte_odls_spawn_caddy_t); @@ -1245,7 +1246,7 @@ int orte_odls_base_default_signal_local_procs(const orte_process_name_t *proc, i * Wait for a callback indicating the child has completed. */ -void odls_base_default_wait_local_proc(orte_proc_t *proc, void* cbdata) +void ompi_odls_base_default_wait_local_proc(orte_proc_t *proc, void* cbdata) { int i; orte_job_t *jobdat; @@ -1825,7 +1826,7 @@ int orte_odls_base_default_restart_proc(orte_proc_t *child, goto CLEANUP; } } - orte_wait_cb(child, odls_base_default_wait_local_proc, NULL); + orte_wait_cb(child, ompi_odls_base_default_wait_local_proc, NULL); ++orte_odls_globals.next_base; if (orte_odls_globals.num_threads <= orte_odls_globals.next_base) { diff --git a/orte/mca/odls/base/odls_private.h b/orte/mca/odls/base/odls_private.h index 81cf44e30a..de7df05ff3 100644 --- a/orte/mca/odls/base/odls_private.h +++ b/orte/mca/odls/base/odls_private.h @@ -13,6 +13,7 @@ * Copyright (c) 2011 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2016-2017 Intel, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -126,7 +127,7 @@ OBJ_CLASS_DECLARATION(orte_odls_launch_local_t); ORTE_DECLSPEC void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata); -ORTE_DECLSPEC void odls_base_default_wait_local_proc(orte_proc_t *proc, void* cbdata); +ORTE_DECLSPEC void ompi_odls_base_default_wait_local_proc(orte_proc_t *proc, void* cbdata); /* define a function type to signal a local proc */ typedef int (*orte_odls_base_signal_local_fn_t)(pid_t pid, int signum);