diff --git a/ompi/mca/pml/base/pml_base_request.h b/ompi/mca/pml/base/pml_base_request.h index 07043e71e9..a290486157 100644 --- a/ompi/mca/pml/base/pml_base_request.h +++ b/ompi/mca/pml/base/pml_base_request.h @@ -13,6 +13,8 @@ * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -68,7 +70,7 @@ struct mca_pml_base_request_t { opal_convertor_t req_convertor; /**< always need the convertor */ /* END: These field have to match the definition of the mca_pml_cm_request_t */ - void *req_addr; /**< pointer to application buffer */ + const void *req_addr; /**< pointer to application buffer */ size_t req_count; /**< count of user datatype elements */ int32_t req_peer; /**< peer process - rank w/in this communicator */ int32_t req_tag; /**< user defined tag */ diff --git a/ompi/mca/pml/base/pml_base_sendreq.h b/ompi/mca/pml/base/pml_base_sendreq.h index 54ba631104..1806c496df 100644 --- a/ompi/mca/pml/base/pml_base_sendreq.h +++ b/ompi/mca/pml/base/pml_base_sendreq.h @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -35,7 +37,7 @@ BEGIN_C_DECLS */ struct mca_pml_base_send_request_t { mca_pml_base_request_t req_base; /**< base request type - common data structure for use by wait/test */ - void *req_addr; /**< pointer to send buffer - may not be application buffer */ + const void *req_addr; /**< pointer to send buffer - may not be application buffer */ size_t req_bytes_packed; /**< packed size of a message given the datatype and count */ mca_pml_base_send_mode_t req_send_mode; /**< type of send */ }; diff --git a/ompi/mca/pml/cm/pml_cm.h b/ompi/mca/pml/cm/pml_cm.h index 20e4bcb4eb..b57e976f20 100644 --- a/ompi/mca/pml/cm/pml_cm.h +++ b/ompi/mca/pml/cm/pml_cm.h @@ -4,6 +4,8 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -65,7 +67,7 @@ OMPI_DECLSPEC extern int mca_pml_cm_del_comm(struct ompi_communicator_t* comm); __opal_attribute_always_inline__ static inline int -mca_pml_cm_irecv_init(void *addr, +mca_pml_cm_irecv_init(const void *addr, size_t count, ompi_datatype_t * datatype, int src, @@ -90,7 +92,7 @@ mca_pml_cm_irecv_init(void *addr, } __opal_attribute_always_inline__ static inline int -mca_pml_cm_irecv(void *addr, +mca_pml_cm_irecv(const void *addr, size_t count, ompi_datatype_t * datatype, int src, @@ -131,7 +133,7 @@ mca_pml_cm_recv_fast_completion(struct mca_mtl_request_t *mtl_request) } __opal_attribute_always_inline__ static inline int -mca_pml_cm_recv(void *addr, +mca_pml_cm_recv(const void *addr, size_t count, ompi_datatype_t * datatype, int src, @@ -207,7 +209,7 @@ mca_pml_cm_recv(void *addr, } __opal_attribute_always_inline__ static inline int -mca_pml_cm_isend_init(void* buf, +mca_pml_cm_isend_init(const void* buf, size_t count, ompi_datatype_t* datatype, int dst, @@ -233,7 +235,7 @@ mca_pml_cm_isend_init(void* buf, } __opal_attribute_always_inline__ static inline int -mca_pml_cm_isend(void* buf, +mca_pml_cm_isend(const void* buf, size_t count, ompi_datatype_t* datatype, int dst, @@ -304,7 +306,7 @@ mca_pml_cm_isend(void* buf, } __opal_attribute_always_inline__ static inline int -mca_pml_cm_send(void *buf, +mca_pml_cm_send(const void *buf, size_t count, ompi_datatype_t* datatype, int dst, diff --git a/ompi/mca/pml/cm/pml_cm_recvreq.h b/ompi/mca/pml/cm/pml_cm_recvreq.h index ea8446e5c7..b08096ce8c 100644 --- a/ompi/mca/pml/cm/pml_cm_recvreq.h +++ b/ompi/mca/pml/cm/pml_cm_recvreq.h @@ -13,6 +13,8 @@ * Copyright (c) 2012 Sandia National Laboratories. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -36,7 +38,7 @@ OBJ_CLASS_DECLARATION(mca_pml_cm_thin_recv_request_t); struct mca_pml_cm_hvy_recv_request_t { mca_pml_cm_request_t req_base; - void *req_addr; /**< pointer to application buffer */ + const void *req_addr; /**< pointer to application buffer */ size_t req_count; /**< count of user datatype elements */ int32_t req_peer; /**< peer process - rank w/in this communicator */ int32_t req_tag; /**< user defined tag */ diff --git a/ompi/mca/pml/cm/pml_cm_sendreq.h b/ompi/mca/pml/cm/pml_cm_sendreq.h index 306d390adb..2aa9328f12 100644 --- a/ompi/mca/pml/cm/pml_cm_sendreq.h +++ b/ompi/mca/pml/cm/pml_cm_sendreq.h @@ -12,6 +12,8 @@ * All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -47,7 +49,7 @@ OBJ_CLASS_DECLARATION(mca_pml_cm_thin_send_request_t); struct mca_pml_cm_hvy_send_request_t { mca_pml_cm_send_request_t req_send; - void *req_addr; /**< pointer to application buffer */ + const void *req_addr; /**< pointer to application buffer */ size_t req_count; /**< count of user datatype elements */ int32_t req_peer; /**< peer process - rank w/in this communicator */ int32_t req_tag; /**< user defined tag */ diff --git a/ompi/mca/pml/ob1/pml_ob1.h b/ompi/mca/pml/ob1/pml_ob1.h index 37b920a641..e44be95f81 100644 --- a/ompi/mca/pml/ob1/pml_ob1.h +++ b/ompi/mca/pml/ob1/pml_ob1.h @@ -14,6 +14,8 @@ * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -138,7 +140,7 @@ extern int mca_pml_ob1_mprobe( int dst, struct ompi_message_t **message, ompi_status_public_t* status ); -extern int mca_pml_ob1_isend_init( void *buf, +extern int mca_pml_ob1_isend_init( const void *buf, size_t count, ompi_datatype_t *datatype, int dst, @@ -147,7 +149,7 @@ extern int mca_pml_ob1_isend_init( void *buf, struct ompi_communicator_t* comm, struct ompi_request_t **request ); -extern int mca_pml_ob1_isend( void *buf, +extern int mca_pml_ob1_isend( const void *buf, size_t count, ompi_datatype_t *datatype, int dst, @@ -156,7 +158,7 @@ extern int mca_pml_ob1_isend( void *buf, struct ompi_communicator_t* comm, struct ompi_request_t **request ); -extern int mca_pml_ob1_send( void *buf, +extern int mca_pml_ob1_send( const void *buf, size_t count, ompi_datatype_t *datatype, int dst, @@ -164,7 +166,7 @@ extern int mca_pml_ob1_send( void *buf, mca_pml_base_send_mode_t mode, struct ompi_communicator_t* comm ); -extern int mca_pml_ob1_irecv_init( void *buf, +extern int mca_pml_ob1_irecv_init( const void *buf, size_t count, ompi_datatype_t *datatype, int src, @@ -172,7 +174,7 @@ extern int mca_pml_ob1_irecv_init( void *buf, struct ompi_communicator_t* comm, struct ompi_request_t **request ); -extern int mca_pml_ob1_irecv( void *buf, +extern int mca_pml_ob1_irecv( const void *buf, size_t count, ompi_datatype_t *datatype, int src, @@ -180,7 +182,7 @@ extern int mca_pml_ob1_irecv( void *buf, struct ompi_communicator_t* comm, struct ompi_request_t **request ); -extern int mca_pml_ob1_recv( void *buf, +extern int mca_pml_ob1_recv( const void *buf, size_t count, ompi_datatype_t *datatype, int src, diff --git a/ompi/mca/pml/ob1/pml_ob1_irecv.c b/ompi/mca/pml/ob1/pml_ob1_irecv.c index e37bd1a854..787a6e0139 100644 --- a/ompi/mca/pml/ob1/pml_ob1_irecv.c +++ b/ompi/mca/pml/ob1/pml_ob1_irecv.c @@ -15,6 +15,8 @@ * Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. * Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -31,7 +33,7 @@ mca_pml_ob1_recv_request_t *mca_pml_ob1_recvreq = NULL; -int mca_pml_ob1_irecv_init(void *addr, +int mca_pml_ob1_irecv_init(const void *addr, size_t count, ompi_datatype_t * datatype, int src, @@ -56,7 +58,7 @@ int mca_pml_ob1_irecv_init(void *addr, return OMPI_SUCCESS; } -int mca_pml_ob1_irecv(void *addr, +int mca_pml_ob1_irecv(const void *addr, size_t count, ompi_datatype_t * datatype, int src, @@ -83,7 +85,7 @@ int mca_pml_ob1_irecv(void *addr, } -int mca_pml_ob1_recv(void *addr, +int mca_pml_ob1_recv(const void *addr, size_t count, ompi_datatype_t * datatype, int src, diff --git a/ompi/mca/pml/ob1/pml_ob1_isend.c b/ompi/mca/pml/ob1/pml_ob1_isend.c index 273883ea88..a25a7250b2 100644 --- a/ompi/mca/pml/ob1/pml_ob1_isend.c +++ b/ompi/mca/pml/ob1/pml_ob1_isend.c @@ -31,7 +31,7 @@ mca_pml_ob1_send_request_t *mca_pml_ob1_sendreq = NULL; -int mca_pml_ob1_isend_init(void *buf, +int mca_pml_ob1_isend_init(const void *buf, size_t count, ompi_datatype_t * datatype, int dst, @@ -61,7 +61,7 @@ int mca_pml_ob1_isend_init(void *buf, } /* try to get a small message out on to the wire quickly */ -static inline int mca_pml_ob1_send_inline (void *buf, size_t count, +static inline int mca_pml_ob1_send_inline (const void *buf, size_t count, ompi_datatype_t * datatype, int dst, int tag, int16_t seqn, ompi_proc_t *dst_proc, mca_bml_base_endpoint_t* endpoint, @@ -117,7 +117,7 @@ static inline int mca_pml_ob1_send_inline (void *buf, size_t count, return (int) size; } -int mca_pml_ob1_isend(void *buf, +int mca_pml_ob1_isend(const void *buf, size_t count, ompi_datatype_t * datatype, int dst, @@ -168,7 +168,7 @@ int mca_pml_ob1_isend(void *buf, return rc; } -int mca_pml_ob1_send(void *buf, +int mca_pml_ob1_send(const void *buf, size_t count, ompi_datatype_t * datatype, int dst, diff --git a/ompi/mca/pml/pml.h b/ompi/mca/pml/pml.h index f71a963270..70bf5deb58 100644 --- a/ompi/mca/pml/pml.h +++ b/ompi/mca/pml/pml.h @@ -13,6 +13,8 @@ * Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2011 Sandia National Laboratories. All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -206,7 +208,7 @@ typedef int (*mca_pml_base_module_del_comm_fn_t)(struct ompi_communicator_t* com * @return OMPI_SUCCESS or failure status. */ typedef int (*mca_pml_base_module_irecv_init_fn_t)( - void *buf, + const void *buf, size_t count, struct ompi_datatype_t *datatype, int src, @@ -228,7 +230,7 @@ typedef int (*mca_pml_base_module_irecv_init_fn_t)( * @return OMPI_SUCCESS or failure status. */ typedef int (*mca_pml_base_module_irecv_fn_t)( - void *buf, + const void *buf, size_t count, struct ompi_datatype_t *datatype, int src, @@ -257,7 +259,7 @@ typedef int (*mca_pml_base_module_imrecv_fn_t)( * @return OMPI_SUCCESS or failure status. */ typedef int (*mca_pml_base_module_recv_fn_t)( - void *buf, + const void *buf, size_t count, struct ompi_datatype_t *datatype, int src, @@ -287,7 +289,7 @@ typedef int (*mca_pml_base_module_mrecv_fn_t)( * @return OMPI_SUCCESS or failure status. */ typedef int (*mca_pml_base_module_isend_init_fn_t)( - void *buf, + const void *buf, size_t count, struct ompi_datatype_t *datatype, int dst, @@ -312,7 +314,7 @@ typedef int (*mca_pml_base_module_isend_init_fn_t)( * @return OMPI_SUCCESS or failure status. */ typedef int (*mca_pml_base_module_isend_fn_t)( - void *buf, + const void *buf, size_t count, struct ompi_datatype_t *datatype, int dst, @@ -336,7 +338,7 @@ typedef int (*mca_pml_base_module_isend_fn_t)( * @return OMPI_SUCCESS or failure status. */ typedef int (*mca_pml_base_module_send_fn_t)( - void *buf, + const void *buf, size_t count, struct ompi_datatype_t *datatype, int dst, diff --git a/ompi/mca/pml/yalla/pml_yalla.c b/ompi/mca/pml/yalla/pml_yalla.c index 4200aef383..7fe087c572 100644 --- a/ompi/mca/pml/yalla/pml_yalla.c +++ b/ompi/mca/pml/yalla/pml_yalla.c @@ -1,5 +1,7 @@ /* * Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -311,7 +313,7 @@ int mca_pml_yalla_del_comm(struct ompi_communicator_t* comm) return OMPI_SUCCESS; } -int mca_pml_yalla_irecv_init(void *buf, size_t count, ompi_datatype_t *datatype, +int mca_pml_yalla_irecv_init(const void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag, struct ompi_communicator_t* comm, struct ompi_request_t **request) { @@ -327,7 +329,7 @@ int mca_pml_yalla_irecv_init(void *buf, size_t count, ompi_datatype_t *datatype, return OMPI_SUCCESS; } -int mca_pml_yalla_irecv(void *buf, size_t count, ompi_datatype_t *datatype, +int mca_pml_yalla_irecv(const void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag, struct ompi_communicator_t* comm, struct ompi_request_t **request) { @@ -351,7 +353,7 @@ int mca_pml_yalla_irecv(void *buf, size_t count, ompi_datatype_t *datatype, return OMPI_SUCCESS; } -int mca_pml_yalla_recv(void *buf, size_t count, ompi_datatype_t *datatype, int src, +int mca_pml_yalla_recv(const void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag, struct ompi_communicator_t* comm, ompi_status_public_t* status) { @@ -381,7 +383,7 @@ int mca_pml_yalla_recv(void *buf, size_t count, ompi_datatype_t *datatype, int s return OMPI_SUCCESS; } -int mca_pml_yalla_isend_init(void *buf, size_t count, ompi_datatype_t *datatype, +int mca_pml_yalla_isend_init(const void *buf, size_t count, ompi_datatype_t *datatype, int dst, int tag, mca_pml_base_send_mode_t mode, struct ompi_communicator_t* comm, struct ompi_request_t **request) @@ -448,7 +450,7 @@ static int mca_pml_yalla_bsend(mxm_send_req_t *mxm_sreq) return OMPI_SUCCESS; } -int mca_pml_yalla_isend(void *buf, size_t count, ompi_datatype_t *datatype, +int mca_pml_yalla_isend(const void *buf, size_t count, ompi_datatype_t *datatype, int dst, int tag, mca_pml_base_send_mode_t mode, struct ompi_communicator_t* comm, struct ompi_request_t **request) @@ -484,7 +486,7 @@ int mca_pml_yalla_isend(void *buf, size_t count, ompi_datatype_t *datatype, return OMPI_SUCCESS; } -int mca_pml_yalla_send(void *buf, size_t count, ompi_datatype_t *datatype, int dst, +int mca_pml_yalla_send(const void *buf, size_t count, ompi_datatype_t *datatype, int dst, int tag, mca_pml_base_send_mode_t mode, struct ompi_communicator_t* comm) { diff --git a/ompi/mca/pml/yalla/pml_yalla.h b/ompi/mca/pml/yalla/pml_yalla.h index 0284a88f9c..3f29a89a47 100644 --- a/ompi/mca/pml/yalla/pml_yalla.h +++ b/ompi/mca/pml/yalla/pml_yalla.h @@ -1,5 +1,7 @@ /* * Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -95,29 +97,29 @@ int mca_pml_yalla_progress(void); int mca_pml_yalla_add_comm(struct ompi_communicator_t* comm); int mca_pml_yalla_del_comm(struct ompi_communicator_t* comm); -int mca_pml_yalla_irecv_init(void *buf, size_t count, ompi_datatype_t *datatype, +int mca_pml_yalla_irecv_init(const void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag, struct ompi_communicator_t* comm, struct ompi_request_t **request); -int mca_pml_yalla_irecv(void *buf, size_t count, ompi_datatype_t *datatype, +int mca_pml_yalla_irecv(const void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag, struct ompi_communicator_t* comm, struct ompi_request_t **request); -int mca_pml_yalla_recv(void *buf, size_t count, ompi_datatype_t *datatype, int src, +int mca_pml_yalla_recv(const void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag, struct ompi_communicator_t* comm, ompi_status_public_t* status); -int mca_pml_yalla_isend_init(void *buf, size_t count, ompi_datatype_t *datatype, +int mca_pml_yalla_isend_init(const void *buf, size_t count, ompi_datatype_t *datatype, int dst, int tag, mca_pml_base_send_mode_t mode, struct ompi_communicator_t* comm, struct ompi_request_t **request); -int mca_pml_yalla_isend(void *buf, size_t count, ompi_datatype_t *datatype, +int mca_pml_yalla_isend(const void *buf, size_t count, ompi_datatype_t *datatype, int dst, int tag, mca_pml_base_send_mode_t mode, struct ompi_communicator_t* comm, struct ompi_request_t **request); -int mca_pml_yalla_send(void *buf, size_t count, ompi_datatype_t *datatype, int dst, +int mca_pml_yalla_send(const void *buf, size_t count, ompi_datatype_t *datatype, int dst, int tag, mca_pml_base_send_mode_t mode, struct ompi_communicator_t* comm); diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist.h b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist.h index d970fc5a72..d79035572d 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist.h +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist.h @@ -4,6 +4,8 @@ * All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -62,14 +64,14 @@ int mca_vprotocol_pessimist_progress(void); int mca_vprotocol_pessimist_add_comm(struct ompi_communicator_t* comm); int mca_vprotocol_pessimist_del_comm(struct ompi_communicator_t* comm); -int mca_vprotocol_pessimist_irecv(void *addr, +int mca_vprotocol_pessimist_irecv(const void *addr, size_t count, ompi_datatype_t * datatype, int src, int tag, struct ompi_communicator_t *comm, struct ompi_request_t **request ); -int mca_vprotocol_pessimist_recv(void *addr, +int mca_vprotocol_pessimist_recv(const void *addr, size_t count, ompi_datatype_t * datatype, int src, @@ -77,7 +79,7 @@ int mca_vprotocol_pessimist_recv(void *addr, struct ompi_communicator_t *comm, ompi_status_public_t * status ); -int mca_vprotocol_pessimist_isend(void *buf, +int mca_vprotocol_pessimist_isend(const void *buf, size_t count, ompi_datatype_t* datatype, int dst, @@ -85,7 +87,7 @@ int mca_vprotocol_pessimist_isend(void *buf, mca_pml_base_send_mode_t sendmode, ompi_communicator_t* comm, ompi_request_t** request ); -int mca_vprotocol_pessimist_send(void *buf, +int mca_vprotocol_pessimist_send(const void *buf, size_t count, ompi_datatype_t* datatype, int dst, diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_recv.c b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_recv.c index c390de935d..ad65d8dd2e 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_recv.c +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_recv.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2004-2007 The Trustees of the University of Tennessee. * All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -17,7 +19,7 @@ -int mca_vprotocol_pessimist_irecv(void *addr, +int mca_vprotocol_pessimist_irecv(const void *addr, size_t count, ompi_datatype_t * datatype, int src, @@ -43,7 +45,7 @@ int mca_vprotocol_pessimist_irecv(void *addr, -int mca_vprotocol_pessimist_recv(void *addr, +int mca_vprotocol_pessimist_recv(const void *addr, size_t count, ompi_datatype_t * datatype, int src, diff --git a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_send.c b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_send.c index 424e6e4d3f..7fcc7bc59e 100644 --- a/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_send.c +++ b/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_send.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2004-2007 The Trustees of the University of Tennessee. * All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -12,7 +14,7 @@ #include "vprotocol_pessimist.h" #include "vprotocol_pessimist_sender_based.h" -int mca_vprotocol_pessimist_isend(void *buf, +int mca_vprotocol_pessimist_isend(const void *buf, size_t count, ompi_datatype_t* datatype, int dst, @@ -34,7 +36,7 @@ int mca_vprotocol_pessimist_isend(void *buf, return ret; } -int mca_vprotocol_pessimist_send(void *buf, +int mca_vprotocol_pessimist_send(const void *buf, size_t count, ompi_datatype_t* datatype, int dst, diff --git a/ompi/mpi/c/bsend.c b/ompi/mpi/c/bsend.c index ca681f71d8..f6c56021dd 100644 --- a/ompi/mpi/c/bsend.c +++ b/ompi/mpi/c/bsend.c @@ -13,6 +13,8 @@ * Copyright (c) 2006-2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -76,8 +78,7 @@ int MPI_Bsend(const void *buf, int count, MPI_Datatype type, int dest, int tag, } OPAL_CR_ENTER_LIBRARY(); - /* XXX -- CONST -- do not cast away const -- update mca/pml */ - rc = MCA_PML_CALL(send((void *) buf, count, type, dest, tag, MCA_PML_BASE_SEND_BUFFERED, comm)); + rc = MCA_PML_CALL(send(buf, count, type, dest, tag, MCA_PML_BASE_SEND_BUFFERED, comm)); OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/bsend_init.c b/ompi/mpi/c/bsend_init.c index 3fb476afa2..8c3eb9055d 100644 --- a/ompi/mpi/c/bsend_init.c +++ b/ompi/mpi/c/bsend_init.c @@ -13,6 +13,8 @@ * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -90,8 +92,7 @@ int MPI_Bsend_init(const void *buf, int count, MPI_Datatype type, /* * Here, we just initialize the request -- memchecker should set the buffer in MPI_Start. */ - /* XXX -- CONST -- do not cast away const -- update mca/pml */ - rc = MCA_PML_CALL(isend_init((void *) buf, count, type, dest, tag, + rc = MCA_PML_CALL(isend_init(buf, count, type, dest, tag, MCA_PML_BASE_SEND_BUFFERED, comm, request)); OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/ibsend.c b/ompi/mpi/c/ibsend.c index f24dc8256c..f4366d62ae 100644 --- a/ompi/mpi/c/ibsend.c +++ b/ompi/mpi/c/ibsend.c @@ -13,6 +13,8 @@ * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -81,8 +83,7 @@ int MPI_Ibsend(const void *buf, int count, MPI_Datatype type, int dest, MEMCHECKER ( memchecker_call(&opal_memchecker_base_mem_noaccess, buf, count, type); ); - /* XXX -- CONST -- do not cast away const -- update mca/pml */ - rc = MCA_PML_CALL(isend((void *) buf, count, type, dest, tag, MCA_PML_BASE_SEND_BUFFERED, comm, request)); + rc = MCA_PML_CALL(isend(buf, count, type, dest, tag, MCA_PML_BASE_SEND_BUFFERED, comm, request)); OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/irsend.c b/ompi/mpi/c/irsend.c index 06ab28792d..ddea39b843 100644 --- a/ompi/mpi/c/irsend.c +++ b/ompi/mpi/c/irsend.c @@ -13,6 +13,8 @@ * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -83,8 +85,7 @@ int MPI_Irsend(const void *buf, int count, MPI_Datatype type, int dest, MEMCHECKER ( memchecker_call(&opal_memchecker_base_mem_noaccess, buf, count, type); ); - /* XXX -- CONST -- do not cast away const -- update mca/pml */ - rc = MCA_PML_CALL(isend((void *) buf,count,type,dest,tag, + rc = MCA_PML_CALL(isend(buf,count,type,dest,tag, MCA_PML_BASE_SEND_READY,comm,request)); OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/isend.c b/ompi/mpi/c/isend.c index 64a4c41ee8..2b67b3014d 100644 --- a/ompi/mpi/c/isend.c +++ b/ompi/mpi/c/isend.c @@ -13,6 +13,8 @@ * Copyright (c) 2006-2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -84,8 +86,7 @@ int MPI_Isend(const void *buf, int count, MPI_Datatype type, int dest, MEMCHECKER ( memchecker_call(&opal_memchecker_base_mem_noaccess, buf, count, type); ); - /* XXX -- CONST -- do not cast away const -- update mca/pml */ - rc = MCA_PML_CALL(isend((void *) buf, count, type, dest, tag, + rc = MCA_PML_CALL(isend(buf, count, type, dest, tag, MCA_PML_BASE_SEND_STANDARD, comm, request)); OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/issend.c b/ompi/mpi/c/issend.c index 002cc0156f..19f9b08305 100644 --- a/ompi/mpi/c/issend.c +++ b/ompi/mpi/c/issend.c @@ -12,6 +12,8 @@ * All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -81,8 +83,7 @@ int MPI_Issend(const void *buf, int count, MPI_Datatype type, int dest, MEMCHECKER ( memchecker_call(&opal_memchecker_base_mem_noaccess, buf, count, type); ); - /* XXX -- CONST -- do not cast away const -- update mca/pml */ - rc = MCA_PML_CALL(isend((void *) buf, count, type, dest, tag, + rc = MCA_PML_CALL(isend(buf, count, type, dest, tag, MCA_PML_BASE_SEND_SYNCHRONOUS, comm, request)); OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/rsend.c b/ompi/mpi/c/rsend.c index dae3ad9e08..25ba9109b4 100644 --- a/ompi/mpi/c/rsend.c +++ b/ompi/mpi/c/rsend.c @@ -13,6 +13,8 @@ * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -76,8 +78,7 @@ int MPI_Rsend(const void *buf, int count, MPI_Datatype type, int dest, int tag, } OPAL_CR_ENTER_LIBRARY(); - /* XXX -- CONST -- do not cast away const -- update mca/pml */ - rc = MCA_PML_CALL(send((void *) buf, count, type, dest, tag, + rc = MCA_PML_CALL(send(buf, count, type, dest, tag, MCA_PML_BASE_SEND_READY, comm)); OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/rsend_init.c b/ompi/mpi/c/rsend_init.c index 016c48c5fd..7d7e29b006 100644 --- a/ompi/mpi/c/rsend_init.c +++ b/ompi/mpi/c/rsend_init.c @@ -13,6 +13,8 @@ * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -91,8 +93,7 @@ int MPI_Rsend_init(const void *buf, int count, MPI_Datatype type, /* * Here, we just initialize the request -- memchecker should set the buffer in MPI_Start. */ - /* XXX -- CONST -- do not cast away const -- update mca/pml */ - rc = MCA_PML_CALL(isend_init((void *) buf,count,type,dest,tag, + rc = MCA_PML_CALL(isend_init(buf,count,type,dest,tag, MCA_PML_BASE_SEND_READY,comm,request)); OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/send.c b/ompi/mpi/c/send.c index a0cc6d3855..bcf22de8c6 100644 --- a/ompi/mpi/c/send.c +++ b/ompi/mpi/c/send.c @@ -12,6 +12,8 @@ * All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -74,7 +76,6 @@ int MPI_Send(const void *buf, int count, MPI_Datatype type, int dest, } OPAL_CR_ENTER_LIBRARY(); - /* XXX -- CONST -- do not cast away const -- update mca/pml */ - rc = MCA_PML_CALL(send((void *) buf, count, type, dest, tag, MCA_PML_BASE_SEND_STANDARD, comm)); + rc = MCA_PML_CALL(send(buf, count, type, dest, tag, MCA_PML_BASE_SEND_STANDARD, comm)); OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/send_init.c b/ompi/mpi/c/send_init.c index e5c2a68b12..c9ffbaa660 100644 --- a/ompi/mpi/c/send_init.c +++ b/ompi/mpi/c/send_init.c @@ -13,6 +13,8 @@ * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -91,8 +93,7 @@ int MPI_Send_init(const void *buf, int count, MPI_Datatype type, /* * Here, we just initialize the request -- memchecker should set the buffer in MPI_Start. */ - /* XXX -- CONST -- do not cast away const -- update mca/pml */ - rc = MCA_PML_CALL(isend_init((void *) buf,count,type,dest,tag,MCA_PML_BASE_SEND_STANDARD,comm,request)); + rc = MCA_PML_CALL(isend_init(buf,count,type,dest,tag,MCA_PML_BASE_SEND_STANDARD,comm,request)); OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/sendrecv.c b/ompi/mpi/c/sendrecv.c index 3fa5700abd..4ace64e93d 100644 --- a/ompi/mpi/c/sendrecv.c +++ b/ompi/mpi/c/sendrecv.c @@ -12,6 +12,8 @@ * All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -84,8 +86,7 @@ int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, } if (dest != MPI_PROC_NULL) { /* send */ - /* XXX -- CONST -- do not cast away const -- update mca/pml */ - rc = MCA_PML_CALL(send((void *) sendbuf, sendcount, sendtype, dest, + rc = MCA_PML_CALL(send(sendbuf, sendcount, sendtype, dest, sendtag, MCA_PML_BASE_SEND_STANDARD, comm)); OMPI_ERRHANDLER_CHECK(rc, comm, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/ssend.c b/ompi/mpi/c/ssend.c index 0c1fb3d4e0..84dd5d7775 100644 --- a/ompi/mpi/c/ssend.c +++ b/ompi/mpi/c/ssend.c @@ -13,6 +13,8 @@ * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -75,8 +77,7 @@ int MPI_Ssend(const void *buf, int count, MPI_Datatype type, int dest, int tag, } OPAL_CR_ENTER_LIBRARY(); - /* XXX -- CONST -- do not cast away const -- update mca/pml */ - rc = MCA_PML_CALL(send((void *) buf, count, type, dest, tag, + rc = MCA_PML_CALL(send(buf, count, type, dest, tag, MCA_PML_BASE_SEND_SYNCHRONOUS, comm)); OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/ssend_init.c b/ompi/mpi/c/ssend_init.c index e3548e0af4..9405f1a391 100644 --- a/ompi/mpi/c/ssend_init.c +++ b/ompi/mpi/c/ssend_init.c @@ -13,6 +13,8 @@ * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -91,8 +93,7 @@ int MPI_Ssend_init(const void *buf, int count, MPI_Datatype type, /* * Here, we just initialize the request -- memchecker should set the buffer in MPI_Start. */ - /* XXX -- CONST -- do not cast away const -- update mca/pml */ - rc = MCA_PML_CALL(isend_init((void *) buf, count, type, dest, tag, + rc = MCA_PML_CALL(isend_init(buf, count, type, dest, tag, MCA_PML_BASE_SEND_SYNCHRONOUS, comm, request)); OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME); } diff --git a/opal/mca/allocator/allocator.h b/opal/mca/allocator/allocator.h index 7447edc206..5e31ca9176 100644 --- a/opal/mca/allocator/allocator.h +++ b/opal/mca/allocator/allocator.h @@ -12,6 +12,8 @@ * All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -55,7 +57,7 @@ typedef void* (*mca_allocator_base_module_realloc_fn_t)( * Free function typedef */ typedef void(*mca_allocator_base_module_free_fn_t)( - struct mca_allocator_base_module_t*, void *); + struct mca_allocator_base_module_t*, const void *); /** diff --git a/opal/mca/allocator/basic/allocator_basic.c b/opal/mca/allocator/basic/allocator_basic.c index b988db1ddc..ace456c46d 100644 --- a/opal/mca/allocator/basic/allocator_basic.c +++ b/opal/mca/allocator/basic/allocator_basic.c @@ -15,6 +15,8 @@ * Copyright (c) 2011 NVIDIA Corporation. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -267,7 +269,7 @@ void * mca_allocator_basic_realloc( */ void mca_allocator_basic_free( mca_allocator_base_module_t * base, - void * ptr) + const void * ptr) { mca_allocator_basic_module_t* module = (mca_allocator_basic_module_t*)base; mca_allocator_basic_segment_t* seg; diff --git a/opal/mca/allocator/basic/allocator_basic.h b/opal/mca/allocator/basic/allocator_basic.h index 0ae23a0c26..5f5c9daae9 100644 --- a/opal/mca/allocator/basic/allocator_basic.h +++ b/opal/mca/allocator/basic/allocator_basic.h @@ -12,6 +12,8 @@ * All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -129,7 +131,7 @@ mca_allocator_base_module_t* mca_allocator_basic_component_init( */ void mca_allocator_basic_free( mca_allocator_base_module_t * mem, - void * ptr); + const void * ptr); /** * Frees all the memory from all the basics back to the system. Note that diff --git a/opal/mca/allocator/bucket/allocator_bucket_alloc.c b/opal/mca/allocator/bucket/allocator_bucket_alloc.c index e5dc81eeb4..26f2e88a97 100644 --- a/opal/mca/allocator/bucket/allocator_bucket_alloc.c +++ b/opal/mca/allocator/bucket/allocator_bucket_alloc.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2007 IBM Corp., All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -278,7 +280,7 @@ void * mca_allocator_bucket_realloc( * Frees the passed region of memory * */ -void mca_allocator_bucket_free(mca_allocator_base_module_t * mem, void * ptr) +void mca_allocator_bucket_free(mca_allocator_base_module_t * mem, const void * ptr) { mca_allocator_bucket_t * mem_options = (mca_allocator_bucket_t *) mem; mca_allocator_bucket_chunk_header_t * chunk = (mca_allocator_bucket_chunk_header_t *) ptr - 1; diff --git a/opal/mca/allocator/bucket/allocator_bucket_alloc.h b/opal/mca/allocator/bucket/allocator_bucket_alloc.h index f2af13a122..c00614a983 100644 --- a/opal/mca/allocator/bucket/allocator_bucket_alloc.h +++ b/opal/mca/allocator/bucket/allocator_bucket_alloc.h @@ -9,6 +9,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -186,7 +188,7 @@ typedef struct mca_allocator_bucket_t mca_allocator_bucket_t; * */ void mca_allocator_bucket_free(mca_allocator_base_module_t * mem, - void * ptr); + const void * ptr); /** * Frees all the memory from all the buckets back to the system. Note that