commits
Threads by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
December 2013
- 1 participants
- 47 discussions
[mpich] MPICH primary repository branch, master, updated. v3.1rc2-126-g8c5ab38
by noreply@mpich.org 31 Dec '13
by noreply@mpich.org 31 Dec '13
31 Dec '13
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 8c5ab38319b3ac34ed4e7a37a265b4a166baaf33 (commit)
from a1882012d3c977b44a17e6fa887ea662f4f2a2c2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/8c5ab38319b3ac34ed4e7a37a265b4a16…
commit 8c5ab38319b3ac34ed4e7a37a265b4a166baaf33
Author: Haizhu Liu <haizhu(a)us.ibm.com>
Date: Thu Dec 19 16:38:50 2013 -0500
PAMID support of rma atomic functions
(ibm) F189037
Signed-off-by: Michael Blocksome <blocksom(a)us.ibm.com>
diff --git a/src/mpid/pamid/include/mpidi_datatypes.h b/src/mpid/pamid/include/mpidi_datatypes.h
index 2b7ae56..203961e 100644
--- a/src/mpid/pamid/include/mpidi_datatypes.h
+++ b/src/mpid/pamid/include/mpidi_datatypes.h
@@ -31,7 +31,6 @@
#ifdef MPIDI_STATISTICS
#include <pami_ext_pe.h>
#endif
-
#include "mpidi_constants.h"
#include "mpidi_platform.h"
#include "pami.h"
@@ -164,6 +163,8 @@ enum
MPIDI_Protocols_Dyntask,
MPIDI_Protocols_Dyntask_disconnect,
#endif
+ MPIDI_Protocols_WinAtomic,
+ MPIDI_Protocols_WinAtomicAck,
MPIDI_Protocols_COUNT,
};
@@ -375,24 +376,12 @@ struct MPID_Win;
/** \brief Forward declaration of the MPID_Group structure */
struct MPID_Group;
-
-/**
- * \brief Collective information related to a window
- *
- * This structure is used to share information about a local window with
- * all nodes in the window communicator. Part of that information includes
- * statistics about RMA operations during access/exposure epochs.
- *
- * The structure is allocated as an array sized for the window communicator.
- * Each entry in the array corresponds directly to the node of the same rank.
- */
typedef enum
{
MPIDI_REQUEST_LOCK,
MPIDI_REQUEST_LOCKALL,
} MPIDI_LOCK_TYPE_t;
-
struct MPIDI_Win_lock
{
struct MPIDI_Win_lock *next;
@@ -437,6 +426,17 @@ typedef struct workQ_t {
int count;
} workQ_t;
+
+/**
+ * \brief Collective information related to a window
+ *
+ * This structure is used to share information about a local window with
+ * all nodes in the window communicator. Part of that information includes
+ * statistics about RMA operations during access/exposure epochs.
+ *
+ * The structure is allocated as an array sized for the window communicator.
+ * Each entry in the array corresponds directly to the node of the same rank.
+ */
typedef struct MPIDI_Win_info
{
void * base_addr; /**< Node's exposure window base address */
@@ -450,10 +450,10 @@ typedef struct MPIDI_Win_info
*/
struct MPIDI_Win
{
- struct MPIDI_Win_info * info; /**< allocated array of collective info */
+ struct MPIDI_Win_info *info; /**< allocated array of collective info */
MPIDI_Win_info_args info_args;
void ** shm_base_addrs; /* base address shared by all process in comm */
- workQ_t work;
+ workQ_t work;
RMA_nOps_t *origin;
struct MPIDI_Win_sync
{
@@ -490,7 +490,6 @@ struct MPIDI_Win
} local;
} lock;
} sync;
-
int request_based; /* flag for request based rma */
struct MPID_Request *rreq; /* anchor of MPID_Request for request based rma */
};
diff --git a/src/mpid/pamid/include/mpidi_prototypes.h b/src/mpid/pamid/include/mpidi_prototypes.h
index dfdd1b8..d833637 100644
--- a/src/mpid/pamid/include/mpidi_prototypes.h
+++ b/src/mpid/pamid/include/mpidi_prototypes.h
@@ -203,6 +203,25 @@ MPIDI_WinControlCB(pami_context_t context,
size_t sndlen,
pami_endpoint_t sender,
pami_recv_t * recv);
+void
+MPIDI_WinAtomicCB(pami_context_t context,
+ void * cookie,
+ const void * _control,
+ size_t size,
+ const void * sndbuf,
+ size_t sndlen,
+ pami_endpoint_t sender,
+ pami_recv_t * recv);
+void
+MPIDI_WinAtomicAckCB(pami_context_t context,
+ void * cookie,
+ const void * _control,
+ size_t size,
+ const void * sndbuf,
+ size_t sndlen,
+ pami_endpoint_t sender,
+ pami_recv_t * recv);
+
void
MPIDI_WinGetAccumCB(pami_context_t context,
diff --git a/src/mpid/pamid/src/misc/mpid_unimpl.c b/src/mpid/pamid/src/misc/mpid_unimpl.c
index 6c6dea4..44bda50 100644
--- a/src/mpid/pamid/src/misc/mpid_unimpl.c
+++ b/src/mpid/pamid/src/misc/mpid_unimpl.c
@@ -91,7 +91,6 @@ int MPID_Comm_group_failed(MPID_Comm *comm_ptr, MPID_Group **failed_group_ptr)
return 0;
}
-
int MPID_Win_allocate_shared(MPI_Aint size, int disp_unit, MPID_Info *info_ptr, MPID_Comm *comm_ptr,
void **base_ptr, MPID_Win **win_ptr)
{
@@ -99,29 +98,9 @@ int MPID_Win_allocate_shared(MPI_Aint size, int disp_unit, MPID_Info *info_ptr,
return 0;
}
-
-int MPID_Compare_and_swap(const void *origin_addr, const void *compare_addr,
- void *result_addr, MPI_Datatype datatype, int target_rank,
- MPI_Aint target_disp, MPID_Win *win)
-{
- MPID_abort();
- return 0;
-}
-
-
-int MPID_Fetch_and_op(const void *origin_addr, void *result_addr,
- MPI_Datatype datatype, int target_rank, MPI_Aint target_disp,
- MPI_Op op, MPID_Win *win)
-{
- MPID_abort();
- return 0;
-}
-
int MPID_Win_shared_query(MPID_Win *win, int rank, MPI_Aint *size, int *disp_unit,
void *baseptr)
{
MPID_abort();
return 0;
}
-
-
diff --git a/src/mpid/pamid/src/mpid_init.c b/src/mpid/pamid/src/mpid_init.c
index 5809ec1..3938b67 100644
--- a/src/mpid/pamid/src/mpid_init.c
+++ b/src/mpid/pamid/src/mpid_init.c
@@ -153,6 +153,8 @@ static struct
struct protocol_t RVZ_zerobyte;
struct protocol_t WinGetAccum;
struct protocol_t WinGetAccumAck;
+ struct protocol_t WinAtomic;
+ struct protocol_t WinAtomicAck;
#ifdef DYNAMIC_TASKING
struct protocol_t Dyntask;
struct protocol_t Dyntask_disconnect;
@@ -274,6 +276,28 @@ static struct
},
.immediate_min = sizeof(MPIDI_Win_GetAccMsgInfo),
},
+ .WinAtomic = {
+ .func = MPIDI_WinAtomicCB,
+ .dispatch = MPIDI_Protocols_WinAtomic,
+ .options = {
+ .consistency = USE_PAMI_CONSISTENCY,
+ .long_header = PAMI_HINT_DISABLE,
+ .recv_immediate = PAMI_HINT_ENABLE,
+ .use_rdma = PAMI_HINT_DISABLE,
+ },
+ .immediate_min = sizeof(MPIDI_AtomicHeader_t),
+ },
+ .WinAtomicAck = {
+ .func = MPIDI_WinAtomicAckCB,
+ .dispatch = MPIDI_Protocols_WinAtomicAck,
+ .options = {
+ .consistency = USE_PAMI_CONSISTENCY,
+ .long_header = PAMI_HINT_DISABLE,
+ .recv_immediate = PAMI_HINT_ENABLE,
+ .use_rdma = PAMI_HINT_DISABLE,
+ },
+ .immediate_min = sizeof(MPIDI_AtomicHeader_t),
+ },
#ifdef DYNAMIC_TASKING
.Dyntask = {
.func = MPIDI_Recvfrom_remote_world,
@@ -826,6 +850,9 @@ MPIDI_PAMI_dispath_init()
MPIDI_PAMI_dispath_set(MPIDI_Protocols_RVZ_zerobyte, &proto_list.RVZ_zerobyte, NULL);
MPIDI_PAMI_dispath_set(MPIDI_Protocols_WinGetAccum, &proto_list.WinGetAccum, NULL);
MPIDI_PAMI_dispath_set(MPIDI_Protocols_WinGetAccumAck, &proto_list.WinGetAccumAck, NULL);
+ MPIDI_PAMI_dispath_set(MPIDI_Protocols_WinAtomic, &proto_list.WinAtomic, NULL);
+ MPIDI_PAMI_dispath_set(MPIDI_Protocols_WinAtomicAck, &proto_list.WinAtomicAck, NULL);
+
#ifdef DYNAMIC_TASKING
MPIDI_PAMI_dispath_set(MPIDI_Protocols_Dyntask, &proto_list.Dyntask, NULL);
MPIDI_PAMI_dispath_set(MPIDI_Protocols_Dyntask_disconnect, &proto_list.Dyntask_disconnect, NULL);
diff --git a/src/mpid/pamid/src/mpid_progress.h b/src/mpid/pamid/src/mpid_progress.h
index 61418a4..268cf50 100644
--- a/src/mpid/pamid/src/mpid_progress.h
+++ b/src/mpid/pamid/src/mpid_progress.h
@@ -170,6 +170,29 @@ typedef enum
/**
+ * \brief A macro to easily implement advancing until a specific
+ * condition becomes false.
+ *
+ * \param[in] COND This is not a true parameter. It is *specifically*
+ * designed to be evaluated several times, allowing for the result to
+ * change. The condition would generally look something like
+ * "(cb.client == 0)". This would be used as the condition on a while
+ * loop.
+ *
+ * \returns MPI_SUCCESS
+ *
+ * This macro makes one pami advance regardless of the state of the COND.
+ */
+#define MPID_PROGRESS_WAIT_DO_WHILE(COND) \
+({ \
+ do { \
+ MPID_Progress_wait(&__state); \
+ } while(COND); \
+ MPI_SUCCESS; \
+})
+
+
+/**
* \brief Unused, provided since MPI calls it.
* \param[in] state The previously seen state of advance
*/
diff --git a/src/mpid/pamid/src/onesided/Makefile.mk b/src/mpid/pamid/src/onesided/Makefile.mk
index 3497b71..cb526db 100644
--- a/src/mpid/pamid/src/onesided/Makefile.mk
+++ b/src/mpid/pamid/src/onesided/Makefile.mk
@@ -28,7 +28,6 @@ noinst_HEADERS += \
lib_lib@MPILIBNAME@_la_SOURCES += \
src/mpid/pamid/src/onesided/mpid_1s.c \
src/mpid/pamid/src/onesided/mpid_win_accumulate.c \
- src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c \
src/mpid/pamid/src/onesided/mpid_win_create.c \
src/mpid/pamid/src/onesided/mpid_win_fence.c \
src/mpid/pamid/src/onesided/mpid_win_free.c \
@@ -37,16 +36,19 @@ lib_lib@MPILIBNAME@_la_SOURCES += \
src/mpid/pamid/src/onesided/mpid_win_lock_all.c \
src/mpid/pamid/src/onesided/mpid_win_pscw.c \
src/mpid/pamid/src/onesided/mpid_win_put.c \
- src/mpid/pamid/src/onesided/mpid_win_allocate.c \
src/mpid/pamid/src/onesided/mpid_win_create_dynamic.c \
src/mpid/pamid/src/onesided/mpid_win_flush.c \
+ src/mpid/pamid/src/onesided/mpid_win_allocate.c \
+ src/mpid/pamid/src/onesided/mpid_win_sync.c \
src/mpid/pamid/src/onesided/mpid_win_attach.c \
src/mpid/pamid/src/onesided/mpid_win_detach.c \
- src/mpid/pamid/src/onesided/mpid_win_sync.c \
src/mpid/pamid/src/onesided/mpid_win_get_info.c \
src/mpid/pamid/src/onesided/mpid_win_set_info.c \
+ src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c \
src/mpid/pamid/src/onesided/mpid_win_reqops.c \
- src/mpid/pamid/src/onesided/mpidi_win_control.c
+ src/mpid/pamid/src/onesided/mpidi_win_control.c \
+ src/mpid/pamid/src/onesided/mpid_win_compare_and_swap.c \
+ src/mpid/pamid/src/onesided/mpid_win_fetch_and_op.c
endif BUILD_PAMID
diff --git a/src/mpid/pamid/src/onesided/mpid_1s.c b/src/mpid/pamid/src/onesided/mpid_1s.c
index 7398174..618f01f 100644
--- a/src/mpid/pamid/src/onesided/mpid_1s.c
+++ b/src/mpid/pamid/src/onesided/mpid_1s.c
@@ -53,12 +53,12 @@ MPIDI_Win_DoneCB(pami_context_t context,
}
}
- if (req->origin.completed == req->target.dt.num_contig)
+
+ if (req->origin.completed == req->target.dt.num_contig)
{
req->win->mpid.origin[target_rank].nCompleted++;
- if(req->req_handle) {
+ if(req->req_handle)
MPID_cc_set(req->req_handle->cc_ptr, 0);
- }
if (req->buffer_free) {
MPIU_Free(req->buffer);
@@ -66,11 +66,13 @@ MPIDI_Win_DoneCB(pami_context_t context,
req->buffer_free = 0;
}
if (req->accum_headers)
- MPIU_Free(req->accum_headers);
-
- if( (req->type != MPIDI_WIN_REQUEST_RPUT) && (req->type != MPIDI_WIN_REQUEST_RGET) && (req->type != MPIDI_WIN_REQUEST_RACCUMULATE) && (req->type != MPIDI_WIN_REQUEST_RGET_ACCUMULATE) )
- MPIU_Free(req);
+ MPIU_Free(req->accum_headers);
+ if (!((req->type > MPIDI_WIN_REQUEST_GET_ACCUMULATE) && (req->type <=MPIDI_WIN_REQUEST_RGET_ACCUMULATE)))
+ MPIU_Free(req);
}
+
+ if ( (req->origin.completed == req->origin.dt.num_contig) && ( (req->type == MPIDI_WIN_REQUEST_FETCH_AND_OP) || (req->type == MPIDI_WIN_REQUEST_COMPARE_AND_SWAP) ) )
+ MPIU_Free(req);
MPIDI_Progress_signal();
}
diff --git a/src/mpid/pamid/src/onesided/mpid_win_accumulate.c b/src/mpid/pamid/src/onesided/mpid_win_accumulate.c
index 4f70997..d6c3224 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_accumulate.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_accumulate.c
@@ -171,7 +171,6 @@ MPID_Accumulate(void *origin_addr,
{
int mpi_errno = MPI_SUCCESS;
MPIDI_Win_request *req = MPIU_Calloc0(1, MPIDI_Win_request);
- *req = zero_req;
req->win = win;
if(win->mpid.request_based != 1)
req->type = MPIDI_WIN_REQUEST_ACCUMULATE;
@@ -252,7 +251,7 @@ MPID_Accumulate(void *origin_addr,
MPIU_Free(req);
return MPI_SUCCESS;
}
- win->mpid.origin[target_rank].nStarted++;
+ win->mpid.origin[target_rank].nStarted++;
req->target.rank = target_rank;
diff --git a/src/mpid/pamid/src/onesided/mpid_win_compare_and_swap.c b/src/mpid/pamid/src/onesided/mpid_win_compare_and_swap.c
new file mode 100644
index 0000000..8022bc7
--- /dev/null
+++ b/src/mpid/pamid/src/onesided/mpid_win_compare_and_swap.c
@@ -0,0 +1,197 @@
+/* begin_generated_IBM_copyright_prolog */
+/* */
+/* This is an automatically generated copyright prolog. */
+/* After initializing, DO NOT MODIFY OR MOVE */
+/* --------------------------------------------------------------- */
+/* Licensed Materials - Property of IBM */
+/* Blue Gene/Q 5765-PER 5765-PRP */
+/* */
+/* (C) Copyright IBM Corp. 2011, 2012 All Rights Reserved */
+/* US Government Users Restricted Rights - */
+/* Use, duplication, or disclosure restricted */
+/* by GSA ADP Schedule Contract with IBM Corp. */
+/* */
+/* --------------------------------------------------------------- */
+/* */
+/* end_generated_IBM_copyright_prolog */
+/* (C)Copyright IBM Corp. 2007, 2011 */
+/**
+ * \file src/onesided/mpid_win_compare_and_swap.c
+ * \brief ???
+ */
+#include "mpidi_onesided.h"
+
+extern pami_result_t
+MPIDI_Atomic (pami_context_t context,
+ void * _req);
+
+static pami_result_t
+MPIDI_Compare_and_swap_using_pami_rmw(pami_context_t context,
+ void * _req)
+{
+ MPIDI_Win_request *req = (MPIDI_Win_request*)_req;
+ pami_result_t rc;
+ void *map;
+ MPID_Win *win;
+ int target_rank;
+
+ MPID_assert(req != NULL);
+ win = req->win;
+ target_rank = req->target.rank;
+
+ pami_rmw_t params;
+ params=zero_rmw_parms;
+ params.dest=req->dest;
+ params.cookie=(void *)req;
+ params.done_fn=MPIDI_Win_DoneCB;
+ params.type = req->pami_datatype;
+ params.operation = PAMI_ATOMIC_FETCH_COMPARE_SET;
+ params.local=req->user_buffer; /*result*/
+ params.remote=req->win->mpid.info[target_rank].base_addr + req->offset + (size_t)req->origin.dt.map[0].DLOOP_VECTOR_BUF;
+ params.value=req->buffer; /* replaced value with origin */
+ params.test=req->compare_buffer;
+
+ rc = PAMI_Rmw(context, ¶ms);
+ MPID_assert(rc == PAMI_SUCCESS);
+ return rc;
+}
+
+#undef FUNCNAME
+#define FUNCNAME MPIDI_Compare_and_swap
+#undef FCNAME
+#define FCNAME MPIDI_QUOTE(FUNCNAME)
+int MPID_Compare_and_swap(const void *origin_addr, const void *compare_addr,
+ void *result_addr, MPI_Datatype datatype, int target_rank,
+ MPI_Aint target_disp, MPID_Win *win)
+{
+ int mpi_errno = MPI_SUCCESS;
+ MPIDI_Win_request *req;
+ int good_for_rmw=0;
+ pami_type_t pami_type;
+ int shm_locked=0;
+
+ if(win->mpid.sync.origin_epoch_type == win->mpid.sync.target_epoch_type &&
+ win->mpid.sync.origin_epoch_type == MPID_EPOTYPE_REFENCE){
+ win->mpid.sync.origin_epoch_type = MPID_EPOTYPE_FENCE;
+ win->mpid.sync.target_epoch_type = MPID_EPOTYPE_FENCE;
+ }
+
+ if(win->mpid.sync.origin_epoch_type == MPID_EPOTYPE_NONE ||
+ win->mpid.sync.origin_epoch_type == MPID_EPOTYPE_POST){
+ MPIU_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC,
+ return mpi_errno, "**rmasync");
+ }
+
+ if (target_rank == MPI_PROC_NULL)
+ {
+ return MPI_SUCCESS;
+ }
+ /* Check if datatype is a C integer, Fortran Integer,
+ logical, or byte, per the classes given on page 165. */
+ MPIR_ERRTEST_TYPE_RMA_ATOMIC(datatype, "datatype", mpi_errno);
+
+ req = (MPIDI_Win_request *) MPIU_Calloc0(1, MPIDI_Win_request);
+ req->win = win;
+ req->type = MPIDI_WIN_REQUEST_COMPARE_AND_SWAP;
+
+ req->offset = target_disp * win->mpid.info[target_rank].disp_unit;
+
+ MPIDI_Win_datatype_basic(1, datatype, &req->origin.dt);
+
+ if (req->origin.dt.size == 0)
+ {
+ MPIU_Free(req);
+ return MPI_SUCCESS;
+ }
+
+ req->target.rank = target_rank;
+
+ if (target_rank == win->comm_ptr->rank || win->create_flavor == MPI_WIN_FLAVOR_SHARED)
+ {
+ void *base, *dest_addr;
+ int disp_unit;
+ int len;
+
+#ifdef PENDING_SHM_WIN
+ if (win->create_flavor == MPI_WIN_FLAVOR_SHARED) {
+ MPIDI_SHM_MUTEX_LOCK(win);
+ shm_locked = 1;
+
+ base = win->mpid.info[target_rank].base_addr;
+ disp_unit = win->disp_unit;
+ }
+ else {
+#endif
+ base = win->base;
+ disp_unit = win->disp_unit;
+#ifdef PENDING_SHM_WIN
+ }
+#endif
+
+ dest_addr = (char *) base + disp_unit * target_disp;
+
+ MPID_Datatype_get_size_macro(datatype, len);
+ MPIU_Memcpy(result_addr, dest_addr, len);
+
+ if (MPIR_Compare_equal(compare_addr, dest_addr, datatype))
+ MPIU_Memcpy(dest_addr, origin_addr, len);
+
+#ifdef PENDING_SHM_WIN
+ if (shm_locked) {
+ MPIDI_SHM_MUTEX_UNLOCK(win);
+ shm_locked = 0;
+ }
+#endif
+ MPIU_Free(req);
+ }
+ else {
+ req->buffer = origin_addr + req->origin.dt.true_lb;
+ req->user_buffer = result_addr + req->origin.dt.true_lb;
+ req->compare_buffer = compare_addr + req->origin.dt.true_lb;
+
+ pami_result_t rc;
+ pami_task_t task = MPID_VCR_GET_LPID(win->comm_ptr->vcr, target_rank);
+ if (win->mpid.sync.origin_epoch_type == MPID_EPOTYPE_START &&
+ !MPIDI_valid_group_rank(task, win->mpid.sync.sc.group))
+ {
+ MPIU_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC,
+ return mpi_errno, "**rmasync");
+ }
+
+ rc = PAMI_Endpoint_create(MPIDI_Client, task, 0, &req->dest);
+ MPID_assert(rc == PAMI_SUCCESS);
+
+ MPIDI_Win_datatype_map(&req->origin.dt);
+ win->mpid.sync.total += 1;
+
+ MPI_Datatype basic_type = MPI_DATATYPE_NULL;
+ MPID_Datatype_get_basic_type(datatype, basic_type);
+ MPID_assert(basic_type != MPI_DATATYPE_NULL);
+ req->origin.datatype=basic_type;
+
+ /* The pamid one-sided design requires context post in order to handle the
+ * case where the number of pending rma operation exceeds the
+ * 'PAMID_RMA_PENDING' threshold. When there are too many pending requests the
+ * work function remains on the context post queue (by returning PAMI_EAGAIN)
+ * so that the next time the context is advanced the work function will be
+ * invoked again.
+ *
+ * TODO - When context post is not required it would be better to attempt a
+ * direct context operation and then fail over to using context post if
+ * the rma pending threshold has been reached. This would result in
+ * better latency for one-sided operations.
+ */
+
+ MPI_Op null_op=0;
+ pami_data_function pami_op;
+ if(MPIDI_Datatype_is_pami_rmw_supported(basic_type, &pami_type, null_op, &pami_op) ) {
+ req->pami_datatype = pami_type;
+ PAMI_Context_post(MPIDI_Context[0], &req->post_request, MPIDI_Compare_and_swap_using_pami_rmw, req);
+ } else {
+ PAMI_Context_post(MPIDI_Context[0], &req->post_request, MPIDI_Atomic, req);
+ }
+ }
+
+fn_fail:
+ return mpi_errno;
+}
diff --git a/src/mpid/pamid/src/onesided/mpid_win_fetch_and_op.c b/src/mpid/pamid/src/onesided/mpid_win_fetch_and_op.c
new file mode 100644
index 0000000..153ef88
--- /dev/null
+++ b/src/mpid/pamid/src/onesided/mpid_win_fetch_and_op.c
@@ -0,0 +1,420 @@
+/* begin_generated_IBM_copyright_prolog */
+/* */
+/* This is an automatically generated copyright prolog. */
+/* After initializing, DO NOT MODIFY OR MOVE */
+/* --------------------------------------------------------------- */
+/* Licensed Materials - Property of IBM */
+/* Blue Gene/Q 5765-PER 5765-PRP */
+/* */
+/* (C) Copyright IBM Corp. 2011, 2012 All Rights Reserved */
+/* US Government Users Restricted Rights - */
+/* Use, duplication, or disclosure restricted */
+/* by GSA ADP Schedule Contract with IBM Corp. */
+/* */
+/* --------------------------------------------------------------- */
+/* */
+/* end_generated_IBM_copyright_prolog */
+/* (C)Copyright IBM Corp. 2007, 2011 */
+/**
+ * \file src/onesided/mpid_win_fetch_and_op.c.c
+ * \brief ???
+ */
+#include "mpidi_onesided.h"
+
+static pami_result_t
+MPIDI_Fetch_and_op_using_pami_rmw(pami_context_t context,
+ void * _req)
+{
+ MPIDI_Win_request *req = (MPIDI_Win_request*)_req;
+ pami_result_t rc;
+ MPID_Win *win;
+ int target_rank;
+
+ MPID_assert(req != NULL);
+ win = req->win;
+ target_rank = req->target.rank;
+
+ pami_rmw_t params;
+ params=zero_rmw_parms;
+ params.dest=req->dest;
+ params.cookie=(void *)req;
+ params.done_fn=MPIDI_Win_DoneCB;
+ params.type = req->pami_datatype;
+ params.operation = req->pami_op;
+ params.local=req->user_buffer; /*result*/
+ params.remote=req->win->mpid.info[target_rank].base_addr + req->offset + (size_t)req->origin.dt.map[0].DLOOP_VECTOR_BUF;
+ params.value=req->buffer; /* replaced value with origin */
+
+ rc = PAMI_Rmw(context, ¶ms);
+ MPID_assert(rc == PAMI_SUCCESS);
+ return rc;
+}
+
+
+void
+MPIDI_WinAtomicCB(pami_context_t context,
+ void * cookie,
+ const void * _hdr,
+ size_t size,
+ const void * sndbuf,
+ size_t sndlen,
+ pami_endpoint_t sender,
+ pami_recv_t * recv)
+{
+ MPIDI_AtomicHeader_t *ahdr = (MPIDI_AtomicHeader_t *) _hdr;
+ MPID_assert (ahdr != NULL);
+ MPID_assert (sizeof(MPIDI_AtomicHeader_t) == size);
+ MPIDI_AtomicHeader_t ack_hdr = *ahdr;
+
+ void *dest_addr = ahdr->remote_addr;
+ int len;
+ len = MPID_Datatype_get_basic_size (ahdr->datatype);
+
+ if (ahdr->atomic_type == MPIDI_WIN_REQUEST_COMPARE_AND_SWAP) {
+
+ //overwrite value with result in ack_hdr
+ MPIU_Memcpy(ack_hdr.buf, dest_addr, len);
+
+ if (MPIR_Compare_equal (&ahdr->test, dest_addr, ahdr->datatype))
+ MPIU_Memcpy(dest_addr, ahdr->buf, len);
+ }
+ else if (ahdr->atomic_type == MPIDI_WIN_REQUEST_FETCH_AND_OP) {
+ //overwrite value with result
+ MPIU_Memcpy(ack_hdr.buf, dest_addr, len);
+
+ MPI_User_function *uop;
+ int one = 1;
+ uop = MPIR_OP_HDL_TO_FN(ahdr->op);
+
+ if (ahdr->op == MPI_REPLACE)
+ MPIU_Memcpy(dest_addr, ahdr->buf, len);
+ else if (ahdr->op == MPI_NO_OP);
+ else
+ (*uop) ((void *)ahdr->buf, dest_addr, &one, &ahdr->datatype);
+ }
+ else
+ MPID_abort();
+
+ pami_send_immediate_t params = {
+ .dispatch = MPIDI_Protocols_WinAtomicAck,
+ .dest = sender,
+ .header = {
+ .iov_base = &ack_hdr,
+ .iov_len = sizeof(MPIDI_AtomicHeader_t),
+ },
+ .data = {
+ .iov_base = NULL,
+ .iov_len = 0,
+ },
+ .hints = 0,
+ };
+
+ pami_result_t rc = PAMI_Send_immediate(context, ¶ms);
+ MPID_assert(rc == PAMI_SUCCESS);
+}
+
+void
+MPIDI_WinAtomicAckCB(pami_context_t context,
+ void * cookie,
+ const void * _hdr,
+ size_t size,
+ const void * sndbuf,
+ size_t sndlen,
+ pami_endpoint_t sender,
+ pami_recv_t * recv)
+{
+ int len;
+ MPIDI_AtomicHeader_t *ahdr = (MPIDI_AtomicHeader_t *) _hdr;
+ //We have a valid result addr
+ if (ahdr->result_addr != NULL) {
+ len = MPID_Datatype_get_basic_size (ahdr->datatype);
+ MPIU_Memcpy(ahdr->result_addr, ahdr->buf, len);
+ }
+
+ MPIDI_Win_DoneCB(context, ahdr->request_addr, PAMI_SUCCESS);
+}
+
+
+pami_result_t
+MPIDI_Atomic (pami_context_t context,
+ void * _req)
+{
+ MPIDI_Win_request *req = (MPIDI_Win_request*)_req;
+ pami_result_t rc;
+ MPIDI_AtomicHeader_t atomic_hdr;
+ int len;
+
+ len = MPID_Datatype_get_basic_size (req->origin.datatype);
+ assert(len <= MAX_ATOMIC_TYPE_SIZE);
+ if (req->buffer)
+ MPIU_Memcpy(atomic_hdr.buf, req->buffer, len);
+ if (req->type == MPIDI_WIN_REQUEST_COMPARE_AND_SWAP)
+ MPIU_Memcpy(atomic_hdr.test, req->compare_buffer, len);
+
+ atomic_hdr.result_addr = req->user_buffer;
+ atomic_hdr.remote_addr = req->win->mpid.info[req->target.rank].base_addr + req->offset;
+ atomic_hdr.request_addr = req;
+ atomic_hdr.datatype = req->origin.datatype;
+ atomic_hdr.atomic_type = req->type;
+ atomic_hdr.op = req->op;
+
+ struct MPIDI_Win_sync* sync = &req->win->mpid.sync;
+ MPID_assert (req->origin.dt.num_contig == 1);
+ ++sync->started;
+
+ pami_send_immediate_t params = {
+ .dispatch = MPIDI_Protocols_WinAtomic,
+ .dest = req->dest,
+ .header = {
+ .iov_base = &atomic_hdr,
+ .iov_len = sizeof(MPIDI_AtomicHeader_t),
+ },
+ .data = {
+ .iov_base = NULL,
+ .iov_len = 0,
+ },
+ .hints = 0,
+ };
+
+ rc = PAMI_Send_immediate(context, ¶ms);
+ MPID_assert(rc == PAMI_SUCCESS);
+ return PAMI_SUCCESS;
+}
+
+
+#define FUNCNAME MPIDI_Fetch_and_op
+#undef FCNAME
+#define FCNAME MPIDI_QUOTE(FUNCNAME)
+int MPID_Fetch_and_op(const void *origin_addr, void *result_addr,
+ MPI_Datatype datatype, int target_rank,
+ MPI_Aint target_disp, MPI_Op op, MPID_Win *win)
+{
+ int mpi_errno = MPI_SUCCESS;
+ MPIDI_Win_request *req;
+ int datatype_iscontig=0;
+ int good_for_rmw=0;
+ int count = 1;
+ int shm_locked = 0;
+
+ if(win->mpid.sync.origin_epoch_type == win->mpid.sync.target_epoch_type &&
+ win->mpid.sync.origin_epoch_type == MPID_EPOTYPE_REFENCE){
+ win->mpid.sync.origin_epoch_type = MPID_EPOTYPE_FENCE; win->mpid.sync.target_epoch_type = MPID_EPOTYPE_FENCE;
+ }
+
+ if(win->mpid.sync.origin_epoch_type == MPID_EPOTYPE_NONE ||
+ win->mpid.sync.origin_epoch_type == MPID_EPOTYPE_POST){
+ MPIU_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC,
+ return mpi_errno, "**rmasync");
+ }
+
+ int null=0;
+ MPI_Op null_op=0;
+ pami_type_t pami_type;
+ pami_atomic_t pami_op;
+
+ if (target_rank == MPI_PROC_NULL)
+ return MPI_SUCCESS;
+
+ MPI_Datatype basic_type = MPI_DATATYPE_NULL;
+ MPID_Datatype_get_basic_type(datatype, basic_type);
+ if ((datatype == MPI_FLOAT_INT) ||
+ (datatype == MPI_DOUBLE_INT) ||
+ (datatype == MPI_LONG_INT) ||
+ (datatype == MPI_SHORT_INT) ||
+ (datatype == MPI_LONG_DOUBLE_INT))
+ {
+ MPID_assert(basic_type == MPI_DATATYPE_NULL);
+ basic_type = datatype;
+ }
+ MPID_assert(basic_type != MPI_DATATYPE_NULL);
+
+ if(MPIDI_Datatype_is_pami_rmw_supported(basic_type, &pami_type, op, &pami_op) ) {
+ good_for_rmw = 1;
+ } else {
+ if((op == MPI_NO_OP) && (origin_addr == NULL) && (win->create_flavor != MPI_WIN_FLAVOR_SHARED) ) {
+ /* essentially a MPI_Get to result buffer */
+ MPID_Get(result_addr, 1, datatype, target_rank,
+ target_disp, 1, datatype, win);
+ return 0;
+ }
+ }
+
+ req = (MPIDI_Win_request *) MPIU_Calloc0(1, MPIDI_Win_request);
+ req->win = win;
+ req->type = MPIDI_WIN_REQUEST_FETCH_AND_OP;
+
+ req->offset = target_disp * win->mpid.info[target_rank].disp_unit;
+
+ if (datatype == MPI_DOUBLE_INT)
+ {
+ MPIDI_Win_datatype_basic(count*2,
+ MPI_DOUBLE,
+ &req->origin.dt);
+ }
+ else if (datatype == MPI_LONG_DOUBLE_INT)
+ {
+ MPIDI_Win_datatype_basic(count*2,
+ MPI_LONG_DOUBLE,
+ &req->origin.dt);
+ }
+ else if (datatype == MPI_LONG_INT)
+ {
+ MPIDI_Win_datatype_basic(count*2,
+ MPI_LONG,
+ &req->origin.dt);
+ }
+ else if (datatype == MPI_SHORT_INT)
+ {
+ MPIDI_Win_datatype_basic(count*2,
+ MPI_INT,
+ &req->origin.dt);
+ }
+ else
+ {
+ MPIDI_Win_datatype_basic(count,
+ datatype,
+ &req->origin.dt);
+ }
+
+
+ if (req->origin.dt.size == 0)
+ {
+ MPIU_Free(req);
+ return MPI_SUCCESS;
+ }
+
+ req->target.rank = target_rank;
+
+
+ if (target_rank == win->comm_ptr->rank || win->create_flavor == MPI_WIN_FLAVOR_SHARED)
+ {
+ MPI_User_function *uop;
+ void *base, *dest_addr;
+ int disp_unit;
+ int len, one;
+
+#ifdef PENDING_SHM_WIN
+ if (win->create_flavor == MPI_WIN_FLAVOR_SHARED) {
+ MPIDI_SHM_MUTEX_LOCK(win);
+ shm_locked = 1;
+ base = win->mpid.shm->base_addr;
+ disp_unit = win->disp_unit;
+
+ }
+ else {
+#endif
+ base = win->base;
+ disp_unit = win->disp_unit;
+#ifdef PENDING_SHM_WIN
+ }
+#endif
+
+ dest_addr = (char *) base + disp_unit * target_disp;
+
+ MPID_Datatype_get_size_macro(datatype, len);
+ MPIU_Memcpy(result_addr, dest_addr, len);
+
+ uop = MPIR_OP_HDL_TO_FN(op);
+ one = 1;
+
+ (*uop)((void *) origin_addr, dest_addr, &one, &datatype);
+
+#ifdef PENDING_SHM_WIN
+ if (shm_locked) {
+ MPIDI_SHM_MUTEX_UNLOCK(win);
+ shm_locked = 0;
+ }
+#endif
+
+ MPIU_Free(req);
+
+ }
+ else {
+ req->compare_buffer = NULL;
+ req->pami_op = pami_op;
+ req->op = op;
+ req->pami_datatype = pami_type;
+ /* MPI_Fetch_and_op only supports predefined datatype */
+ req->buffer = origin_addr + req->origin.dt.true_lb;
+ req->user_buffer = result_addr + req->origin.dt.true_lb;
+
+ pami_result_t rc;
+ pami_task_t task = MPID_VCR_GET_LPID(win->comm_ptr->vcr, target_rank);
+ if (win->mpid.sync.origin_epoch_type == MPID_EPOTYPE_START &&
+ !MPIDI_valid_group_rank(task, win->mpid.sync.sc.group))
+ {
+ MPIU_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC,
+ return mpi_errno, "**rmasync");
+ }
+
+ rc = PAMI_Endpoint_create(MPIDI_Client, task, 0, &req->dest);
+ MPID_assert(rc == PAMI_SUCCESS);
+
+ MPIDI_Win_datatype_map(&req->origin.dt);
+ win->mpid.sync.total += req->origin.dt.num_contig;
+ req->origin.datatype= basic_type;
+
+ /* The pamid one-sided design requires context post in order to handle the
+ * case where the number of pending rma operation exceeds the
+ * 'PAMID_RMA_PENDING' threshold. When there are too many pending requests the
+ * work function remains on the context post queue (by returning PAMI_EAGAIN)
+ * so that the next time the context is advanced the work function will be
+ * invoked again.
+ *
+ * TODO - When context post is not required it would be better to attempt a
+ * direct context operation and then fail over to using context post if
+ * the rma pending threshold has been reached. This would result in
+ * better latency for one-sided operations.
+ */
+ if(good_for_rmw) {
+ PAMI_Context_post(MPIDI_Context[0], &req->post_request, MPIDI_Fetch_and_op_using_pami_rmw, req);
+ } else {
+ PAMI_Context_post(MPIDI_Context[0], &req->post_request, MPIDI_Atomic, req);
+
+ }
+ }
+
+fn_fail:
+ return mpi_errno;
+}
+
+
+int MPIDI_Datatype_is_pami_rmw_supported(MPI_Datatype datatype, pami_type_t *pami_type, MPI_Op op, pami_atomic_t *pami_op)
+{
+ int null=0;
+ MPI_Op null_op=0;
+ int rc = FALSE;
+ pami_data_function pami_data_fn;
+
+ MPIDI_Datatype_to_pami(datatype, pami_type, op, &pami_data_fn, &null);
+
+ if(*pami_type == PAMI_TYPE_SIGNED_INT ||
+ *pami_type == PAMI_TYPE_UNSIGNED_INT ||
+ *pami_type == PAMI_TYPE_SIGNED_LONG ||
+ *pami_type == PAMI_TYPE_UNSIGNED_LONG ||
+ *pami_type == PAMI_TYPE_SIGNED_LONG_LONG ||
+ *pami_type == PAMI_TYPE_SIGNED_LONG_LONG) {
+ if(op == null_op) {
+ rc = TRUE;
+ } else if (op == MPI_SUM) {
+ *pami_op = PAMI_ATOMIC_FETCH_ADD;
+ rc = TRUE;
+ } else if (op == MPI_BOR) {
+ *pami_op = PAMI_ATOMIC_FETCH_OR;
+ rc = TRUE;
+ } else if (op == MPI_BAND) {
+ *pami_op = PAMI_ATOMIC_FETCH_AND;
+ rc = TRUE;
+ } else if (op == MPI_BXOR) {
+ *pami_op = PAMI_ATOMIC_FETCH_XOR;
+ rc = TRUE;
+ } else if (op == MPI_REPLACE) {
+ *pami_op = PAMI_ATOMIC_FETCH_SET;
+ rc = TRUE;
+ } else if (op == MPI_NO_OP) {
+ *pami_op = PAMI_ATOMIC_FETCH;
+ rc = TRUE;
+ }
+ }
+ return rc;
+}
diff --git a/src/mpid/pamid/src/onesided/mpid_win_get.c b/src/mpid/pamid/src/onesided/mpid_win_get.c
index fd8ea46..0d5b6a2 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_get.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_get.c
@@ -214,7 +214,6 @@ MPID_Get(void *origin_addr,
{
int mpi_errno = MPI_SUCCESS;
MPIDI_Win_request *req = MPIU_Calloc0(1, MPIDI_Win_request);
- *req = zero_req;
req->win = win;
if(win->mpid.request_based != 1)
req->type = MPIDI_WIN_REQUEST_GET;
diff --git a/src/mpid/pamid/src/onesided/mpid_win_lock.c b/src/mpid/pamid/src/onesided/mpid_win_lock.c
index 92c6b47..259ab75 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_lock.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_lock.c
@@ -206,7 +206,7 @@ MPID_Win_unlock(int rank,
}
if (rank == MPI_PROC_NULL) goto fn_exit;
struct MPIDI_Win_sync* sync = &win->mpid.sync;
- MPID_PROGRESS_WAIT_WHILE(win->mpid.origin[rank].nStarted != win->mpid.origin[rank].nCompleted);
+ MPID_PROGRESS_WAIT_DO_WHILE(win->mpid.origin[rank].nStarted != win->mpid.origin[rank].nCompleted);
win->mpid.origin[rank].nCompleted=0;
win->mpid.origin[rank].nStarted=0;
diff --git a/src/mpid/pamid/src/onesided/mpid_win_put.c b/src/mpid/pamid/src/onesided/mpid_win_put.c
index 7132783..6e8d38b 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_put.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_put.c
@@ -227,7 +227,6 @@ MPID_Put(void *origin_addr,
{
int mpi_errno = MPI_SUCCESS;
MPIDI_Win_request *req = MPIU_Calloc0(1, MPIDI_Win_request);
- *req = zero_req;
req->win = win;
if(win->mpid.request_based != 1)
req->type = MPIDI_WIN_REQUEST_PUT;
diff --git a/src/mpid/pamid/src/onesided/mpidi_onesided.h b/src/mpid/pamid/src/onesided/mpidi_onesided.h
index 79d2981..57aabca 100644
--- a/src/mpid/pamid/src/onesided/mpidi_onesided.h
+++ b/src/mpid/pamid/src/onesided/mpidi_onesided.h
@@ -29,7 +29,9 @@ pami_get_simple_t zero_get_parms;
pami_rput_simple_t zero_rput_parms;
pami_put_simple_t zero_put_parms;
pami_send_t zero_send_parms;
+pami_send_immediate_t zero_send_immediate_parms;
pami_recv_t zero_recv_parms;
+pami_rmw_t zero_rmw_parms;
/**
* \brief One-sided Message Types
@@ -57,6 +59,8 @@ typedef enum
MPIDI_WIN_REQUEST_RGET,
MPIDI_WIN_REQUEST_RPUT,
MPIDI_WIN_REQUEST_RGET_ACCUMULATE,
+ MPIDI_WIN_REQUEST_COMPARE_AND_SWAP,
+ MPIDI_WIN_REQUEST_FETCH_AND_OP,
} MPIDI_Win_requesttype_t;
typedef enum
@@ -81,6 +85,20 @@ typedef struct
} MPIDI_Win_control_t;
+#define MAX_ATOMIC_TYPE_SIZE 32
+typedef struct
+{
+ char buf[MAX_ATOMIC_TYPE_SIZE]; //Origin value or ack result value
+ char test[MAX_ATOMIC_TYPE_SIZE]; //Test element for CAS
+ void * result_addr; //Address on source to store output
+ void * remote_addr; //Address of target on destination
+ void * request_addr; //Address of the request object
+ MPI_Datatype datatype;
+ MPI_Op op;
+ int atomic_type;
+} MPIDI_AtomicHeader_t;
+
+
typedef struct MPIDI_WinLock_info
{
unsigned peer;
@@ -177,6 +195,7 @@ typedef struct _mpidi_win_request
} target;
void *user_buffer;
+ void *compare_buffer; /* anchor of compare buffer for compare and swap */
uint32_t buffer_free;
void *buffer;
struct _mpidi_win_request *next;
@@ -185,6 +204,12 @@ typedef struct _mpidi_win_request
MPI_Op op;
int result_num_contig;
+
+ /* for RMA atomic functions */
+
+ pami_atomic_t pami_op;
+ pami_type_t pami_datatype;
+
int request_based; /* flag for request based rma */
MPID_Request *req_handle; /* anchor of MPID_Request struc for request based rma*/
} MPIDI_Win_request;
-----------------------------------------------------------------------
Summary of changes:
src/mpid/pamid/include/mpidi_datatypes.h | 31 +-
src/mpid/pamid/include/mpidi_prototypes.h | 19 +
src/mpid/pamid/src/misc/mpid_unimpl.c | 21 -
src/mpid/pamid/src/mpid_init.c | 27 ++
src/mpid/pamid/src/mpid_progress.h | 23 +
src/mpid/pamid/src/onesided/Makefile.mk | 10 +-
src/mpid/pamid/src/onesided/mpid_1s.c | 16 +-
src/mpid/pamid/src/onesided/mpid_win_accumulate.c | 3 +-
.../pamid/src/onesided/mpid_win_compare_and_swap.c | 197 +++++++++
.../pamid/src/onesided/mpid_win_fetch_and_op.c | 420 ++++++++++++++++++++
src/mpid/pamid/src/onesided/mpid_win_get.c | 1 -
src/mpid/pamid/src/onesided/mpid_win_lock.c | 2 +-
src/mpid/pamid/src/onesided/mpid_win_put.c | 1 -
src/mpid/pamid/src/onesided/mpidi_onesided.h | 25 ++
14 files changed, 743 insertions(+), 53 deletions(-)
create mode 100644 src/mpid/pamid/src/onesided/mpid_win_compare_and_swap.c
create mode 100644 src/mpid/pamid/src/onesided/mpid_win_fetch_and_op.c
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1rc2-125-ga188201
by noreply@mpich.org 31 Dec '13
by noreply@mpich.org 31 Dec '13
31 Dec '13
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via a1882012d3c977b44a17e6fa887ea662f4f2a2c2 (commit)
via 39c1ab96986ec313a3cfb26cd9a9fa5ae0e6dec0 (commit)
via e7d30a730fa96732dcc3c8593c3a0803fa276f89 (commit)
from d389a53484b975edbe7ba04d67d3d6bf73104827 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/a1882012d3c977b44a17e6fa887ea662f…
commit a1882012d3c977b44a17e6fa887ea662f4f2a2c2
Author: Junchao Zhang <jczhang(a)mcs.anl.gov>
Date: Sun Dec 29 10:55:17 2013 -0600
Add "See also" in descriptions of related cvars
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpi/coll/allgather.c b/src/mpi/coll/allgather.c
index 99fef86..6ddef58 100644
--- a/src/mpi/coll/allgather.c
+++ b/src/mpi/coll/allgather.c
@@ -21,6 +21,7 @@ cvars:
description : >-
For MPI_Allgather and MPI_Allgatherv, the short message algorithm will
be used if the send buffer size is < this value (in bytes).
+ (See also: MPIR_CVAR_ALLGATHER_LONG_MSG_SIZE)
- name : MPIR_CVAR_ALLGATHER_LONG_MSG_SIZE
category : COLLECTIVE
@@ -32,6 +33,7 @@ cvars:
description : >-
For MPI_Allgather and MPI_Allgatherv, the long message algorithm will be
used if the send buffer size is >= this value (in bytes)
+ (See also: MPIR_CVAR_ALLGATHER_SHORT_MSG_SIZE)
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
diff --git a/src/mpi/coll/alltoall.c b/src/mpi/coll/alltoall.c
index a439545..c3d381f 100644
--- a/src/mpi/coll/alltoall.c
+++ b/src/mpi/coll/alltoall.c
@@ -25,6 +25,7 @@ cvars:
description : >-
the short message algorithm will be used if the per-destination
message size (sendcount*size(sendtype)) is <= this value
+ (See also: MPIR_CVAR_ALLTOALL_MEDIUM_MSG_SIZE)
- name : MPIR_CVAR_ALLTOALL_MEDIUM_MSG_SIZE
category : COLLECTIVE
@@ -37,6 +38,7 @@ cvars:
the medium message algorithm will be used if the per-destination
message size (sendcount*size(sendtype)) is <= this value and
larger than MPIR_CVAR_ALLTOALL_SHORT_MSG_SIZE
+ (See also: MPIR_CVAR_ALLTOALL_SHORT_MSG_SIZE)
- name : MPIR_CVAR_ALLTOALL_THROTTLE
category : COLLECTIVE
diff --git a/src/mpi/coll/bcast.c b/src/mpi/coll/bcast.c
index bda2984..5860876 100644
--- a/src/mpi/coll/bcast.c
+++ b/src/mpi/coll/bcast.c
@@ -30,6 +30,7 @@ cvars:
broadcast based on a scatter followed by a recursive doubling allgather algorithm.
Otherwise, for long messages or with non power-of-two number of processes, we do
broadcast based on a scatter followed by a ring allgather algorithm.
+ (See also: MPIR_CVAR_BCAST_SHORT_MSG_SIZE, MPIR_CVAR_BCAST_LONG_MSG_SIZE)
- name : MPIR_CVAR_BCAST_SHORT_MSG_SIZE
category : COLLECTIVE
@@ -39,7 +40,6 @@ cvars:
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
- (Same description as that for MPIR_CVAR_BCAST_MIN_PROCS)
Let's define short messages as messages with size < MPIR_CVAR_BCAST_SHORT_MSG_SIZE,
and medium messages as messages with size >= MPIR_CVAR_BCAST_SHORT_MSG_SIZE but
< MPIR_CVAR_BCAST_LONG_MSG_SIZE, and long messages as messages with size >=
@@ -50,6 +50,7 @@ cvars:
broadcast based on a scatter followed by a recursive doubling allgather algorithm.
Otherwise, for long messages or with non power-of-two number of processes, we do
broadcast based on a scatter followed by a ring allgather algorithm.
+ (See also: MPIR_CVAR_BCAST_MIN_PROCS, MPIR_CVAR_BCAST_LONG_MSG_SIZE)
- name : MPIR_CVAR_BCAST_LONG_MSG_SIZE
category : COLLECTIVE
@@ -59,7 +60,6 @@ cvars:
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
- (Same description as that for MPIR_CVAR_BCAST_MIN_PROCS)
Let's define short messages as messages with size < MPIR_CVAR_BCAST_SHORT_MSG_SIZE,
and medium messages as messages with size >= MPIR_CVAR_BCAST_SHORT_MSG_SIZE but
< MPIR_CVAR_BCAST_LONG_MSG_SIZE, and long messages as messages with size >=
@@ -70,6 +70,7 @@ cvars:
broadcast based on a scatter followed by a recursive doubling allgather algorithm.
Otherwise, for long messages or with non power-of-two number of processes, we do
broadcast based on a scatter followed by a ring allgather algorithm.
+ (See also: MPIR_CVAR_BCAST_MIN_PROCS, MPIR_CVAR_BCAST_SHORT_MSG_SIZE)
- name : MPIR_CVAR_ENABLE_SMP_BCAST
category : COLLECTIVE
@@ -78,7 +79,7 @@ cvars:
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
- description : Enable SMP aware broadcast.
+ description : Enable SMP aware broadcast (See also: MPIR_CVAR_MAX_SMP_BCAST_MSG_SIZE)
- name : MPIR_CVAR_MAX_SMP_BCAST_MSG_SIZE
category : COLLECTIVE
@@ -90,6 +91,7 @@ cvars:
description : >-
Maximum message size for which SMP-aware broadcast is used. A
value of '0' uses SMP-aware broadcast for all message sizes.
+ (See also: MPIR_CVAR_ENABLE_SMP_BCAST)
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
diff --git a/src/mpi/coll/gather.c b/src/mpi/coll/gather.c
index 465c844..284ba14 100644
--- a/src/mpi/coll/gather.c
+++ b/src/mpi/coll/gather.c
@@ -21,6 +21,7 @@ cvars:
description : >-
use a temporary buffer for intracommunicator MPI_Gather if the send
buffer size is < this value (in bytes)
+ (See also: MPIR_CVAR_GATHER_INTER_SHORT_MSG_SIZE)
- name : MPIR_CVAR_GATHER_INTER_SHORT_MSG_SIZE
category : COLLECTIVE
@@ -32,6 +33,7 @@ cvars:
description : >-
use the short message algorithm for intercommunicator MPI_Gather if the
send buffer size is < this value (in bytes)
+ (See also: MPIR_CVAR_GATHER_VSMALL_MSG_SIZE)
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
http://git.mpich.org/mpich.git/commitdiff/39c1ab96986ec313a3cfb26cd9a9fa5ae…
commit 39c1ab96986ec313a3cfb26cd9a9fa5ae0e6dec0
Author: Junchao Zhang <jczhang(a)mcs.anl.gov>
Date: Sun Dec 29 10:46:52 2013 -0600
white space fixup
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpi/coll/alltoall.c b/src/mpi/coll/alltoall.c
index 2d1cdf4..a439545 100644
--- a/src/mpi/coll/alltoall.c
+++ b/src/mpi/coll/alltoall.c
@@ -23,8 +23,8 @@ cvars:
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
- the short message algorithm will be used if the per-destination
- message size (sendcount*size(sendtype)) is <= this value
+ the short message algorithm will be used if the per-destination
+ message size (sendcount*size(sendtype)) is <= this value
- name : MPIR_CVAR_ALLTOALL_MEDIUM_MSG_SIZE
category : COLLECTIVE
@@ -34,9 +34,9 @@ cvars:
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
- the medium message algorithm will be used if the per-destination
- message size (sendcount*size(sendtype)) is <= this value and
- larger than MPIR_CVAR_ALLTOALL_SHORT_MSG_SIZE
+ the medium message algorithm will be used if the per-destination
+ message size (sendcount*size(sendtype)) is <= this value and
+ larger than MPIR_CVAR_ALLTOALL_SHORT_MSG_SIZE
- name : MPIR_CVAR_ALLTOALL_THROTTLE
category : COLLECTIVE
http://git.mpich.org/mpich.git/commitdiff/e7d30a730fa96732dcc3c8593c3a0803f…
commit e7d30a730fa96732dcc3c8593c3a0803fa276f89
Author: Junchao Zhang <jczhang(a)mcs.anl.gov>
Date: Sun Dec 29 10:31:30 2013 -0600
Add prefix MPI_CVAR_ to a cvar name in description
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpi/coll/alltoall.c b/src/mpi/coll/alltoall.c
index 8ec541a..2d1cdf4 100644
--- a/src/mpi/coll/alltoall.c
+++ b/src/mpi/coll/alltoall.c
@@ -36,7 +36,7 @@ cvars:
description : >-
the medium message algorithm will be used if the per-destination
message size (sendcount*size(sendtype)) is <= this value and
- larger than ALLTOALL_SHORT_MSG_SIZE
+ larger than MPIR_CVAR_ALLTOALL_SHORT_MSG_SIZE
- name : MPIR_CVAR_ALLTOALL_THROTTLE
category : COLLECTIVE
-----------------------------------------------------------------------
Summary of changes:
src/mpi/coll/allgather.c | 2 ++
src/mpi/coll/alltoall.c | 12 +++++++-----
src/mpi/coll/bcast.c | 8 +++++---
src/mpi/coll/gather.c | 2 ++
4 files changed, 16 insertions(+), 8 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1rc2-122-gd389a53
by noreply@mpich.org 31 Dec '13
by noreply@mpich.org 31 Dec '13
31 Dec '13
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via d389a53484b975edbe7ba04d67d3d6bf73104827 (commit)
from 1eb07c6e38c48e7d83649ed7a41630d1a9f98912 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/d389a53484b975edbe7ba04d67d3d6bf7…
commit d389a53484b975edbe7ba04d67d3d6bf73104827
Author: Haizhu Liu <haizhu(a)us.ibm.com>
Date: Sun Oct 27 19:19:48 2013 -0400
PAMID support of request based rma functions
- add check epoch
- changes after intergrating Sameer's get_accumulate
- update to remove dependency on mpid data structure
(ibm) F189038
Signed-off-by: Michael Blocksome <blocksom(a)us.ibm.com>
Minor modifications by Pavan to minimize the changes in
mpir_request.c, and to reduce duplication. Collective requests and
RMA requests are handled the same way.
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 9716a70..5f1bfc8 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -1424,6 +1424,7 @@ typedef enum MPID_Request_kind_t {
MPID_UREQUEST,
MPID_COLL_REQUEST,
MPID_REQUEST_MPROBE, /* see NOTE-R1 */
+ MPID_WIN_REQUEST,
MPID_LAST_REQUEST_KIND
#ifdef MPID_DEV_REQUEST_KIND_DECL
, MPID_DEV_REQUEST_KIND_DECL
diff --git a/src/mpi/pt2pt/mpir_request.c b/src/mpi/pt2pt/mpir_request.c
index 22d9154..121d0e7 100644
--- a/src/mpi/pt2pt/mpir_request.c
+++ b/src/mpi/pt2pt/mpir_request.c
@@ -214,6 +214,7 @@ int MPIR_Request_complete(MPI_Request * request, MPID_Request * request_ptr,
}
case MPID_COLL_REQUEST:
+ case MPID_WIN_REQUEST:
{
MPIR_Request_extract_status(request_ptr, status);
MPID_Request_release(request_ptr);
diff --git a/src/mpid/pamid/include/mpidi_datatypes.h b/src/mpid/pamid/include/mpidi_datatypes.h
index 1b4dee8..2b7ae56 100644
--- a/src/mpid/pamid/include/mpidi_datatypes.h
+++ b/src/mpid/pamid/include/mpidi_datatypes.h
@@ -295,6 +295,7 @@ struct MPIDI_Request
int idx;
int PR_idx;
#endif
+ struct MPIDI_Win_request *win_req; /* anchor of request based rma handle so as to free it properly when wait is called */
};
typedef void* fast_query_t;
@@ -489,6 +490,9 @@ struct MPIDI_Win
} local;
} lock;
} sync;
+
+ int request_based; /* flag for request based rma */
+ struct MPID_Request *rreq; /* anchor of MPID_Request for request based rma */
};
/**
diff --git a/src/mpid/pamid/include/mpidi_thread.h b/src/mpid/pamid/include/mpidi_thread.h
index 5237742..5f3fb7e 100644
--- a/src/mpid/pamid/include/mpidi_thread.h
+++ b/src/mpid/pamid/include/mpidi_thread.h
@@ -100,8 +100,8 @@
#define MPIU_THREAD_CS_INITFLAG_EXIT(_context)
#define MPIU_THREAD_CS_MEMALLOC_ENTER(_context)
#define MPIU_THREAD_CS_MEMALLOC_EXIT(_context)
-#define MPIU_THREAD_CS_MPI_OBJ_ENTER(_context)
-#define MPIU_THREAD_CS_MPI_OBJ_EXIT(_context)
+#define MPIU_THREAD_CS_MPI_OBJ_ENTER(_context) MPIDI_CS_ENTER(5)
+#define MPIU_THREAD_CS_MPI_OBJ_EXIT(_context) MPIDI_CS_EXIT(5)
#define MPIU_THREAD_CS_MSGQUEUE_ENTER(_context)
#define MPIU_THREAD_CS_MSGQUEUE_EXIT(_context)
#define MPIU_THREAD_CS_PAMI_ENTER(_context)
diff --git a/src/mpid/pamid/src/misc/mpid_unimpl.c b/src/mpid/pamid/src/misc/mpid_unimpl.c
index 03e9783..6c6dea4 100644
--- a/src/mpid/pamid/src/misc/mpid_unimpl.c
+++ b/src/mpid/pamid/src/misc/mpid_unimpl.c
@@ -99,15 +99,6 @@ int MPID_Win_allocate_shared(MPI_Aint size, int disp_unit, MPID_Info *info_ptr,
return 0;
}
-int MPID_Rput(const void *origin_addr, int origin_count,
- MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp,
- int target_count, MPI_Datatype target_datatype, MPID_Win *win,
- MPID_Request **request)
-{
- MPID_abort();
- return 0;
-}
-
int MPID_Compare_and_swap(const void *origin_addr, const void *compare_addr,
void *result_addr, MPI_Datatype datatype, int target_rank,
@@ -117,24 +108,6 @@ int MPID_Compare_and_swap(const void *origin_addr, const void *compare_addr,
return 0;
}
-int MPID_Raccumulate(const void *origin_addr, int origin_count,
- MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp,
- int target_count, MPI_Datatype target_datatype, MPI_Op op, MPID_Win *win,
- MPID_Request **request)
-{
- MPID_abort();
- return 0;
-}
-
-int MPID_Rget_accumulate(const void *origin_addr, int origin_count,
- MPI_Datatype origin_datatype, void *result_addr, int result_count,
- MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp,
- int target_count, MPI_Datatype target_datatype, MPI_Op op, MPID_Win *win,
- MPID_Request **request)
-{
- MPID_abort();
- return 0;
-}
int MPID_Fetch_and_op(const void *origin_addr, void *result_addr,
MPI_Datatype datatype, int target_rank, MPI_Aint target_disp,
@@ -152,13 +125,3 @@ int MPID_Win_shared_query(MPID_Win *win, int rank, MPI_Aint *size, int *disp_uni
}
-int MPID_Rget(void *origin_addr, int origin_count,
- MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp,
- int target_count, MPI_Datatype target_datatype, MPID_Win *win,
- MPID_Request **request)
-{
- MPID_abort();
- return 0;
-}
-
-
diff --git a/src/mpid/pamid/src/mpid_request.h b/src/mpid/pamid/src/mpid_request.h
index 86dea52..72a2ce6 100644
--- a/src/mpid/pamid/src/mpid_request.h
+++ b/src/mpid/pamid/src/mpid_request.h
@@ -265,6 +265,7 @@ MPID_Request_release_inline(MPID_Request *req)
MPIU_Object_release_ref(req, &count);
MPID_assert(count >= 0);
+
if (count == 0)
{
MPID_assert(MPID_cc_is_complete(&req->cc));
@@ -275,6 +276,7 @@ MPID_Request_release_inline(MPID_Request *req)
if (req->mpid.uebuf_malloc== mpiuMalloc) {
MPIU_Free(req->mpid.uebuf);
}
+ if(req->mpid.win_req) MPIU_Free(req->mpid.win_req);
#if TOKEN_FLOW_CONTROL
else if (req->mpid.uebuf_malloc == mpidiBufMM) {
MPIU_THREAD_CS_ENTER(MSGQUEUE,0);
diff --git a/src/mpid/pamid/src/onesided/Makefile.mk b/src/mpid/pamid/src/onesided/Makefile.mk
index 901e6ab..3497b71 100644
--- a/src/mpid/pamid/src/onesided/Makefile.mk
+++ b/src/mpid/pamid/src/onesided/Makefile.mk
@@ -45,6 +45,7 @@ lib_lib@MPILIBNAME@_la_SOURCES += \
src/mpid/pamid/src/onesided/mpid_win_sync.c \
src/mpid/pamid/src/onesided/mpid_win_get_info.c \
src/mpid/pamid/src/onesided/mpid_win_set_info.c \
+ src/mpid/pamid/src/onesided/mpid_win_reqops.c \
src/mpid/pamid/src/onesided/mpidi_win_control.c
diff --git a/src/mpid/pamid/src/onesided/mpid_1s.c b/src/mpid/pamid/src/onesided/mpid_1s.c
index ca9f8dc..7398174 100644
--- a/src/mpid/pamid/src/onesided/mpid_1s.c
+++ b/src/mpid/pamid/src/onesided/mpid_1s.c
@@ -56,6 +56,10 @@ MPIDI_Win_DoneCB(pami_context_t context,
if (req->origin.completed == req->target.dt.num_contig)
{
req->win->mpid.origin[target_rank].nCompleted++;
+ if(req->req_handle) {
+ MPID_cc_set(req->req_handle->cc_ptr, 0);
+ }
+
if (req->buffer_free) {
MPIU_Free(req->buffer);
MPIU_Free(req->user_buffer);
@@ -63,7 +67,9 @@ MPIDI_Win_DoneCB(pami_context_t context,
}
if (req->accum_headers)
MPIU_Free(req->accum_headers);
- MPIU_Free(req);
+
+ if( (req->type != MPIDI_WIN_REQUEST_RPUT) && (req->type != MPIDI_WIN_REQUEST_RGET) && (req->type != MPIDI_WIN_REQUEST_RACCUMULATE) && (req->type != MPIDI_WIN_REQUEST_RGET_ACCUMULATE) )
+ MPIU_Free(req);
}
MPIDI_Progress_signal();
}
diff --git a/src/mpid/pamid/src/onesided/mpid_win_accumulate.c b/src/mpid/pamid/src/onesided/mpid_win_accumulate.c
index ecdcf14..4f70997 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_accumulate.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_accumulate.c
@@ -173,7 +173,13 @@ MPID_Accumulate(void *origin_addr,
MPIDI_Win_request *req = MPIU_Calloc0(1, MPIDI_Win_request);
*req = zero_req;
req->win = win;
- req->type = MPIDI_WIN_REQUEST_ACCUMULATE;
+ if(win->mpid.request_based != 1)
+ req->type = MPIDI_WIN_REQUEST_ACCUMULATE;
+ else {
+ req->type = MPIDI_WIN_REQUEST_RACCUMULATE;
+ req->req_handle = win->mpid.rreq;
+ req->req_handle->mpid.win_req = req;
+ }
if(win->mpid.sync.origin_epoch_type == win->mpid.sync.target_epoch_type &&
win->mpid.sync.origin_epoch_type == MPID_EPOTYPE_REFENCE){
@@ -188,7 +194,6 @@ MPID_Accumulate(void *origin_addr,
}
req->offset = target_disp * win->mpid.info[target_rank].disp_unit;
- win->mpid.origin[target_rank].nStarted++;
if (origin_datatype == MPI_DOUBLE_INT)
{
@@ -241,10 +246,13 @@ MPID_Accumulate(void *origin_addr,
if ( (req->origin.dt.size == 0) ||
(target_rank == MPI_PROC_NULL))
{
- win->mpid.origin[target_rank].nCompleted++;
- MPIU_Free(req);
+ if(req->req_handle)
+ MPID_cc_set(req->req_handle->cc_ptr, 0);
+ else
+ MPIU_Free(req);
return MPI_SUCCESS;
}
+ win->mpid.origin[target_rank].nStarted++;
req->target.rank = target_rank;
diff --git a/src/mpid/pamid/src/onesided/mpid_win_get.c b/src/mpid/pamid/src/onesided/mpid_win_get.c
index ce40242..fd8ea46 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_get.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_get.c
@@ -216,7 +216,13 @@ MPID_Get(void *origin_addr,
MPIDI_Win_request *req = MPIU_Calloc0(1, MPIDI_Win_request);
*req = zero_req;
req->win = win;
- req->type = MPIDI_WIN_REQUEST_GET;
+ if(win->mpid.request_based != 1)
+ req->type = MPIDI_WIN_REQUEST_GET;
+ else {
+ req->req_handle = win->mpid.rreq;
+ req->type = MPIDI_WIN_REQUEST_RGET;
+ req->req_handle->mpid.win_req = req;
+ }
if(win->mpid.sync.origin_epoch_type == win->mpid.sync.target_epoch_type &&
win->mpid.sync.origin_epoch_type == MPID_EPOTYPE_REFENCE){
@@ -231,7 +237,6 @@ MPID_Get(void *origin_addr,
}
req->offset = target_disp * win->mpid.info[target_rank].disp_unit;
- win->mpid.origin[target_rank].nStarted++;
MPIDI_Win_datatype_basic(origin_count,
origin_datatype,
@@ -248,16 +253,23 @@ MPID_Get(void *origin_addr,
if ( (req->origin.dt.size == 0) ||
(target_rank == MPI_PROC_NULL))
{
- MPIU_Free(req);
+ if(req->req_handle)
+ MPID_cc_set(req->req_handle->cc_ptr, 0);
+ else
+ MPIU_Free(req);
return MPI_SUCCESS;
}
+ win->mpid.origin[target_rank].nStarted++;
/* If the get is a local operation, do it here */
if (target_rank == win->comm_ptr->rank)
{
size_t offset = req->offset;
- req->win->mpid.origin[target_rank].nCompleted++;
- MPIU_Free(req);
+ win->mpid.origin[target_rank].nCompleted++;
+ if(req->req_handle)
+ MPID_cc_set(req->req_handle->cc_ptr, 0);
+ else
+ MPIU_Free(req);
return MPIR_Localcopy(win->base + offset,
target_count,
target_datatype,
diff --git a/src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c b/src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c
index 085f3ce..b8779e1 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c
@@ -161,11 +161,18 @@ MPIDI_Win_GetAccDoneCB(pami_context_t context,
if (req->origin.completed ==
(req->result_num_contig + req->target.dt.num_contig))
{
- if (req->buffer_free)
- MPIU_Free(req->buffer);
+ if(req->req_handle)
+ MPID_cc_set(req->req_handle->cc_ptr, 0);
+
+ if (req->buffer_free) {
+ MPIU_Free(req->buffer);
+ req->buffer_free = 0;
+ }
if (req->accum_headers)
MPIU_Free(req->accum_headers);
- MPIU_Free (req);
+
+ if( req->type != MPIDI_WIN_REQUEST_RGET_ACCUMULATE )
+ MPIU_Free(req);
}
MPIDI_Progress_signal();
}
@@ -323,7 +330,13 @@ MPID_Get_accumulate(const void * origin_addr,
MPIDI_Win_request *req;
req = MPIU_Calloc0(1, MPIDI_Win_request);
req->win = win;
- req->type = MPIDI_WIN_REQUEST_ACCUMULATE,
+ if(win->mpid.request_based != 1)
+ req->type = MPIDI_WIN_REQUEST_GET_ACCUMULATE;
+ else {
+ req->req_handle = win->mpid.rreq;
+ req->type = MPIDI_WIN_REQUEST_RGET_ACCUMULATE;
+ req->req_handle->mpid.win_req = req;
+ }
req->offset = target_disp*win->mpid.info[target_rank].disp_unit;
#ifdef __BGQ__
/* PAMI limitation as it doesnt permit VA of 0 to be passed into
@@ -397,7 +410,10 @@ MPID_Get_accumulate(const void * origin_addr,
if ( (req->origin.dt.size == 0) ||
(target_rank == MPI_PROC_NULL))
{
- MPIU_Free (req);
+ if(req->req_handle)
+ MPID_cc_set(req->req_handle->cc_ptr, 0);
+ else
+ MPIU_Free(req);
return MPI_SUCCESS;
}
diff --git a/src/mpid/pamid/src/onesided/mpid_win_put.c b/src/mpid/pamid/src/onesided/mpid_win_put.c
index 70564fb..7132783 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_put.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_put.c
@@ -229,7 +229,13 @@ MPID_Put(void *origin_addr,
MPIDI_Win_request *req = MPIU_Calloc0(1, MPIDI_Win_request);
*req = zero_req;
req->win = win;
- req->type = MPIDI_WIN_REQUEST_PUT;
+ if(win->mpid.request_based != 1)
+ req->type = MPIDI_WIN_REQUEST_PUT;
+ else {
+ req->req_handle = win->mpid.rreq;
+ req->type = MPIDI_WIN_REQUEST_RPUT;
+ req->req_handle->mpid.win_req = req;
+ }
if(win->mpid.sync.origin_epoch_type == win->mpid.sync.target_epoch_type &&
win->mpid.sync.origin_epoch_type == MPID_EPOTYPE_REFENCE){
@@ -262,7 +268,10 @@ MPID_Put(void *origin_addr,
if ( (req->origin.dt.size == 0) ||
(target_rank == MPI_PROC_NULL))
{
- MPIU_Free(req);
+ if(req->req_handle)
+ MPID_cc_set(req->req_handle->cc_ptr, 0);
+ else
+ MPIU_Free(req);
return MPI_SUCCESS;
}
@@ -273,7 +282,10 @@ MPID_Put(void *origin_addr,
{
size_t offset = req->offset;
win->mpid.origin[target_rank].nCompleted++;
- MPIU_Free(req);
+ if(req->req_handle)
+ MPID_cc_set(req->req_handle->cc_ptr, 0);
+ else
+ MPIU_Free(req);
return MPIR_Localcopy(origin_addr,
origin_count,
origin_datatype,
diff --git a/src/mpid/pamid/src/onesided/mpid_win_reqops.c b/src/mpid/pamid/src/onesided/mpid_win_reqops.c
new file mode 100644
index 0000000..129d5c8
--- /dev/null
+++ b/src/mpid/pamid/src/onesided/mpid_win_reqops.c
@@ -0,0 +1,278 @@
+/* begin_generated_IBM_copyright_prolog */
+/* */
+/* This is an automatically generated copyright prolog. */
+/* After initializing, DO NOT MODIFY OR MOVE */
+/* --------------------------------------------------------------- */
+/* Licensed Materials - Property of IBM */
+/* Blue Gene/Q 5765-PER 5765-PRP */
+/* */
+/* (C) Copyright IBM Corp. 2011, 2012 All Rights Reserved */
+/* US Government Users Restricted Rights - */
+/* Use, duplication, or disclosure restricted */
+/* by GSA ADP Schedule Contract with IBM Corp. */
+/* */
+/* --------------------------------------------------------------- */
+/* */
+/* end_generated_IBM_copyright_prolog */
+/* (C)Copyright IBM Corp. 2007, 2011 */
+/**
+ * \file src/onesided/mpid_win_reqops.c
+ * \brief ???
+ */
+#include "mpidi_onesided.h"
+
+
+/**
+ * \brief MPI-PAMI glue for MPI_PUT function
+ *
+ * \param[in] origin_addr Source buffer
+ * \param[in] origin_count Number of datatype elements
+ * \param[in] origin_datatype Source datatype
+ * \param[in] target_rank Destination rank (target)
+ * \param[in] target_disp Displacement factor in target buffer
+ * \param[in] target_count Number of target datatype elements
+ * \param[in] target_datatype Destination datatype
+ * \param[in] win Window
+ * \return MPI_SUCCESS
+ */
+#undef FUNCNAME
+#define FUNCNAME MPID_Rput
+#undef FCNAME
+#define FCNAME MPIU_QUOTE(FUNCNAME)
+int
+MPID_Rput(const void *origin_addr,
+ int origin_count,
+ MPI_Datatype origin_datatype,
+ int target_rank,
+ MPI_Aint target_disp,
+ int target_count,
+ MPI_Datatype target_datatype,
+ MPID_Win *win,
+ MPID_Request **request)
+{
+ int mpi_errno = MPI_SUCCESS;
+ MPID_Datatype *dtp;
+ int dt_contig ATTRIBUTE((unused));
+ MPI_Aint dt_true_lb ATTRIBUTE((unused));
+ MPIDI_msg_sz_t data_sz;
+
+ if(win->mpid.sync.origin_epoch_type != MPID_EPOTYPE_LOCK &&
+ win->mpid.sync.origin_epoch_type != MPID_EPOTYPE_LOCK_ALL){
+ MPIU_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC,
+ return mpi_errno, "**rmasync");
+ }
+
+ MPIDI_Datatype_get_info(origin_count, origin_datatype,
+ dt_contig, data_sz, dtp, dt_true_lb);
+
+ MPID_Request *rreq = MPIDI_Request_create2();
+ *request = rreq;
+ rreq->kind = MPID_WIN_REQUEST;
+ win->mpid.rreq = rreq;
+ win->mpid.request_based = 1;
+
+ /* Enqueue or perform the RMA operation */
+ mpi_errno = MPID_Put(origin_addr, origin_count,
+ origin_datatype, target_rank,
+ target_disp, target_count,
+ target_datatype, win);
+ MPID_assert(mpi_errno == MPI_SUCCESS);
+
+}
+
+
+/**
+ * \brief MPI-PAMI glue for MPI_GET function
+ *
+ * \param[in] origin_addr Source buffer
+ * \param[in] origin_count Number of datatype elements
+ * \param[in] origin_datatype Source datatype
+ * \param[in] target_rank Destination rank (target)
+ * \param[in] target_disp Displacement factor in target buffer
+ * \param[in] target_count Number of target datatype elements
+ * \param[in] target_datatype Destination datatype
+ * \param[in] win Window
+ * \return MPI_SUCCESS
+ */
+#undef FUNCNAME
+#define FUNCNAME MPID_Rget
+#undef FCNAME
+#define FCNAME MPIU_QUOTE(FUNCNAME)
+int
+MPID_Rget(void *origin_addr,
+ int origin_count,
+ MPI_Datatype origin_datatype,
+ int target_rank,
+ MPI_Aint target_disp,
+ int target_count,
+ MPI_Datatype target_datatype,
+ MPID_Win *win,
+ MPID_Request **request)
+{
+ int mpi_errno = MPI_SUCCESS;
+ int dt_contig ATTRIBUTE((unused));
+ MPID_Datatype *dtp;
+ MPI_Aint dt_true_lb ATTRIBUTE((unused));
+ MPIDI_msg_sz_t data_sz;
+
+ if(win->mpid.sync.origin_epoch_type != MPID_EPOTYPE_LOCK &&
+ win->mpid.sync.origin_epoch_type != MPID_EPOTYPE_LOCK_ALL){
+ MPIU_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC,
+ return mpi_errno, "**rmasync");
+ }
+
+ MPIDI_Datatype_get_info(origin_count, origin_datatype,
+ dt_contig, data_sz, dtp, dt_true_lb);
+
+ MPID_Request *rreq = MPIDI_Request_create2();
+ rreq->kind = MPID_WIN_REQUEST;
+ *request = rreq;
+ win->mpid.rreq = rreq;
+ win->mpid.request_based = 1;
+
+ mpi_errno = MPID_Get(origin_addr, origin_count,
+ origin_datatype, target_rank,
+ target_disp, target_count,
+ target_datatype, win);
+ MPID_assert(mpi_errno == MPI_SUCCESS);
+}
+
+/**
+ * \brief MPI-PAMI glue for MPI_ACCUMULATE function
+ *
+ * According to the MPI Specification:
+ *
+ * Each datatype argument must be a predefined datatype or
+ * a derived datatype, where all basic components are of the
+ * same predefined datatype. Both datatype arguments must be
+ * constructed from the same predefined datatype.
+ *
+ * \param[in] origin_addr Source buffer
+ * \param[in] origin_count Number of datatype elements
+ * \param[in] origin_datatype Source datatype
+ * \param[in] target_rank Destination rank (target)
+ * \param[in] target_disp Displacement factor in target buffer
+ * \param[in] target_count Number of target datatype elements
+ * \param[in] target_datatype Destination datatype
+ * \param[in] op Operand to perform
+ * \param[in] win Window
+ * \return MPI_SUCCESS
+ */
+#undef FUNCNAME
+#define FUNCNAME MPID_Raccumulate
+#undef FCNAME
+#define FCNAME MPIU_QUOTE(FUNCNAME)
+int
+MPID_Raccumulate(const void *origin_addr,
+ int origin_count,
+ MPI_Datatype origin_datatype,
+ int target_rank,
+ MPI_Aint target_disp,
+ int target_count,
+ MPI_Datatype target_datatype,
+ MPI_Op op,
+ MPID_Win *win,
+ MPID_Request **request)
+{
+ int mpi_errno = MPI_SUCCESS;
+ int dt_contig ATTRIBUTE((unused));
+ MPID_Datatype *dtp;
+ MPIDI_msg_sz_t data_sz;
+ MPI_Aint dt_true_lb ATTRIBUTE((unused));
+
+ if(win->mpid.sync.origin_epoch_type != MPID_EPOTYPE_LOCK &&
+ win->mpid.sync.origin_epoch_type != MPID_EPOTYPE_LOCK_ALL){
+ MPIU_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC,
+ return mpi_errno, "**rmasync");
+ }
+
+ MPIDI_Datatype_get_info(origin_count, origin_datatype,
+ dt_contig, data_sz, dtp, dt_true_lb);
+
+ MPID_Request *rreq = MPIDI_Request_create2();
+ rreq->kind = MPID_WIN_REQUEST;
+ *request = rreq;
+ win->mpid.rreq = rreq;
+ win->mpid.request_based = 1;
+
+ /* Enqueue or perform the RMA operation */
+ mpi_errno = MPID_Accumulate(origin_addr, origin_count,
+ origin_datatype, target_rank,
+ target_disp, target_count,
+ target_datatype, op, win);
+ MPID_assert(mpi_errno == MPI_SUCCESS);
+
+}
+
+
+/**
+ * \brief MPI-PAMI glue for MPI_ACCUMULATE function
+ *
+ * According to the MPI Specification:
+ *
+ * Each datatype argument must be a predefined datatype or
+ * a derived datatype, where all basic components are of the
+ * same predefined datatype. Both datatype arguments must be
+ * constructed from the same predefined datatype.
+ *
+ * \param[in] origin_addr Source buffer
+ * \param[in] origin_count Number of datatype elements
+ * \param[in] origin_datatype Source datatype
+ * \param[in] target_rank Destination rank (target)
+ * \param[in] target_disp Displacement factor in target buffer
+ * \param[in] target_count Number of target datatype elements
+ * \param[in] target_datatype Destination datatype
+ * \param[in] op Operand to perform
+ * \param[in] win Window
+ * \return MPI_SUCCESS
+ */
+#undef FUNCNAME
+#define FUNCNAME MPID_Rget_accumulate
+#undef FCNAME
+#define FCNAME MPIU_QUOTE(FUNCNAME)
+int
+MPID_Rget_accumulate(const void *origin_addr,
+ int origin_count,
+ MPI_Datatype origin_datatype,
+ void *result_addr,
+ int result_count,
+ MPI_Datatype result_datatype,
+ int target_rank,
+ MPI_Aint target_disp,
+ int target_count,
+ MPI_Datatype target_datatype,
+ MPI_Op op,
+ MPID_Win *win,
+ MPID_Request **request)
+{
+
+ int mpi_errno = MPI_SUCCESS;
+ MPID_Datatype *dtp;
+ int dt_contig ATTRIBUTE((unused));
+ MPIDI_msg_sz_t data_sz;
+ MPI_Aint dt_true_lb ATTRIBUTE((unused));
+
+ if(win->mpid.sync.origin_epoch_type != MPID_EPOTYPE_LOCK &&
+ win->mpid.sync.origin_epoch_type != MPID_EPOTYPE_LOCK_ALL){
+ MPIU_ERR_SETANDSTMT(mpi_errno, MPI_ERR_RMA_SYNC,
+ return mpi_errno, "**rmasync");
+ }
+
+ MPIDI_Datatype_get_info(origin_count, origin_datatype,
+ dt_contig, data_sz, dtp, dt_true_lb);
+ MPID_Request *rreq = MPIDI_Request_create2();
+ rreq->kind = MPID_WIN_REQUEST;
+ *request = rreq;
+ win->mpid.rreq = rreq;
+ win->mpid.request_based = 1;
+
+ /* Enqueue or perform the RMA operation */
+ mpi_errno = MPID_Get_accumulate(origin_addr, origin_count,
+ origin_datatype, result_addr,
+ result_count, result_datatype,
+ target_rank, target_disp,
+ target_count, target_datatype,
+ op, win);
+ MPID_assert(mpi_errno == MPI_SUCCESS);
+}
+
diff --git a/src/mpid/pamid/src/onesided/mpidi_onesided.h b/src/mpid/pamid/src/onesided/mpidi_onesided.h
index e29b1e7..79d2981 100644
--- a/src/mpid/pamid/src/onesided/mpidi_onesided.h
+++ b/src/mpid/pamid/src/onesided/mpidi_onesided.h
@@ -52,6 +52,11 @@ typedef enum
MPIDI_WIN_REQUEST_ACCUMULATE,
MPIDI_WIN_REQUEST_GET,
MPIDI_WIN_REQUEST_PUT,
+ MPIDI_WIN_REQUEST_GET_ACCUMULATE,
+ MPIDI_WIN_REQUEST_RACCUMULATE,
+ MPIDI_WIN_REQUEST_RGET,
+ MPIDI_WIN_REQUEST_RPUT,
+ MPIDI_WIN_REQUEST_RGET_ACCUMULATE,
} MPIDI_Win_requesttype_t;
typedef enum
@@ -180,6 +185,8 @@ typedef struct _mpidi_win_request
MPI_Op op;
int result_num_contig;
+ int request_based; /* flag for request based rma */
+ MPID_Request *req_handle; /* anchor of MPID_Request struc for request based rma*/
} MPIDI_Win_request;
MPIDI_Win_request zero_req; /* used for init. request structure to 0 */
-----------------------------------------------------------------------
Summary of changes:
src/include/mpiimpl.h | 1 +
src/mpi/pt2pt/mpir_request.c | 1 +
src/mpid/pamid/include/mpidi_datatypes.h | 4 +
src/mpid/pamid/include/mpidi_thread.h | 4 +-
src/mpid/pamid/src/misc/mpid_unimpl.c | 37 ---
src/mpid/pamid/src/mpid_request.h | 2 +
src/mpid/pamid/src/onesided/Makefile.mk | 1 +
src/mpid/pamid/src/onesided/mpid_1s.c | 8 +-
src/mpid/pamid/src/onesided/mpid_win_accumulate.c | 16 +-
src/mpid/pamid/src/onesided/mpid_win_get.c | 22 ++-
.../pamid/src/onesided/mpid_win_get_accumulate.c | 26 ++-
src/mpid/pamid/src/onesided/mpid_win_put.c | 18 +-
src/mpid/pamid/src/onesided/mpid_win_reqops.c | 278 ++++++++++++++++++++
src/mpid/pamid/src/onesided/mpidi_onesided.h | 7 +
14 files changed, 368 insertions(+), 57 deletions(-)
create mode 100644 src/mpid/pamid/src/onesided/mpid_win_reqops.c
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1rc2-121-g1eb07c6
by noreply@mpich.org 30 Dec '13
by noreply@mpich.org 30 Dec '13
30 Dec '13
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 1eb07c6e38c48e7d83649ed7a41630d1a9f98912 (commit)
via 4bbeb5222ebce5af9ac7bf6fe5d4f8c17bc47cd5 (commit)
via 9665638294c180a9e6cd3aaabb4cbedd9a73aee8 (commit)
via 8ea1dfec1f51eae94aeeccc64848762e312ed0c6 (commit)
via 7a1da4a9dd1c015aeb19d3e60c97af20d4bea0b3 (commit)
via 44aa78991748cd20399f0e987d4c98e4a473e81c (commit)
via 6ca3ae6c359b734555eb4eb1d325b16c32a0da9b (commit)
via 2225f092efe8b8836d8a2c6292fb6dd456a39ef3 (commit)
via 583e3f0a8f0e9d8acaaea2de4722110c78c8e32b (commit)
from 3c37766610b0d89b69b4b21b7053696c4efbfa3f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/1eb07c6e38c48e7d83649ed7a41630d1a…
commit 1eb07c6e38c48e7d83649ed7a41630d1a9f98912
Author: Antonio J. Pena <apenya(a)mcs.anl.gov>
Date: Mon Nov 18 16:40:58 2013 -0600
Fix compiler warnings in hwloc with --enable-fast
A couple of unused variables when assert does nothing were causing compiler
warnings. Fixed by declaring them as potentially unused.
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-linux.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-linux.c
index 4ac1d8d..5e09731 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-linux.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-linux.c
@@ -2719,7 +2719,7 @@ look_sysfsnode(struct hwloc_topology *topology,
for (index_ = 0; index_ < nbnodes; index_++) {
char nodepath[SYSFS_NUMA_NODE_PATH_LEN];
hwloc_bitmap_t cpuset;
- hwloc_obj_t node, res_obj;
+ hwloc_obj_t node, res_obj __hwloc_attribute_unused;
osnode = indexes[index_];
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml.c
index fd5d7e4..40832a5 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml.c
@@ -1406,7 +1406,7 @@ hwloc_export_obj_userdata_base64(void *reserved,
hwloc__xml_export_state_t state = reserved;
size_t encoded_length;
char *encoded_buffer;
- int ret;
+ int ret __hwloc_attribute_unused;
if (name && hwloc__xml_export_check_buffer(name, strlen(name)) < 0) {
errno = EINVAL;
http://git.mpich.org/mpich.git/commitdiff/4bbeb5222ebce5af9ac7bf6fe5d4f8c17…
commit 4bbeb5222ebce5af9ac7bf6fe5d4f8c17bc47cd5
Author: Antonio J. Pena <apenya(a)mcs.anl.gov>
Date: Mon Nov 18 16:21:35 2013 -0600
Fix warnings in variables only used in assertions
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpi/romio/adio/common/ad_coll_build_req_new.c b/src/mpi/romio/adio/common/ad_coll_build_req_new.c
index 4512153..2ea9754 100644
--- a/src/mpi/romio/adio/common/ad_coll_build_req_new.c
+++ b/src/mpi/romio/adio/common/ad_coll_build_req_new.c
@@ -902,7 +902,6 @@ int ADIOI_Build_client_reqs(ADIO_File fd,
ADIO_Offset *fr_st_off_arr = fd->file_realm_st_offs;
ADIO_Offset *agg_comm_cur_sz_arr = NULL;
MPI_Datatype *fr_type_arr = fd->file_realm_types;
- int cb_node_ct = fd->hints->cb_nodes;
int *agg_ol_ct_arr = NULL;
int *agg_ol_cur_ct_arr = NULL;
int tmp_agg_fr_idx = -1;
@@ -984,7 +983,7 @@ int ADIOI_Build_client_reqs(ADIO_File fd,
for (j = 0; j < nprocs; j++)
{
tmp_agg_fr_idx = ADIOI_Agg_idx(j, fd);
- assert(tmp_agg_fr_idx < cb_node_ct);
+ assert(tmp_agg_fr_idx < fd->hints->cb_nodes);
/* If this process is not an aggregator or we have
* finished all the bytes for this aggregator, move
diff --git a/src/mpi/topo/inhb_allgather.c b/src/mpi/topo/inhb_allgather.c
index 5cd6790..e911408 100644
--- a/src/mpi/topo/inhb_allgather.c
+++ b/src/mpi/topo/inhb_allgather.c
@@ -35,17 +35,14 @@ int MPIR_Ineighbor_allgather_default(const void *sendbuf, int sendcount, MPI_Dat
int indegree, outdegree, weighted;
int k,l;
int *srcs, *dsts;
- int comm_size;
MPI_Aint recvtype_extent;
MPIU_CHKLMEM_DECL(2);
- comm_size = comm_ptr->local_size;
-
MPID_Datatype_get_extent_macro(recvtype, recvtype_extent);
/* This is the largest offset we add to recvbuf */
MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
- (comm_size * recvcount * recvtype_extent));
+ (comm_ptr->local_size * recvcount * recvtype_extent));
mpi_errno = MPIR_Topo_canon_nhb_count(comm_ptr, &indegree, &outdegree, &weighted);
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
diff --git a/src/mpi/topo/inhb_alltoall.c b/src/mpi/topo/inhb_alltoall.c
index 152d33e..1bc1d0e 100644
--- a/src/mpi/topo/inhb_alltoall.c
+++ b/src/mpi/topo/inhb_alltoall.c
@@ -35,21 +35,18 @@ int MPIR_Ineighbor_alltoall_default(const void *sendbuf, int sendcount, MPI_Data
int indegree, outdegree, weighted;
int k,l;
int *srcs, *dsts;
- int comm_size;
MPI_Aint sendtype_extent, recvtype_extent;
MPIU_CHKLMEM_DECL(2);
- comm_size = comm_ptr->local_size;
-
MPID_Datatype_get_extent_macro(sendtype, sendtype_extent);
MPID_Datatype_get_extent_macro(recvtype, recvtype_extent);
/* This is the largest offset we add to sendbuf */
MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
- (comm_size * sendcount * sendtype_extent));
+ (comm_ptr->local_size * sendcount * sendtype_extent));
/* This is the largest offset we add to recvbuf */
MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
- (comm_size * recvcount * recvtype_extent));
+ (comm_ptr->local_size * recvcount * recvtype_extent));
mpi_errno = MPIR_Topo_canon_nhb_count(comm_ptr, &indegree, &outdegree, &weighted);
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
http://git.mpich.org/mpich.git/commitdiff/9665638294c180a9e6cd3aaabb4cbedd9…
commit 9665638294c180a9e6cd3aaabb4cbedd9a73aee8
Author: Antonio J. Pena <apenya(a)mcs.anl.gov>
Date: Mon Nov 18 16:20:05 2013 -0600
Enclose into #ifdef code causing compiler warnings
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpi/datatype/type_match_size.c b/src/mpi/datatype/type_match_size.c
index cebc7e2..4a318e8 100644
--- a/src/mpi/datatype/type_match_size.c
+++ b/src/mpi/datatype/type_match_size.c
@@ -56,7 +56,9 @@ int MPI_Type_match_size(int typeclass, int size, MPI_Datatype *datatype)
{
static const char FCNAME[] = "MPI_Type_match_size";
int mpi_errno = MPI_SUCCESS;
+#ifdef HAVE_ERROR_CHECKING
static const char *tname = 0;
+#endif
/* Note that all of the datatype have values, even if the type is
not available. We test for that case separately. We also
prefer the Fortran types to the C type, if they are available */
@@ -116,7 +118,9 @@ int MPI_Type_match_size(int typeclass, int size, MPI_Datatype *datatype)
case MPI_TYPECLASS_REAL:
{
int nRealTypes = sizeof(real_types) / sizeof(MPI_Datatype);
+#ifdef HAVE_ERROR_CHECKING
tname = "MPI_TYPECLASS_REAL";
+#endif
for (i=0; i<nRealTypes; i++) {
if (real_types[i] == MPI_DATATYPE_NULL) { continue; }
MPIR_Type_size_impl( real_types[i], &tsize );
@@ -130,7 +134,9 @@ int MPI_Type_match_size(int typeclass, int size, MPI_Datatype *datatype)
case MPI_TYPECLASS_INTEGER:
{
int nIntTypes = sizeof(int_types) / sizeof(MPI_Datatype);
+#ifdef HAVE_ERROR_CHECKING
tname = "MPI_TYPECLASS_INTEGER";
+#endif
for (i=0; i<nIntTypes; i++) {
if (int_types[i] == MPI_DATATYPE_NULL) { continue; }
MPIR_Type_size_impl( int_types[i], &tsize );
@@ -144,7 +150,9 @@ int MPI_Type_match_size(int typeclass, int size, MPI_Datatype *datatype)
case MPI_TYPECLASS_COMPLEX:
{
int nComplexTypes = sizeof(complex_types) / sizeof(MPI_Datatype);
+#ifdef HAVE_ERROR_CHECKING
tname = "MPI_TYPECLASS_COMPLEX";
+#endif
for (i=0; i<nComplexTypes; i++) {
if (complex_types[i] == MPI_DATATYPE_NULL) { continue; }
MPIR_Type_size_impl( complex_types[i], &tsize );
http://git.mpich.org/mpich.git/commitdiff/8ea1dfec1f51eae94aeeccc64848762e3…
commit 8ea1dfec1f51eae94aeeccc64848762e312ed0c6
Author: Antonio J. Pena <apenya(a)mcs.anl.gov>
Date: Mon Nov 18 16:17:16 2013 -0600
Fix compiler warnings about variables for assert
Mark those variables exclusively being used for assertions as potentially
unused to avoid compiler warnings when the assertion macro does nothing. These
show up with --enable-fast.
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/include/mpiimplthreadpost.h b/src/include/mpiimplthreadpost.h
index c5cdf47..be4578f 100644
--- a/src/include/mpiimplthreadpost.h
+++ b/src/include/mpiimplthreadpost.h
@@ -180,7 +180,7 @@ MPIU_Thread_CS_yield_lockname_recursive_impl_(enum MPIU_Nest_mutexes kind,
const char *lockname,
MPID_Thread_mutex_t *mutex)
{
- int depth;
+ int depth ATTRIBUTE((unused));
MPIU_THREADPRIV_DECL;
MPIU_THREADPRIV_GET;
depth = MPIU_THREADPRIV_FIELD(lock_depth)[kind];
diff --git a/src/mpi/coll/iallgatherv.c b/src/mpi/coll/iallgatherv.c
index 81e9030..9921146 100644
--- a/src/mpi/coll/iallgatherv.c
+++ b/src/mpi/coll/iallgatherv.c
@@ -36,7 +36,7 @@ int MPIR_Iallgatherv_rec_dbl(const void *sendbuf, int sendcount, MPI_Datatype se
int mask, dst, total_count, position, offset, my_tree_root, dst_tree_root;
MPI_Aint recvtype_extent, recvtype_true_extent, recvtype_true_lb;
void *tmp_buf = NULL;
- int is_homogeneous;
+ int is_homogeneous ATTRIBUTE((unused));
MPIR_SCHED_CHKPMEM_DECL(1);
comm_size = comm_ptr->local_size;
diff --git a/src/mpi/coll/ibcast.c b/src/mpi/coll/ibcast.c
index 3b8e9d6..d23792c 100644
--- a/src/mpi/coll/ibcast.c
+++ b/src/mpi/coll/ibcast.c
@@ -317,7 +317,7 @@ int MPIR_Ibcast_scatter_rec_dbl_allgather(void *buffer, int count, MPI_Datatype
int rank, comm_size, dst;
int relative_rank, mask;
int scatter_size, nbytes, curr_size, incoming_count;
- int type_size, j, k, i, tmp_mask, is_contig, is_homogeneous;
+ int type_size, j, k, i, tmp_mask, is_contig, is_homogeneous ATTRIBUTE((unused));
int relative_dst, dst_tree_root, my_tree_root, send_offset;
int recv_offset, tree_root, nprocs_completed, offset;
MPID_Datatype *dtp;
@@ -556,7 +556,7 @@ int MPIR_Ibcast_scatter_ring_allgather(void *buffer, int count, MPI_Datatype dat
{
int mpi_errno = MPI_SUCCESS;
int comm_size, rank;
- int is_contig, is_homogeneous, type_size, nbytes;
+ int is_contig, is_homogeneous ATTRIBUTE((unused)), type_size, nbytes;
int scatter_size;
int i, j, jnext, left, right;
MPI_Aint true_extent, true_lb;
@@ -755,7 +755,7 @@ fn_fail:
int MPIR_Ibcast_intra(void *buffer, int count, MPI_Datatype datatype, int root, MPID_Comm *comm_ptr, MPID_Sched_t s)
{
int mpi_errno = MPI_SUCCESS;
- int comm_size, is_homogeneous;
+ int comm_size, is_homogeneous ATTRIBUTE((unused));
MPI_Aint type_size, nbytes;
MPIU_Assert(comm_ptr->comm_kind == MPID_INTRACOMM);
diff --git a/src/mpi/coll/ireduce.c b/src/mpi/coll/ireduce.c
index feb9c31..1113e99 100644
--- a/src/mpi/coll/ireduce.c
+++ b/src/mpi/coll/ireduce.c
@@ -226,7 +226,7 @@ fn_fail:
int MPIR_Ireduce_redscat_gather(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPID_Comm *comm_ptr, MPID_Sched_t s)
{
int mpi_errno = MPI_SUCCESS;
- int i, j, comm_size, rank, pof2, is_commutative;
+ int i, j, comm_size, rank, pof2, is_commutative ATTRIBUTE((unused));
int rem, dst, newrank, newdst, mask, send_idx, recv_idx, last_idx;
int send_cnt, recv_cnt, newroot, newdst_tree_root, newroot_tree_root;
void *tmp_buf = NULL;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
index 646471a..3427fcd 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
@@ -1820,7 +1820,7 @@ int MPID_nem_tcp_connpoll(int in_blocking_poll)
int req_errno = MPI_SUCCESS;
ssize_t rc;
char dummy;
- const char *err_str = "UNKNOWN";
+ const char *err_str ATTRIBUTE((unused)) = "UNKNOWN";
/* See if we can get a specific error for this fd
(Stevens Network Programming Vol 1, pg 184) */
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c
index 0287794..f9fad4a 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c
@@ -139,7 +139,7 @@ int MPIDI_CH3I_Seg_commit(MPID_nem_seg_ptr_t memory, int num_local, int local_ra
char *kvs_name;
char *serialized_hnd = NULL;
void *current_addr;
- void *start_addr;
+ void *start_addr ATTRIBUTE((unused));
size_t size_left;
MPIU_CHKPMEM_DECL (1);
MPIU_CHKLMEM_DECL (2);
diff --git a/src/mpid/ch3/src/ch3u_handle_recv_req.c b/src/mpid/ch3/src/ch3u_handle_recv_req.c
index 0b9be5d..e67dfe1 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_req.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_req.c
@@ -19,7 +19,7 @@ static int do_simple_get(MPID_Win *win_ptr, MPIDI_Win_lock_queue *lock_queue);
int MPIDI_CH3U_Handle_recv_req(MPIDI_VC_t * vc, MPID_Request * rreq,
int * complete)
{
- static int in_routine = FALSE;
+ static int in_routine ATTRIBUTE((unused)) = FALSE;
int mpi_errno = MPI_SUCCESS;
int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_HANDLE_RECV_REQ);
diff --git a/src/mpid/ch3/src/ch3u_recvq.c b/src/mpid/ch3/src/ch3u_recvq.c
index e07c0f1..f4f9000 100644
--- a/src/mpid/ch3/src/ch3u_recvq.c
+++ b/src/mpid/ch3/src/ch3u_recvq.c
@@ -805,7 +805,7 @@ MPID_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match,
/* A matching request was not found in the posted queue, so we
need to allocate a new request and add it to the unexpected queue */
{
- int mpi_errno=0;
+ int mpi_errno ATTRIBUTE((unused)) = 0;
MPIDI_Request_create_rreq( rreq, mpi_errno,
found=FALSE;goto lock_exit );
MPIU_Assert(mpi_errno == 0);
diff --git a/src/mpid/common/datatype/dataloop/dataloop_create.c b/src/mpid/common/datatype/dataloop/dataloop_create.c
index 1d9f3d7..5fbeb97 100644
--- a/src/mpid/common/datatype/dataloop/dataloop_create.c
+++ b/src/mpid/common/datatype/dataloop/dataloop_create.c
@@ -23,7 +23,7 @@ void PREPEND_PREFIX(Dataloop_create)(MPI_Datatype type,
int flag)
{
int i;
- int err;
+ int err ATTRIBUTE((unused));
int nr_ints, nr_aints, nr_types, combiner;
MPI_Datatype *types;
diff --git a/src/mpid/common/datatype/mpid_type_debug.c b/src/mpid/common/datatype/mpid_type_debug.c
index 8bd6806..2dc5ceb 100644
--- a/src/mpid/common/datatype/mpid_type_debug.c
+++ b/src/mpid/common/datatype/mpid_type_debug.c
@@ -434,7 +434,7 @@ void MPIDU_Datatype_debug(MPI_Datatype type,
int array_ct)
{
int is_builtin;
- MPID_Datatype *dtp;
+ MPID_Datatype *dtp ATTRIBUTE((unused));
is_builtin = (HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN);
diff --git a/src/mpid/common/datatype/mpir_type_flatten.c b/src/mpid/common/datatype/mpir_type_flatten.c
index 8e9b332..10cdab6 100644
--- a/src/mpid/common/datatype/mpir_type_flatten.c
+++ b/src/mpid/common/datatype/mpir_type_flatten.c
@@ -30,7 +30,7 @@ int MPIR_Type_flatten(MPI_Datatype type,
{
int err;
MPI_Aint first, last;
- MPID_Datatype *datatype_ptr;
+ MPID_Datatype *datatype_ptr ATTRIBUTE((unused));
MPID_Segment *segp;
if (HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN) {
http://git.mpich.org/mpich.git/commitdiff/7a1da4a9dd1c015aeb19d3e60c97af20d…
commit 7a1da4a9dd1c015aeb19d3e60c97af20d4bea0b3
Author: Antonio J. Pena <apenya(a)mcs.anl.gov>
Date: Mon Nov 18 16:09:58 2013 -0600
Fix compiler warnings about unused variables
These only show up with --enable-fast
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpi/attr/comm_free_keyval.c b/src/mpi/attr/comm_free_keyval.c
index 7b325de..6044d37 100644
--- a/src/mpi/attr/comm_free_keyval.c
+++ b/src/mpi/attr/comm_free_keyval.c
@@ -71,7 +71,6 @@ Key values are global (they can be used with any and all communicators)
@*/
int MPI_Comm_free_keyval(int *comm_keyval)
{
- MPID_Keyval *keyval_ptr = NULL;
int mpi_errno = MPI_SUCCESS;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_COMM_FREE_KEYVAL);
@@ -93,14 +92,16 @@ int MPI_Comm_free_keyval(int *comm_keyval)
}
# endif
- /* Convert MPI object handles to object pointers */
- MPID_Keyval_get_ptr( *comm_keyval, keyval_ptr );
-
/* Validate parameters and objects (post conversion) */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS;
{
+ MPID_Keyval *keyval_ptr = NULL;
+
+ /* Convert MPI object handles to object pointers */
+ MPID_Keyval_get_ptr( *comm_keyval, keyval_ptr );
+
MPID_Keyval_valid_ptr( keyval_ptr, mpi_errno );
if (mpi_errno) goto fn_fail;
}
diff --git a/src/mpi/attr/comm_set_attr.c b/src/mpi/attr/comm_set_attr.c
index f30f39c..161154f 100644
--- a/src/mpi/attr/comm_set_attr.c
+++ b/src/mpi/attr/comm_set_attr.c
@@ -109,7 +109,6 @@ int MPIR_CommSetAttr( MPI_Comm comm, int comm_keyval, void *attribute_val,
{
int mpi_errno = MPI_SUCCESS;
MPID_Comm *comm_ptr = NULL;
- MPID_Keyval *keyval_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPIR_COMM_SET_ATTR);
MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -132,17 +131,19 @@ int MPIR_CommSetAttr( MPI_Comm comm, int comm_keyval, void *attribute_val,
/* Convert MPI object handles to object pointers */
MPID_Comm_get_ptr( comm, comm_ptr );
- MPID_Keyval_get_ptr( comm_keyval, keyval_ptr );
/* Validate parameters and objects (post conversion) */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS;
{
+ MPID_Keyval *keyval_ptr = NULL;
+
/* Validate comm_ptr */
MPID_Comm_valid_ptr( comm_ptr, mpi_errno );
/* If comm_ptr is not valid, it will be reset to null */
/* Validate keyval_ptr */
+ MPID_Keyval_get_ptr( comm_keyval, keyval_ptr );
MPID_Keyval_valid_ptr( keyval_ptr, mpi_errno );
if (mpi_errno) goto fn_fail;
}
@@ -217,7 +218,6 @@ int MPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val)
{
int mpi_errno = MPI_SUCCESS;
MPID_Comm *comm_ptr = NULL;
- MPID_Keyval *keyval_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_COMM_SET_ATTR);
MPIU_THREAD_CS_ENTER(ALLFUNC,);
@@ -238,17 +238,19 @@ int MPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val)
/* Convert MPI object handles to object pointers */
MPID_Comm_get_ptr( comm, comm_ptr );
- MPID_Keyval_get_ptr( comm_keyval, keyval_ptr );
/* Validate parameters and objects (post conversion) */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS;
{
+ MPID_Keyval *keyval_ptr = NULL;
+
/* Validate comm_ptr */
MPID_Comm_valid_ptr( comm_ptr, mpi_errno );
/* If comm_ptr is not valid, it will be reset to null */
/* Validate keyval_ptr */
+ MPID_Keyval_get_ptr( comm_keyval, keyval_ptr );
MPID_Keyval_valid_ptr( keyval_ptr, mpi_errno );
if (mpi_errno) goto fn_fail;
}
diff --git a/src/mpi/attr/keyval_free.c b/src/mpi/attr/keyval_free.c
index acfe38a..fa700fe 100644
--- a/src/mpi/attr/keyval_free.c
+++ b/src/mpi/attr/keyval_free.c
@@ -57,7 +57,6 @@ int MPI_Keyval_free(int *keyval)
{
static const char FCNAME[] = "MPI_Keyval_free";
int mpi_errno = MPI_SUCCESS;
- MPID_Keyval *keyval_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_KEYVAL_FREE);
MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -74,14 +73,16 @@ int MPI_Keyval_free(int *keyval)
}
# endif /* HAVE_ERROR_CHECKING */
- /* Convert MPI object handles to object pointers */
- MPID_Keyval_get_ptr( *keyval, keyval_ptr );
-
/* Validate parameters and objects (post conversion) */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS;
{
+ MPID_Keyval *keyval_ptr = NULL;
+
+ /* Convert MPI object handles to object pointers */
+ MPID_Keyval_get_ptr( *keyval, keyval_ptr );
+
MPID_Keyval_valid_ptr( keyval_ptr, mpi_errno );
if (mpi_errno) goto fn_fail;
}
diff --git a/src/mpi/datatype/get_elements.c b/src/mpi/datatype/get_elements.c
index 3c47a31..e02b5b3 100644
--- a/src/mpi/datatype/get_elements.c
+++ b/src/mpi/datatype/get_elements.c
@@ -57,7 +57,6 @@ int MPI_Get_elements(const MPI_Status *status, MPI_Datatype datatype, int *count
{
int mpi_errno = MPI_SUCCESS;
MPI_Count count_x;
- MPID_Datatype *datatype_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_GET_ELEMENTS);
@@ -76,16 +75,17 @@ int MPI_Get_elements(const MPI_Status *status, MPI_Datatype datatype, int *count
}
# endif
- /* Convert MPI object handles to object pointers */
- MPID_Datatype_get_ptr(datatype, datatype_ptr);
-
/* Validate parameters and objects (post conversion) */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS;
{
+ MPID_Datatype *datatype_ptr = NULL;
+
MPIR_ERRTEST_ARGNULL(status, "status", mpi_errno);
MPIR_ERRTEST_ARGNULL(count, "count", mpi_errno);
+ /* Convert MPI object handles to object pointers */
+ MPID_Datatype_get_ptr(datatype, datatype_ptr);
/* Validate datatype_ptr */
if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
MPID_Datatype_get_ptr(datatype, datatype_ptr);
diff --git a/src/mpi/datatype/pack_external_size.c b/src/mpi/datatype/pack_external_size.c
index 721a64f..cb0f797 100644
--- a/src/mpi/datatype/pack_external_size.c
+++ b/src/mpi/datatype/pack_external_size.c
@@ -57,7 +57,6 @@ int MPI_Pack_external_size(const char datarep[],
MPI_Aint *size)
{
int mpi_errno = MPI_SUCCESS;
- MPID_Datatype *datatype_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_PACK_EXTERNAL_SIZE);
MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -76,14 +75,16 @@ int MPI_Pack_external_size(const char datarep[],
}
# endif
- /* Convert MPI object handles to object pointers */
- MPID_Datatype_get_ptr(datatype, datatype_ptr);
-
/* Validate parameters and objects (post conversion) */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS;
{
+ MPID_Datatype *datatype_ptr = NULL;
+
+ /* Convert MPI object handles to object pointers */
+ MPID_Datatype_get_ptr(datatype, datatype_ptr);
+
/* Validate datatype_ptr */
MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
/* If datatype_ptr is not valid, it will be reset to null */
diff --git a/src/mpi/datatype/pack_size.c b/src/mpi/datatype/pack_size.c
index a4ef60a..a705c9e 100644
--- a/src/mpi/datatype/pack_size.c
+++ b/src/mpi/datatype/pack_size.c
@@ -74,7 +74,9 @@ int MPI_Pack_size(int incount,
MPI_Comm comm,
int *size)
{
+#ifdef HAVE_ERROR_CHECKING
MPID_Comm *comm_ptr = NULL;
+#endif
int mpi_errno = MPI_SUCCESS;
MPI_Aint size_x = MPI_UNDEFINED;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_PACK_SIZE);
@@ -94,11 +96,11 @@ int MPI_Pack_size(int incount,
}
# endif /* HAVE_ERROR_CHECKING */
- /* Convert MPI object handles to object pointers */
- MPID_Comm_get_ptr( comm, comm_ptr );
-
# ifdef HAVE_ERROR_CHECKING
{
+ /* Convert MPI object handles to object pointers */
+ MPID_Comm_get_ptr( comm, comm_ptr );
+
MPID_BEGIN_ERROR_CHECKS;
{
MPID_Datatype *datatype_ptr = NULL;
diff --git a/src/mpi/datatype/type_commit.c b/src/mpi/datatype/type_commit.c
index cba1fcd..90d7284 100644
--- a/src/mpi/datatype/type_commit.c
+++ b/src/mpi/datatype/type_commit.c
@@ -72,7 +72,6 @@ Input Parameters:
int MPI_Type_commit(MPI_Datatype *datatype)
{
int mpi_errno = MPI_SUCCESS;
- MPID_Datatype *datatype_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_COMMIT);
MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -92,14 +91,16 @@ int MPI_Type_commit(MPI_Datatype *datatype)
}
# endif
- /* Convert MPI object handles to object pointers */
- MPID_Datatype_get_ptr( *datatype, datatype_ptr );
-
/* Validate parameters and objects (post conversion) */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS;
{
+ MPID_Datatype *datatype_ptr = NULL;
+
+ /* Convert MPI object handles to object pointers */
+ MPID_Datatype_get_ptr( *datatype, datatype_ptr );
+
/* Validate datatype_ptr */
MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/datatype/type_create_subarray.c b/src/mpi/datatype/type_create_subarray.c
index 728766c..4a61b66 100644
--- a/src/mpi/datatype/type_create_subarray.c
+++ b/src/mpi/datatype/type_create_subarray.c
@@ -80,7 +80,6 @@ int MPI_Type_create_subarray(int ndims,
int *ints;
MPID_Datatype *new_dtp;
- MPID_Datatype *datatype_ptr = NULL;
MPIU_CHKLMEM_DECL(1);
MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_CREATE_SUBARRAY);
@@ -89,12 +88,12 @@ int MPI_Type_create_subarray(int ndims,
MPIU_THREAD_CS_ENTER(ALLFUNC,);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_CREATE_SUBARRAY);
- /* Get handles to MPI objects. */
- MPID_Datatype_get_ptr(oldtype, datatype_ptr);
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS;
{
+ MPID_Datatype *datatype_ptr = NULL;
+
/* Check parameters */
MPIR_ERRTEST_ARGNONPOS(ndims, "ndims", mpi_errno, MPI_ERR_DIMS);
MPIR_ERRTEST_ARGNULL(array_of_sizes, "array_of_sizes", mpi_errno);
@@ -166,6 +165,9 @@ int MPI_Type_create_subarray(int ndims,
goto fn_fail;
}
+ /* Get handles to MPI objects. */
+ MPID_Datatype_get_ptr(oldtype, datatype_ptr);
+
/* Validate datatype_ptr */
MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
/* If datatype_ptr is not valid, it will be reset to null */
diff --git a/src/mpi/datatype/type_extent.c b/src/mpi/datatype/type_extent.c
index 8d1fd71..1ef9eb7 100644
--- a/src/mpi/datatype/type_extent.c
+++ b/src/mpi/datatype/type_extent.c
@@ -52,7 +52,6 @@ The replacement for this routine is 'MPI_Type_get_extent'.
int MPI_Type_extent(MPI_Datatype datatype, MPI_Aint *extent)
{
int mpi_errno = MPI_SUCCESS;
- MPID_Datatype *datatype_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_EXTENT);
MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -70,14 +69,16 @@ int MPI_Type_extent(MPI_Datatype datatype, MPI_Aint *extent)
}
# endif
- /* Convert MPI object handles to object pointers */
- MPID_Datatype_get_ptr(datatype, datatype_ptr);
-
/* Validate parameters and objects (post conversion) */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS;
{
+ MPID_Datatype *datatype_ptr = NULL;
+
+ /* Convert MPI object handles to object pointers */
+ MPID_Datatype_get_ptr(datatype, datatype_ptr);
+
/* Validate datatype_ptr */
MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/datatype/type_free.c b/src/mpi/datatype/type_free.c
index 45b5784..b8d8170 100644
--- a/src/mpi/datatype/type_free.c
+++ b/src/mpi/datatype/type_free.c
@@ -71,7 +71,6 @@ it clear that it is an error to free a null datatype.
int MPI_Type_free(MPI_Datatype *datatype)
{
int mpi_errno = MPI_SUCCESS;
- MPID_Datatype *datatype_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_FREE);
MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -91,14 +90,13 @@ int MPI_Type_free(MPI_Datatype *datatype)
}
# endif
- /* Validate parameters, especially handles needing to be converted */
- MPID_Datatype_get_ptr( *datatype, datatype_ptr );
-
/* Convert MPI object handles to object pointers */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS;
{
+ MPID_Datatype *datatype_ptr = NULL;
+
/* Check for built-in type */
if (HANDLE_GET_KIND(*datatype) == HANDLE_KIND_BUILTIN) {
mpi_errno = MPIR_Err_create_code(MPI_SUCCESS,
@@ -125,6 +123,9 @@ int MPI_Type_free(MPI_Datatype *datatype)
"**dtypeperm", 0);
goto fn_fail;
}
+ /* Validate parameters, especially handles needing to be converted */
+ MPID_Datatype_get_ptr( *datatype, datatype_ptr );
+
/* Validate datatype_ptr */
MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/datatype/type_get_contents.c b/src/mpi/datatype/type_get_contents.c
index 7813167..279f416 100644
--- a/src/mpi/datatype/type_get_contents.c
+++ b/src/mpi/datatype/type_get_contents.c
@@ -59,7 +59,6 @@ int MPI_Type_get_contents(MPI_Datatype datatype,
{
static const char FCNAME[] = "MPI_Type_get_contents";
int mpi_errno = MPI_SUCCESS;
- MPID_Datatype *datatype_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_GET_CONTENTS);
MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -78,14 +77,13 @@ int MPI_Type_get_contents(MPI_Datatype datatype,
}
# endif
- /* Convert MPI object handles to object pointers */
- MPID_Datatype_get_ptr(datatype, datatype_ptr);
-
/* Validate parameters and objects (post conversion) */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS;
{
+ MPID_Datatype *datatype_ptr = NULL;
+
/* Check for built-in type */
if (HANDLE_GET_KIND(datatype) == HANDLE_KIND_BUILTIN) {
mpi_errno = MPIR_Err_create_code(MPI_SUCCESS,
@@ -113,6 +111,9 @@ int MPI_Type_get_contents(MPI_Datatype datatype,
goto fn_fail;
}
+ /* Convert MPI object handles to object pointers */
+ MPID_Datatype_get_ptr(datatype, datatype_ptr);
+
/* Validate datatype_ptr */
MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
/* If comm_ptr is not value, it will be reset to null */
diff --git a/src/mpi/datatype/type_get_envelope.c b/src/mpi/datatype/type_get_envelope.c
index 27f5365..1c94153 100644
--- a/src/mpi/datatype/type_get_envelope.c
+++ b/src/mpi/datatype/type_get_envelope.c
@@ -90,7 +90,6 @@ int MPI_Type_get_envelope(MPI_Datatype datatype,
int *combiner)
{
int mpi_errno = MPI_SUCCESS;
- MPID_Datatype *datatype_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_GET_ENVELOPE);
MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -108,14 +107,16 @@ int MPI_Type_get_envelope(MPI_Datatype datatype,
}
# endif
- /* Convert MPI object handles to object pointers */
- MPID_Datatype_get_ptr( datatype, datatype_ptr );
-
/* Validate parameters and objects (post conversion) */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS;
{
+ MPID_Datatype *datatype_ptr = NULL;
+
+ /* Convert MPI object handles to object pointers */
+ MPID_Datatype_get_ptr( datatype, datatype_ptr );
+
/* Validate datatype_ptr */
MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
/* If comm_ptr is not value, it will be reset to null */
diff --git a/src/mpi/datatype/type_get_extent.c b/src/mpi/datatype/type_get_extent.c
index 4e68ab2..c3d3bc6 100644
--- a/src/mpi/datatype/type_get_extent.c
+++ b/src/mpi/datatype/type_get_extent.c
@@ -64,7 +64,6 @@ Output Parameters:
int MPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint *lb, MPI_Aint *extent)
{
int mpi_errno = MPI_SUCCESS;
- MPID_Datatype *datatype_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_GET_EXTENT);
MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -82,14 +81,16 @@ int MPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint *lb, MPI_Aint *extent)
}
# endif
- /* Convert MPI object handles to object pointers */
- MPID_Datatype_get_ptr(datatype, datatype_ptr);
-
/* Validate parameters and objects (post conversion) */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS;
{
+ MPID_Datatype *datatype_ptr = NULL;
+
+ /* Convert MPI object handles to object pointers */
+ MPID_Datatype_get_ptr(datatype, datatype_ptr);
+
/* Validate datatype_ptr */
MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/datatype/type_get_true_extent.c b/src/mpi/datatype/type_get_true_extent.c
index 0f59ff4..d0d0093 100644
--- a/src/mpi/datatype/type_get_true_extent.c
+++ b/src/mpi/datatype/type_get_true_extent.c
@@ -66,7 +66,6 @@ int MPI_Type_get_true_extent(MPI_Datatype datatype, MPI_Aint *true_lb,
MPI_Aint *true_extent)
{
int mpi_errno = MPI_SUCCESS;
- MPID_Datatype *datatype_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_GET_TRUE_EXTENT);
MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -84,14 +83,16 @@ int MPI_Type_get_true_extent(MPI_Datatype datatype, MPI_Aint *true_lb,
}
# endif
- /* Convert MPI object handles to object pointers */
- MPID_Datatype_get_ptr(datatype, datatype_ptr);
-
/* Validate parameters and objects (post conversion) */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS;
{
+ MPID_Datatype *datatype_ptr = NULL;
+
+ /* Convert MPI object handles to object pointers */
+ MPID_Datatype_get_ptr(datatype, datatype_ptr);
+
/* Validate datatype_ptr */
MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/datatype/type_lb.c b/src/mpi/datatype/type_lb.c
index c9fba78..09935b2 100644
--- a/src/mpi/datatype/type_lb.c
+++ b/src/mpi/datatype/type_lb.c
@@ -69,7 +69,6 @@ The replacement for this routine is 'MPI_Type_Get_extent'.
int MPI_Type_lb(MPI_Datatype datatype, MPI_Aint *displacement)
{
int mpi_errno = MPI_SUCCESS;
- MPID_Datatype *datatype_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_LB);
MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -87,14 +86,16 @@ int MPI_Type_lb(MPI_Datatype datatype, MPI_Aint *displacement)
}
# endif
- /* Convert MPI object handles to object pointers */
- MPID_Datatype_get_ptr(datatype, datatype_ptr);
-
/* Validate parameters and objects (post conversion) */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS;
{
+ MPID_Datatype *datatype_ptr = NULL;
+
+ /* Convert MPI object handles to object pointers */
+ MPID_Datatype_get_ptr(datatype, datatype_ptr);
+
/* Validate datatype_ptr */
MPID_Datatype_valid_ptr(datatype_ptr, mpi_errno);
if (mpi_errno) goto fn_fail;
diff --git a/src/mpi/datatype/type_size.c b/src/mpi/datatype/type_size.c
index 4983c7d..c1e57c5 100644
--- a/src/mpi/datatype/type_size.c
+++ b/src/mpi/datatype/type_size.c
@@ -52,7 +52,6 @@ Output Parameters:
int MPI_Type_size(MPI_Datatype datatype, int *size)
{
int mpi_errno = MPI_SUCCESS;
- MPID_Datatype *datatype_ptr = NULL;
MPI_Count size_x = MPI_UNDEFINED;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_SIZE);
@@ -78,14 +77,16 @@ int MPI_Type_size(MPI_Datatype datatype, int *size)
goto fn_exit;
}
- /* Convert MPI object handles to object pointers */
- MPID_Datatype_get_ptr( datatype, datatype_ptr );
-
/* Validate parameters and objects (post conversion) */
# ifdef HAVE_ERROR_CHECKING
{
MPID_BEGIN_ERROR_CHECKS;
{
+ MPID_Datatype *datatype_ptr = NULL;
+
+ /* Convert MPI object handles to object pointers */
+ MPID_Datatype_get_ptr( datatype, datatype_ptr );
+
/* Validate datatype_ptr */
MPID_Datatype_valid_ptr( datatype_ptr, mpi_errno );
if (mpi_errno) goto fn_fail;
http://git.mpich.org/mpich.git/commitdiff/44aa78991748cd20399f0e987d4c98e4a…
commit 44aa78991748cd20399f0e987d4c98e4a473e81c
Author: Antonio J. Pena <apenya(a)mcs.anl.gov>
Date: Fri Nov 15 17:39:46 2013 -0600
Fix warnings in initcxx.cxx with Portland compiler
Fixes the following warnings:
"src/binding/cxx/initcxx.cxx", line 444: warning: missing return statement at
end of non-void function "MPI::MPIR_Comm_delete_attr_cxx_proxy"
"src/binding/cxx/initcxx.cxx", line 496: warning: missing return statement at
end of non-void function "MPI::MPIR_Comm_copy_attr_cxx_proxy"
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/binding/cxx/buildiface b/src/binding/cxx/buildiface
index c6d2ebc..88ee212 100755
--- a/src/binding/cxx/buildiface
+++ b/src/binding/cxx/buildiface
@@ -2394,7 +2394,11 @@ if ($do_DistGraphComm) {
}
EOT
}
-
+else {
+ print $OUTFD <<EOT;
+ else return MPI_ERR_INTERN;
+EOT
+}
print $OUTFD <<EOT;
}
static
@@ -2459,6 +2463,11 @@ else
}
EOT
}
+else {
+ print $OUTFD <<EOT;
+ else return MPI_ERR_INTERN;
+EOT
+}
print $OUTFD <<EOT;
}
http://git.mpich.org/mpich.git/commitdiff/6ca3ae6c359b734555eb4eb1d325b16c3…
commit 6ca3ae6c359b734555eb4eb1d325b16c32a0da9b
Author: Antonio J. Pena <apenya(a)mcs.anl.gov>
Date: Fri Nov 15 17:37:49 2013 -0600
Fix warnings in initcxx.cxx with Portland compiler
Fixes the following warnings:
"src/binding/cxx/initcxx.cxx", line 721: warning: variable "err" was set but
never used
"src/binding/cxx/initcxx.cxx", line 745: warning: variable "err" was set but
never used
"src/binding/cxx/initcxx.cxx", line 770: warning: variable "err" was set but
never used
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/binding/cxx/buildiface b/src/binding/cxx/buildiface
index af42e5d..c6d2ebc 100755
--- a/src/binding/cxx/buildiface
+++ b/src/binding/cxx/buildiface
@@ -2706,7 +2706,6 @@ Errhandler Win::Create_errhandler( Errhandler_function *f )
// cover the ERRORS_THROW_EXCEPTIONS case.
void Comm::Call_errhandler( int errorcode ) const
{
- int err;
// we must free the Errhandler object returned from Get_errhandler because
// Get_errhandler adds a reference (the MPI Standard says as though a new
// object were created)
@@ -2725,12 +2724,11 @@ void Comm::Call_errhandler( int errorcode ) const
else {
current.Free();
}
- err = MPI_Comm_call_errhandler( (MPI_Comm) the_real_comm, errorcode );
+ MPI_Comm_call_errhandler( (MPI_Comm) the_real_comm, errorcode );
}
void Win::Call_errhandler( int errorcode ) const
{
- int err;
// we must free the Errhandler object returned from Get_errhandler because
// Get_errhandler adds a reference (the MPI Standard says as though a new
// object were created)
@@ -2749,13 +2747,12 @@ void Win::Call_errhandler( int errorcode ) const
else {
current.Free();
}
- err = MPI_Win_call_errhandler( (MPI_Win) the_real_win, errorcode );
+ MPI_Win_call_errhandler( (MPI_Win) the_real_win, errorcode );
}
#ifdef MPI_MODE_RDONLY
void File::Call_errhandler( int errorcode ) const
{
- int err;
// we must free the Errhandler object returned from Get_errhandler because
// Get_errhandler adds a reference (the MPI Standard says as though a new
// object were created)
@@ -2768,7 +2765,7 @@ void File::Call_errhandler( int errorcode ) const
else {
current.Free();
}
- err = MPI_File_call_errhandler( (MPI_File) the_real_file, errorcode );
+ MPI_File_call_errhandler( (MPI_File) the_real_file, errorcode );
}
#endif // IO
http://git.mpich.org/mpich.git/commitdiff/2225f092efe8b8836d8a2c6292fb6dd45…
commit 2225f092efe8b8836d8a2c6292fb6dd456a39ef3
Author: Antonio J. Pena <apenya(a)mcs.anl.gov>
Date: Wed Nov 6 16:30:15 2013 -0600
Fix compiler warning in socksm.c
Fixes the following warnings when compiling socksm.c with --enable-strict:
src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c: In function
'alloc_sc_plfd_tbls':
src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c:183:5: warning: the
comparison will always evaluate as 'true' for the address of
'MPID_nem_tcp_g_lstn_sc' will never be NULL [-Waddress]
src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c:184:5: warning: the
comparison will always evaluate as 'true' for the address of
'MPID_nem_tcp_g_lstn_plfd' will never be NULL [-Waddress]
Reported in ticket #1966
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
index 9269b5a..646471a 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
@@ -180,8 +180,8 @@ static int alloc_sc_plfd_tbls (void)
if (mpi_errno != MPI_SUCCESS) MPIU_ERR_POP (mpi_errno);
MPIU_Assert(0 == idx); /* assumed in other parts of this file */
- MPIU_Memcpy (&g_sc_tbl[idx], &MPID_nem_tcp_g_lstn_sc, sizeof(MPID_nem_tcp_g_lstn_sc));
- MPIU_Memcpy (&MPID_nem_tcp_plfd_tbl[idx], &MPID_nem_tcp_g_lstn_plfd, sizeof(MPID_nem_tcp_g_lstn_plfd));
+ MPIUI_Memcpy (&g_sc_tbl[idx], &MPID_nem_tcp_g_lstn_sc, sizeof(MPID_nem_tcp_g_lstn_sc));
+ MPIUI_Memcpy (&MPID_nem_tcp_plfd_tbl[idx], &MPID_nem_tcp_g_lstn_plfd, sizeof(MPID_nem_tcp_g_lstn_plfd));
MPIU_Assert(MPID_nem_tcp_plfd_tbl[idx].fd == g_sc_tbl[idx].fd);
MPIU_Assert(MPID_nem_tcp_plfd_tbl[idx].events == POLLIN);
http://git.mpich.org/mpich.git/commitdiff/583e3f0a8f0e9d8acaaea2de4722110c7…
commit 583e3f0a8f0e9d8acaaea2de4722110c78c8e32b
Author: Antonio J. Pena <apenya(a)mcs.anl.gov>
Date: Wed Nov 6 16:23:42 2013 -0600
Fix warnings in ch3u_rma_acc_ops and ch3u_rma_ops
Fixes the following warnings (with --enable-strict):
src/mpid/ch3/src/ch3u_rma_acc_ops.c: In function 'MPIDI_Get_accumulate':
src/mpid/ch3/src/ch3u_rma_acc_ops.c:31:5: warning: unused variable
'mpiu_chklmem_stk_sz_' [-Wunused-variable]
src/mpid/ch3/src/ch3u_rma_ops.c: In function 'MPIDI_Accumulate':
src/mpid/ch3/src/ch3u_rma_ops.c:350:5: warning: unused variable
'mpiu_chklmem_stk_sz_' [-Wunused-variable]
See ticket #1966
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/src/ch3u_rma_acc_ops.c b/src/mpid/ch3/src/ch3u_rma_acc_ops.c
index 5e8005e..cc5ec8f 100644
--- a/src/mpid/ch3/src/ch3u_rma_acc_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_acc_ops.c
@@ -26,7 +26,6 @@ int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPID_Datatype *dtp;
MPIDI_VC_t *orig_vc, *target_vc;
- MPIU_CHKLMEM_DECL(2);
MPIDI_STATE_DECL(MPID_STATE_MPIDI_GET_ACCUMULATE);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_GET_ACCUMULATE);
@@ -121,7 +120,6 @@ int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
}
fn_exit:
- MPIU_CHKLMEM_FREEALL();
MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_GET_ACCUMULATE);
return mpi_errno;
diff --git a/src/mpid/ch3/src/ch3u_rma_ops.c b/src/mpid/ch3/src/ch3u_rma_ops.c
index 64dc836..eda8201 100644
--- a/src/mpid/ch3/src/ch3u_rma_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_ops.c
@@ -345,7 +345,6 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPID_Datatype *dtp;
MPIDI_VC_t *orig_vc, *target_vc;
- MPIU_CHKLMEM_DECL(2);
MPIDI_STATE_DECL(MPID_STATE_MPIDI_ACCUMULATE);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_ACCUMULATE);
@@ -453,7 +452,6 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
}
fn_exit:
- MPIU_CHKLMEM_FREEALL();
MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_ACCUMULATE);
return mpi_errno;
-----------------------------------------------------------------------
Summary of changes:
src/binding/cxx/buildiface | 20 +++++++++++++-------
src/include/mpiimplthreadpost.h | 2 +-
src/mpi/attr/comm_free_keyval.c | 9 +++++----
src/mpi/attr/comm_set_attr.c | 10 ++++++----
src/mpi/attr/keyval_free.c | 9 +++++----
src/mpi/coll/iallgatherv.c | 2 +-
src/mpi/coll/ibcast.c | 6 +++---
src/mpi/coll/ireduce.c | 2 +-
src/mpi/datatype/get_elements.c | 8 ++++----
src/mpi/datatype/pack_external_size.c | 9 +++++----
src/mpi/datatype/pack_size.c | 8 +++++---
src/mpi/datatype/type_commit.c | 9 +++++----
src/mpi/datatype/type_create_subarray.c | 8 +++++---
src/mpi/datatype/type_extent.c | 9 +++++----
src/mpi/datatype/type_free.c | 9 +++++----
src/mpi/datatype/type_get_contents.c | 9 +++++----
src/mpi/datatype/type_get_envelope.c | 9 +++++----
src/mpi/datatype/type_get_extent.c | 9 +++++----
src/mpi/datatype/type_get_true_extent.c | 9 +++++----
src/mpi/datatype/type_lb.c | 9 +++++----
src/mpi/datatype/type_match_size.c | 8 ++++++++
src/mpi/datatype/type_size.c | 9 +++++----
src/mpi/romio/adio/common/ad_coll_build_req_new.c | 3 +--
src/mpi/topo/inhb_allgather.c | 5 +----
src/mpi/topo/inhb_alltoall.c | 7 ++-----
src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c | 6 +++---
src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c | 2 +-
src/mpid/ch3/src/ch3u_handle_recv_req.c | 2 +-
src/mpid/ch3/src/ch3u_recvq.c | 2 +-
src/mpid/ch3/src/ch3u_rma_acc_ops.c | 2 --
src/mpid/ch3/src/ch3u_rma_ops.c | 2 --
.../common/datatype/dataloop/dataloop_create.c | 2 +-
src/mpid/common/datatype/mpid_type_debug.c | 2 +-
src/mpid/common/datatype/mpir_type_flatten.c | 2 +-
.../tools/topo/hwloc/hwloc/src/topology-linux.c | 2 +-
.../tools/topo/hwloc/hwloc/src/topology-xml.c | 2 +-
36 files changed, 122 insertions(+), 101 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1rc2-112-g3c37766
by noreply@mpich.org 29 Dec '13
by noreply@mpich.org 29 Dec '13
29 Dec '13
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 3c37766610b0d89b69b4b21b7053696c4efbfa3f (commit)
from 477d83fbd4e90a536f5cba01b624cb179f8a6e86 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/3c37766610b0d89b69b4b21b7053696c4…
commit 3c37766610b0d89b69b4b21b7053696c4efbfa3f
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Tue Nov 26 11:10:05 2013 -0600
corrections to weak alias test
Test all compilers, not just gcc. Use nesting safe push/pop flag
macros.
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/confdb/aclocal_cc.m4 b/confdb/aclocal_cc.m4
index f8146e1..f73aa4c 100644
--- a/confdb/aclocal_cc.m4
+++ b/confdb/aclocal_cc.m4
@@ -361,18 +361,13 @@ pac_cv_attr_weak_import=yes,pac_cv_attr_weak_import=no)])
# Check if the alias option for weak attributes is allowed
AC_CACHE_CHECK([whether __attribute__((weak,alias(...))) allowed],
pac_cv_attr_weak_alias,[
-# We add -Werror if it's gcc to force an error exit if the weak attribute
-# isn't understood
-if test $GCC = yes ; then
- save_CFLAGS=$CFLAGS
- CFLAGS=-Werror
-fi
+PAC_PUSH_FLAG([CFLAGS])
+# force an error exit if the weak attribute isn't understood
+CFLAGS=-Werror
AC_TRY_COMPILE([int foo(int) __attribute__((weak,alias("__foo")));],[int a;],
pac_cv_attr_weak_alias=yes,pac_cv_attr_weak_alias=no)
# Restore original CFLAGS
-if test $GCC = yes ; then
- CFLAGS=$save_CFLAGS
-fi])
+PAC_POP_FLAG([CFLAGS])])
if test "$pac_cv_attr_weak_alias" = "yes" ; then
AC_DEFINE(HAVE_WEAK_ATTRIBUTE,1,[Attribute style weak pragma])
fi
-----------------------------------------------------------------------
Summary of changes:
confdb/aclocal_cc.m4 | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1rc2-111-g477d83f
by noreply@mpich.org 29 Dec '13
by noreply@mpich.org 29 Dec '13
29 Dec '13
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 477d83fbd4e90a536f5cba01b624cb179f8a6e86 (commit)
via 809977529103625095d6a6614ead747d608af4ed (commit)
from 0bc9871d9318a6b53c68a58648868de797685cb2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/477d83fbd4e90a536f5cba01b624cb179…
commit 477d83fbd4e90a536f5cba01b624cb179f8a6e86
Author: Sameh Sharkawi <sssharka(a)us.ibm.com>
Date: Sat Aug 17 00:30:51 2013 -0400
Allow env variables to control memory initialization.
Signed-off-by: Charles Archer <archerc(a)us.ibm.com>
Signed-off-by: Michael Blocksome <blocksom(a)us.ibm.com>
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpl/src/mpltrmem.c b/src/mpl/src/mpltrmem.c
index 6a04f86..e91a215 100644
--- a/src/mpl/src/mpltrmem.c
+++ b/src/mpl/src/mpltrmem.c
@@ -120,6 +120,7 @@ static unsigned char TRDefaultByte = 0xda;
static unsigned char TRFreedByte = 0xfc;
#define MAX_TR_STACK 20
static int TRdebugLevel = 0;
+static int TRSetBytes = 0;
#define TR_MALLOC 0x1
#define TR_FREE 0x2
@@ -164,6 +165,10 @@ void MPL_trinit(int rank)
* variables */
/* these should properly only be "MPL_" parameters, but for backwards
* compatibility we also support "MPICH_" parameters. */
+ s = getenv("MPICH_TRMEM_INIT");
+ if (s && *s && (strcmp(s, "YES") == 0 || strcmp(s, "yes") == 0)) {
+ TRSetBytes = 1;
+ }
s = getenv("MPICH_TRMEM_VALIDATE");
if (s && *s && (strcmp(s, "YES") == 0 || strcmp(s, "yes") == 0)) {
TRdebugLevel = 1;
@@ -173,6 +178,10 @@ void MPL_trinit(int rank)
TRDefaultByte = 0;
TRFreedByte = 0;
}
+ s = getenv("MPL_TRMEM_INIT");
+ if (s && *s && (strcmp(s, "YES") == 0 || strcmp(s, "yes") == 0)) {
+ TRSetBytes = 1;
+ }
s = getenv("MPL_TRMEM_VALIDATE");
if (s && *s && (strcmp(s, "YES") == 0 || strcmp(s, "yes") == 0)) {
TRdebugLevel = 1;
@@ -232,7 +241,9 @@ void *MPL_trmalloc(size_t a, int lineno, const char fname[])
if (!new)
goto fn_exit;
- memset(new, TRDefaultByte, nsize + sizeof(TrSPACE) + sizeof(unsigned long));
+ if(TRSetBytes)
+ memset(new, TRDefaultByte, nsize + sizeof(TrSPACE) + sizeof(unsigned long));
+
/* Cast to (void*) to avoid false warnings about alignment issues */
head = (TRSPACE *) (void *)new;
new += sizeof(TrSPACE);
@@ -433,7 +444,8 @@ void MPL_trfree(void *a_ptr, int line, const char file[])
* them then our memset will elicit "invalid write" errors from
* valgrind. Mark it as accessible but undefined here to prevent this. */
MPL_VG_MAKE_MEM_UNDEFINED((char *)a_ptr + 2 * sizeof(int), nset);
- memset((char *)a_ptr + 2 * sizeof(int), TRFreedByte, nset);
+ if(TRSetBytes)
+ memset((char *)a_ptr + 2 * sizeof(int), TRFreedByte, nset);
}
free(head);
}
http://git.mpich.org/mpich.git/commitdiff/809977529103625095d6a6614ead747d6…
commit 809977529103625095d6a6614ead747d608af4ed
Author: Sameh Sharkawi <sssharka(a)us.ibm.com>
Date: Sat Aug 17 00:30:51 2013 -0400
Debug lib memory tracing signature
(ibm) D192180: Changing MPIU_Malloc size from unsigned to size_t
Signed-off-by: Charles Archer <archerc(a)us.ibm.com>
Signed-off-by: Michael Blocksome <blocksom(a)us.ibm.com>
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/include/mpimem.h b/src/include/mpimem.h
index 59e965d..a217e8b 100644
--- a/src/include/mpimem.h
+++ b/src/include/mpimem.h
@@ -145,7 +145,7 @@ void MPIU_trinit(int);
void *MPIU_trmalloc(size_t, int, const char []);
void MPIU_trfree(void *, int, const char []);
int MPIU_trvalid(const char []);
-void MPIU_trspace(int *, int *);
+void MPIU_trspace(size_t *, size_t *);
void MPIU_trid(int);
void MPIU_trlevel(int);
void MPIU_trDebugLevel(int);
diff --git a/src/mpl/include/mpltrmem.h b/src/mpl/include/mpltrmem.h
index 1f2349b..4253bac 100644
--- a/src/mpl/include/mpltrmem.h
+++ b/src/mpl/include/mpltrmem.h
@@ -16,7 +16,7 @@ void *MPL_trmalloc(size_t, int, const char[]);
void MPL_trfree(void *, int, const char[]);
int MPL_trvalid(const char[]);
int MPL_trvalid2(const char[],int,const char[]);
-void MPL_trspace(int *, int *);
+void MPL_trspace(size_t *, size_t *);
void MPL_trid(int);
void MPL_trlevel(int);
void MPL_trDebugLevel(int);
diff --git a/src/mpl/src/mpltrmem.c b/src/mpl/src/mpltrmem.c
index 9d0d919..6a04f86 100644
--- a/src/mpl/src/mpltrmem.c
+++ b/src/mpl/src/mpltrmem.c
@@ -561,13 +561,13 @@ int MPL_trvalid2(const char str[], int line, const char file[] )
. space - number of bytes currently allocated
. frags - number of blocks currently allocated
+*/
-void MPL_trspace(int *space, int *fr)
+void MPL_trspace(size_t *space, size_t *fr)
{
/* We use ints because systems without prototypes will usually
* allow calls with ints instead of longs, leading to unexpected
* behavior */
- *space = (int) allocated;
- *fr = (int) frags;
+ *space = allocated;
+ *fr = frags;
}
/*+C
diff --git a/src/util/mem/trmem.c b/src/util/mem/trmem.c
index 19adda8..48e009e 100644
--- a/src/util/mem/trmem.c
+++ b/src/util/mem/trmem.c
@@ -47,7 +47,7 @@ int MPIU_trvalid(const char str[])
return retval;
}
-void MPIU_trspace(int *space, int *fr)
+void MPIU_trspace(size_t *space, size_t *fr)
{
MPIU_THREAD_CS_ENTER(MEMALLOC,);
MPL_trspace(space, fr);
-----------------------------------------------------------------------
Summary of changes:
src/include/mpimem.h | 2 +-
src/mpl/include/mpltrmem.h | 2 +-
src/mpl/src/mpltrmem.c | 22 +++++++++++++++++-----
src/util/mem/trmem.c | 2 +-
4 files changed, 20 insertions(+), 8 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1rc2-109-g0bc9871
by noreply@mpich.org 25 Dec '13
by noreply@mpich.org 25 Dec '13
25 Dec '13
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 0bc9871d9318a6b53c68a58648868de797685cb2 (commit)
from 870585656310bffa1704f326e8e3aa27f3de478f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/0bc9871d9318a6b53c68a58648868de79…
commit 0bc9871d9318a6b53c68a58648868de797685cb2
Author: Pavan Balaji <balaji(a)mcs.anl.gov>
Date: Sun Dec 22 16:18:25 2013 +0800
Added a new comm_idup_overlap test.
This patch tests the code when we are duping overlapping communicators
(with two processes each) essentially forming a ring that should
deadlock with blocking Comm_dup. With Comm_idup, this should work
correctly as per the MPI standard.
diff --git a/test/mpi/comm/Makefile.am b/test/mpi/comm/Makefile.am
index b46859a..5602828 100644
--- a/test/mpi/comm/Makefile.am
+++ b/test/mpi/comm/Makefile.am
@@ -36,4 +36,5 @@ noinst_PROGRAMS = \
probe-intercomm \
comm_idup \
comm_idup_mul \
+ comm_idup_overlap \
comm_info
diff --git a/test/mpi/comm/comm_idup_overlap.c b/test/mpi/comm/comm_idup_overlap.c
new file mode 100644
index 0000000..a535743
--- /dev/null
+++ b/test/mpi/comm/comm_idup_overlap.c
@@ -0,0 +1,52 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ * (C) 2013 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+
+#include <stdio.h>
+#include <mpi.h>
+
+int main(int argc, char **argv)
+{
+ int i, rank, size, color;
+ MPI_Group group;
+ MPI_Comm primary[2], secondary[2], tmp;
+ MPI_Request req[2];
+
+ MPI_Init(&argc, &argv);
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+ MPI_Comm_size(MPI_COMM_WORLD, &size);
+
+ /* Each pair of processes creates a communicator */
+ for (i = 0; i < size; i++) {
+ if (rank == i)
+ MPI_Comm_split(MPI_COMM_WORLD, 0, 0, &primary[0]);
+ else if (rank == (i + 1) % size)
+ MPI_Comm_split(MPI_COMM_WORLD, 0, 0, &secondary[0]);
+ else {
+ MPI_Comm_split(MPI_COMM_WORLD, 1, 0, &tmp);
+ MPI_Comm_free(&tmp);
+ }
+ MPI_Barrier(MPI_COMM_WORLD);
+ }
+
+ /* Each pair dups the communicator such that the dups are
+ * overlapping. If this were done with MPI_Comm_dup, this should
+ * deadlock. */
+ MPI_Comm_idup(primary[0], &primary[1], &req[0]);
+ MPI_Comm_idup(secondary[0], &secondary[1], &req[1]);
+ MPI_Waitall(2, req, MPI_STATUSES_IGNORE);
+
+ for (i = 0; i < 2; i++) {
+ MPI_Comm_free(&primary[i]);
+ MPI_Comm_free(&secondary[i]);
+ }
+
+ if (rank == 0)
+ printf(" No Errors\n");
+
+ MPI_Finalize();
+
+ return 0;
+}
diff --git a/test/mpi/comm/testlist b/test/mpi/comm/testlist
index 568bf2b..c5ed8d8 100644
--- a/test/mpi/comm/testlist
+++ b/test/mpi/comm/testlist
@@ -28,6 +28,7 @@ comm_idup 2 mpiversion=3.0
comm_idup 4 mpiversion=3.0
comm_idup 9 mpiversion=3.0
comm_idup_mul 2 mpiversion=3.0 xfail=ticket1935
+comm_idup_overlap 2 mpiversion=3.0 xfail=ticket1935
dup_with_info 2 mpiversion=3.0
dup_with_info 4 mpiversion=3.0
dup_with_info 9 mpiversion=3.0
-----------------------------------------------------------------------
Summary of changes:
test/mpi/comm/Makefile.am | 1 +
test/mpi/comm/comm_idup_overlap.c | 52 +++++++++++++++++++++++++++++++++++++
test/mpi/comm/testlist | 1 +
3 files changed, 54 insertions(+), 0 deletions(-)
create mode 100644 test/mpi/comm/comm_idup_overlap.c
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1rc2-108-g8705856
by noreply@mpich.org 20 Dec '13
by noreply@mpich.org 20 Dec '13
20 Dec '13
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 870585656310bffa1704f326e8e3aa27f3de478f (commit)
via d61dca4b6544480fc23e212192f5fac00f4ae4be (commit)
via 5b5ddec8d94b0e98a46fce776191b5195deb0a71 (commit)
via e212f88ffedd8f0f5250bc7e7bc838ba5d2cb72d (commit)
from 7c09449967020cbd95a1d2bb8d98ea166b1925a6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/870585656310bffa1704f326e8e3aa27f…
commit 870585656310bffa1704f326e8e3aa27f3de478f
Author: Pavan Balaji <balaji(a)mcs.anl.gov>
Date: Fri Dec 20 08:10:36 2013 +0800
White-space cleanup for redability.
diff --git a/test/mpi/topo/dims3.c b/test/mpi/topo/dims3.c
index a3b51aa..6d25064 100644
--- a/test/mpi/topo/dims3.c
+++ b/test/mpi/topo/dims3.c
@@ -7,31 +7,34 @@
#include <stdio.h>
#include "mpitest.h"
-static inline void print_err(int *dims, int ndims) {
+static inline void print_err(int *dims, int ndims)
+{
int i;
printf("[ ");
- for(i=0; i<ndims; i++) printf("%d ", dims[i]);
+ for (i = 0; i < ndims; i++)
+ printf("%d ", dims[i]);
printf("] Suboptimal distribution!\n");
}
-
-int main(int argc, char **argv) {
+int main(int argc, char **argv)
+{
int errs = 0;
int dims[4], ndims, nnodes;
MTest_Init(&argc, &argv);
- for(ndims=3; ndims <=4; ndims++) {
- for(nnodes=2; nnodes<=4096; nnodes*=2) {
+ for (ndims = 3; ndims <= 4; ndims++) {
+ for (nnodes = 2; nnodes <= 4096; nnodes *= 2) {
int i;
- for(i=0; i<ndims; i++) dims[i] = 0;
+ for (i = 0; i < ndims; i++)
+ dims[i] = 0;
MPI_Dims_create(nnodes, ndims, dims);
/* Checking */
- for(i=0; i<ndims-1; i++)
- if(dims[i] / 2 > dims[i+1]) {
+ for (i = 0; i < ndims - 1; i++)
+ if (dims[i] / 2 > dims[i + 1]) {
print_err(dims, ndims);
++errs;
break;
@@ -39,7 +42,8 @@ int main(int argc, char **argv) {
}
}
- MTest_Finalize( errs );
+ MTest_Finalize(errs);
MPI_Finalize();
+
return 0;
}
http://git.mpich.org/mpich.git/commitdiff/d61dca4b6544480fc23e212192f5fac00…
commit d61dca4b6544480fc23e212192f5fac00f4ae4be
Author: Antonio J. Pena <apenya(a)mcs.anl.gov>
Date: Mon Nov 4 13:34:44 2013 -0600
Added regression test for ticket #1765
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/test/mpi/topo/Makefile.am b/test/mpi/topo/Makefile.am
index e8bd234..04d0877 100644
--- a/test/mpi/topo/Makefile.am
+++ b/test/mpi/topo/Makefile.am
@@ -20,6 +20,7 @@ noinst_PROGRAMS = \
cartcreates \
dims1 \
dims2 \
+ dims3 \
graphmap1 \
topotest \
topodup \
diff --git a/test/mpi/topo/dims3.c b/test/mpi/topo/dims3.c
new file mode 100644
index 0000000..a3b51aa
--- /dev/null
+++ b/test/mpi/topo/dims3.c
@@ -0,0 +1,45 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ * (C) 2003 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+#include "mpi.h"
+#include <stdio.h>
+#include "mpitest.h"
+
+static inline void print_err(int *dims, int ndims) {
+ int i;
+
+ printf("[ ");
+ for(i=0; i<ndims; i++) printf("%d ", dims[i]);
+ printf("] Suboptimal distribution!\n");
+}
+
+
+int main(int argc, char **argv) {
+ int errs = 0;
+ int dims[4], ndims, nnodes;
+
+ MTest_Init(&argc, &argv);
+
+ for(ndims=3; ndims <=4; ndims++) {
+ for(nnodes=2; nnodes<=4096; nnodes*=2) {
+ int i;
+ for(i=0; i<ndims; i++) dims[i] = 0;
+
+ MPI_Dims_create(nnodes, ndims, dims);
+
+ /* Checking */
+ for(i=0; i<ndims-1; i++)
+ if(dims[i] / 2 > dims[i+1]) {
+ print_err(dims, ndims);
+ ++errs;
+ break;
+ }
+ }
+ }
+
+ MTest_Finalize( errs );
+ MPI_Finalize();
+ return 0;
+}
diff --git a/test/mpi/topo/testlist b/test/mpi/topo/testlist
index 8454137..f98ad38 100644
--- a/test/mpi/topo/testlist
+++ b/test/mpi/topo/testlist
@@ -5,6 +5,7 @@ cartsuball 4
cartcreates 4
dims1 4
dims2 1
+dims3 1
graphmap1 4
topotest 4
topodup 4
http://git.mpich.org/mpich.git/commitdiff/5b5ddec8d94b0e98a46fce776191b5195…
commit 5b5ddec8d94b0e98a46fce776191b5195deb0a71
Author: Antonio J. Pena <apenya(a)mcs.anl.gov>
Date: Mon Nov 4 13:33:29 2013 -0600
Fixed suboptimal distributions in MPI_Dims_create
Fixes #1765. Patch contributed to mpich-discuss by Ian Hutchinson with minor
style fixes.
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpi/topo/dims_create.c b/src/mpi/topo/dims_create.c
index b0ea440..6615c11 100644
--- a/src/mpi/topo/dims_create.c
+++ b/src/mpi/topo/dims_create.c
@@ -308,33 +308,23 @@ int MPIR_Dims_create( int nnodes, int ndims, int dims[] )
/* We must combine some of the factors */
if (nfactors == 1) {
/* Special case for k**n, such as powers of 2 */
- int factor = factors[0].val;
- int cnt = factors[0].cnt; /* Numver of factors left */
- int cnteach = ( cnt + dims_needed - 1 ) / dims_needed;
- int factor_each;
-
- factor_each = factor;
- for (i=1; i<cnteach; i++) factor_each *= factor;
-
- for (i=0; i<ndims; i++) {
- if (dims[i] == 0) {
- if (cnt > cnteach) {
- dims[i] = factor_each;
- cnt -= cnteach;
- }
- else if (cnt > 0) {
- factor_each = factor;
- for (j=1; j<cnt; j++)
- factor_each *= factor;
- dims[i] = factor_each;
- cnt = 0;
- }
- else {
- dims[i] = 1;
- }
- }
- }
- }
+ int factor = factors[0].val;
+ int cnt = factors[0].cnt; /* Number of factors left */
+
+ for (i=0;i<ndims;i++)
+ if(dims[i]==0)dims[i]=-1;
+
+ i=0;
+ while (cnt > 0) {
+ if (dims[i] < 0) {
+ dims[i] = dims[i] * factor;
+ --cnt;
+ }
+ if (++i >= ndims) i=0;
+ }
+ for (i=0; i<ndims; i++)
+ if (dims[i] < 0) dims[i] = -dims[i];
+ }
else {
/* Here is the general case. */
MPIR_ChooseFactors( nfactors, factors, nnodes, dims_needed,
http://git.mpich.org/mpich.git/commitdiff/e212f88ffedd8f0f5250bc7e7bc838ba5…
commit e212f88ffedd8f0f5250bc7e7bc838ba5d2cb72d
Author: Antonio J. Pena <apenya(a)mcs.anl.gov>
Date: Wed Dec 18 09:32:17 2013 -0600
Removed ancient comments in dims_create.c
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpi/topo/dims_create.c b/src/mpi/topo/dims_create.c
index bc4863f..b0ea440 100644
--- a/src/mpi/topo/dims_create.c
+++ b/src/mpi/topo/dims_create.c
@@ -306,11 +306,6 @@ int MPIR_Dims_create( int nnodes, int ndims, int dims[] )
}
else {
/* We must combine some of the factors */
- /* This is what the fancy code is for in the MPICH-1 code.
- If the number of distinct factors is 1 (e.g., a power of 2),
- then this code can be much simpler */
- /* NOT DONE */
- /* FIXME */
if (nfactors == 1) {
/* Special case for k**n, such as powers of 2 */
int factor = factors[0].val;
-----------------------------------------------------------------------
Summary of changes:
src/mpi/topo/dims_create.c | 47 ++++++++++++++---------------------------
test/mpi/topo/Makefile.am | 1 +
test/mpi/topo/dims3.c | 49 ++++++++++++++++++++++++++++++++++++++++++++
test/mpi/topo/testlist | 1 +
4 files changed, 67 insertions(+), 31 deletions(-)
create mode 100644 test/mpi/topo/dims3.c
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1rc2-104-g7c09449
by noreply@mpich.org 20 Dec '13
by noreply@mpich.org 20 Dec '13
20 Dec '13
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 7c09449967020cbd95a1d2bb8d98ea166b1925a6 (commit)
from 7fa5fe7cd299de9aa58bea3f19e891bc16f5523d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/7c09449967020cbd95a1d2bb8d98ea166…
commit 7c09449967020cbd95a1d2bb8d98ea166b1925a6
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Fri Dec 20 10:01:16 2013 -0600
bluegene open fixup: don't broadcast garbage
as fallout from deferred open, we were doing the "scalable stat" from
the first aggregator, but broadcasting the result from rank 0. now we
broadcast from the process that actually has a meaningful value.
diff --git a/src/mpi/romio/adio/ad_bg/ad_bg_open.c b/src/mpi/romio/adio/ad_bg/ad_bg_open.c
index bddcfaf..3a36a5a 100644
--- a/src/mpi/romio/adio/ad_bg/ad_bg_open.c
+++ b/src/mpi/romio/adio/ad_bg/ad_bg_open.c
@@ -164,9 +164,9 @@ static void scaleable_stat(ADIO_File fd)
if (fd->comm != MPI_COMM_SELF) { /* if indep open, there's no one to talk to*/
if (fd->agg_comm != MPI_COMM_NULL) /* deferred open: only a subset of
processes participate */
- MPI_Bcast(buf, 2, MPI_LONG, 0, fd->agg_comm);
+ MPI_Bcast(buf, 2, MPI_LONG, fd->hints->ranklist[0], fd->agg_comm);
else
- MPI_Bcast(buf, 2, MPI_LONG, 0, fd->comm);
+ MPI_Bcast(buf, 2, MPI_LONG, fd->hints->ranklist[0], fd->comm);
}
bg_stat.st_blksize = buf[0];
bg_statfs.f_type = buf[1];
@@ -258,6 +258,9 @@ void ADIOI_BG_Open(ADIO_File fd, int *error_code)
#ifdef ADIOI_MPE_LOGGING
MPE_Log_event(ADIOI_MPE_stat_b, 0, NULL);
#endif
+ /* file domain code will get terribly confused in a hard-to-debug way
+ * if gpfs blocksize not sensible */
+ ADIOI_BG_assert( ((ADIOI_BG_fs*)fd->fs_ptr)->blksize > 0);
}
if (fd->fd_sys == -1) {
-----------------------------------------------------------------------
Summary of changes:
src/mpi/romio/adio/ad_bg/ad_bg_open.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1rc2-103-g7fa5fe7
by noreply@mpich.org 19 Dec '13
by noreply@mpich.org 19 Dec '13
19 Dec '13
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 7fa5fe7cd299de9aa58bea3f19e891bc16f5523d (commit)
from c5229dfad83e61e8c32902b95de594cbb696db51 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/7fa5fe7cd299de9aa58bea3f19e891bc1…
commit 7fa5fe7cd299de9aa58bea3f19e891bc16f5523d
Author: Junchao Zhang <jczhang(a)mcs.anl.gov>
Date: Thu Dec 19 13:06:59 2013 -0600
Fix a script problem appearing in old perl
Old perl (e.g., Perl 5.10) does not support $_ in readdir.
The fix is using an explicit variable instead.
Fixes #1991
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/maint/extractcvars b/maint/extractcvars
index f721123..202c027 100755
--- a/maint/extractcvars
+++ b/maint/extractcvars
@@ -588,15 +588,15 @@ sub ExpandDir {
my @subdirs = ();
my $DIR_HANDLE;
opendir $DIR_HANDLE, "$dir" or die "Error: open directory $dir -- $!\n";
- while (readdir $DIR_HANDLE) {
- if (/^\./) {
+ while (my $filename = readdir $DIR_HANDLE) {
+ if ($filename =~ /^\./) {
next;
- } elsif (-d "$dir/$_") {
- $subdirs[$#subdirs + 1] = "$dir/$_";
- } elsif (/(.*\.[Cchi])(pp){0,1}$/) {
- if (!defined($skipfiles{"$dir/$_"}))
+ } elsif (-d "$dir/$filename") {
+ $subdirs[$#subdirs + 1] = "$dir/$filename";
+ } elsif ($filename =~ /(.*\.[Cchi])(pp){0,1}$/) {
+ if (!defined($skipfiles{"$dir/$filename"}))
{
- $cfiles[$#cfiles + 1] = "$dir/$_";
+ $cfiles[$#cfiles + 1] = "$dir/$filename";
}
}
}
-----------------------------------------------------------------------
Summary of changes:
maint/extractcvars | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0