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
January 2014
- 1 participants
- 49 discussions
[mpich] MPICH primary repository branch, master, updated. v3.1rc2-174-g80d7388
by noreply@mpich.org 19 Jan '14
by noreply@mpich.org 19 Jan '14
19 Jan '14
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 80d7388b56ca83eeda8150878f5eb6ee92a229f8 (commit)
via 05c18c157b79590a020132c28130ccbe2a2773d5 (commit)
from c693cc68d4876385d7400791952e57721fbd9bd9 (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/80d7388b56ca83eeda8150878f5eb6ee9…
commit 80d7388b56ca83eeda8150878f5eb6ee92a229f8
Author: Masamichi Takagi <masamichi.takagi(a)gmail.com>
Date: Mon Jan 20 07:50:08 2014 +0900
Fix warnings and errors with --enable-strict
Fix warnings and errors in the IB netmod when configured with
--enable-strict and --enable-g=all.
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ib/ib_ibcom.c b/src/mpid/ch3/channels/nemesis/netmod/ib/ib_ibcom.c
index 0948cda..2c2cf5c 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ib/ib_ibcom.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ib/ib_ibcom.c
@@ -219,7 +219,7 @@ static int MPID_nem_ib_com_device_init()
MPID_nem_ib_ctx_export = ib_ctx;
#ifdef HAVE_LIBDCFA
#else
- dev_name = strdup(ibv_get_device_name(ib_devlist[i]));
+ dev_name = MPIU_Strdup(ibv_get_device_name(ib_devlist[i]));
dprintf("MPID_nem_ib_com_device_init,dev_name=%s\n", dev_name);
#endif
/* Create a PD */
@@ -282,7 +282,7 @@ static void MPID_nem_ib_com_clean(MPID_nem_ib_com_t * conp)
}
break;
}
- free(conp->icom_mrlist);
+ MPIU_Free(conp->icom_mrlist);
}
if (conp->icom_mem[MPID_NEM_IB_COM_RDMAWR_FROM]) {
munmap(conp->icom_mem[MPID_NEM_IB_COM_RDMAWR_FROM], MPID_NEM_IB_COM_RDMABUF_SZ);
@@ -297,13 +297,13 @@ static void MPID_nem_ib_com_clean(MPID_nem_ib_com_t * conp)
ibv_destroy_cq(conp->icom_rcq);
}
if (conp->icom_rmem) {
- free(conp->icom_rmem);
+ MPIU_Free(conp->icom_rmem);
}
if (conp->icom_rsize) {
- free(conp->icom_rsize);
+ MPIU_Free(conp->icom_rsize);
}
if (conp->icom_rkey) {
- free(conp->icom_rkey);
+ MPIU_Free(conp->icom_rkey);
}
memset(conp, 0, sizeof(MPID_nem_ib_com_t));
// TODO: free ah, sge, command template, ...
@@ -548,13 +548,13 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
switch (open_flag) {
case MPID_NEM_IB_COM_OPEN_RC:
/* RDMA-write-from and -to local memory area */
- conp->icom_mrlist = malloc(sizeof(struct ibv_mr *) * MPID_NEM_IB_COM_NBUF_RDMA);
+ conp->icom_mrlist = MPIU_Malloc(sizeof(struct ibv_mr *) * MPID_NEM_IB_COM_NBUF_RDMA);
memset(conp->icom_mrlist, 0, sizeof(struct ibv_mr *) * MPID_NEM_IB_COM_NBUF_RDMA);
conp->icom_mrlen = MPID_NEM_IB_COM_NBUF_RDMA;
- conp->icom_mem = (void **) malloc(sizeof(void **) * MPID_NEM_IB_COM_NBUF_RDMA);
+ conp->icom_mem = (void **) MPIU_Malloc(sizeof(void **) * MPID_NEM_IB_COM_NBUF_RDMA);
//printf("open,icom_mem=%p\n", conp->icom_mem);
memset(conp->icom_mem, 0, sizeof(void **) * MPID_NEM_IB_COM_NBUF_RDMA);
- conp->icom_msize = (int *) malloc(sizeof(int *) * MPID_NEM_IB_COM_NBUF_RDMA);
+ conp->icom_msize = (int *) MPIU_Malloc(sizeof(int *) * MPID_NEM_IB_COM_NBUF_RDMA);
memset(conp->icom_msize, 0, sizeof(int *) * MPID_NEM_IB_COM_NBUF_RDMA);
mr_flags = IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_READ | IBV_ACCESS_REMOTE_WRITE;
@@ -624,54 +624,54 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
conp->icom_mrlist[MPID_NEM_IB_COM_RDMAWR_TO]->rkey);
/* RDMA-write-to remote memory area */
- conp->icom_rmem = (void **) malloc(sizeof(void **) * MPID_NEM_IB_COM_NBUF_RDMA);
+ conp->icom_rmem = (void **) MPIU_Malloc(sizeof(void **) * MPID_NEM_IB_COM_NBUF_RDMA);
if (conp->icom_rmem == 0)
goto err_exit;
memset(conp->icom_rmem, 0, sizeof(void **) * MPID_NEM_IB_COM_NBUF_RDMA);
- conp->icom_rsize = (size_t *) malloc(sizeof(void **) * MPID_NEM_IB_COM_NBUF_RDMA);
+ conp->icom_rsize = (size_t *) MPIU_Malloc(sizeof(void **) * MPID_NEM_IB_COM_NBUF_RDMA);
if (conp->icom_rsize == 0)
goto err_exit;
memset(conp->icom_rsize, 0, sizeof(void **) * MPID_NEM_IB_COM_NBUF_RDMA);
- conp->icom_rkey = (int *) malloc(sizeof(int) * MPID_NEM_IB_COM_NBUF_RDMA);
+ conp->icom_rkey = (int *) MPIU_Malloc(sizeof(int) * MPID_NEM_IB_COM_NBUF_RDMA);
if (conp->icom_rkey == 0)
goto err_exit;
memset(conp->icom_rkey, 0, sizeof(int) * MPID_NEM_IB_COM_NBUF_RDMA);
break;
case MPID_NEM_IB_COM_OPEN_SCRATCH_PAD:
/* RDMA-write-from and -to local memory area */
- conp->icom_mrlist = malloc(sizeof(struct ibv_mr *) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
+ conp->icom_mrlist = MPIU_Malloc(sizeof(struct ibv_mr *) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
memset(conp->icom_mrlist, 0, sizeof(struct ibv_mr *) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
conp->icom_mrlen = MPID_NEM_IB_COM_NBUF_SCRATCH_PAD;
- conp->icom_mem = (void **) malloc(sizeof(void **) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
+ conp->icom_mem = (void **) MPIU_Malloc(sizeof(void **) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
memset(conp->icom_mem, 0, sizeof(void **) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
- conp->icom_msize = (int *) malloc(sizeof(int *) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
+ conp->icom_msize = (int *) MPIU_Malloc(sizeof(int *) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
memset(conp->icom_msize, 0, sizeof(int *) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
mr_flags = IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_READ | IBV_ACCESS_REMOTE_WRITE;
/* RDMA-write-to remote memory area */
- conp->icom_rmem = (void **) malloc(sizeof(void **) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
+ conp->icom_rmem = (void **) MPIU_Malloc(sizeof(void **) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
MPID_NEM_IB_COM_ERR_CHKANDJUMP(conp->icom_rmem == 0, -1, dprintf("malloc failed\n"));
memset(conp->icom_rmem, 0, sizeof(void **) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
- conp->icom_rsize = (size_t *) malloc(sizeof(void **) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
+ conp->icom_rsize = (size_t *) MPIU_Malloc(sizeof(void **) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
MPID_NEM_IB_COM_ERR_CHKANDJUMP(conp->icom_rsize == 0, -1, dprintf("malloc failed\n"));
memset(conp->icom_rsize, 0, sizeof(void **) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
- conp->icom_rkey = (int *) malloc(sizeof(int) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
+ conp->icom_rkey = (int *) MPIU_Malloc(sizeof(int) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
MPID_NEM_IB_COM_ERR_CHKANDJUMP(conp->icom_rkey == 0, -1, dprintf("malloc failed\n"));
memset(conp->icom_rkey, 0, sizeof(int) * MPID_NEM_IB_COM_NBUF_SCRATCH_PAD);
break;
case MPID_NEM_IB_COM_OPEN_UD:
/* UD-write-from and -to local memory area */
- conp->icom_mrlist = malloc(sizeof(struct ibv_mr *) * MPID_NEM_IB_COM_NBUF_UD);
+ conp->icom_mrlist = MPIU_Malloc(sizeof(struct ibv_mr *) * MPID_NEM_IB_COM_NBUF_UD);
memset(conp->icom_mrlist, 0, sizeof(struct ibv_mr *) * MPID_NEM_IB_COM_NBUF_UD);
conp->icom_mrlen = MPID_NEM_IB_COM_NBUF_UD;
- conp->icom_mem = (void **) malloc(sizeof(void **) * MPID_NEM_IB_COM_NBUF_UD);
+ conp->icom_mem = (void **) MPIU_Malloc(sizeof(void **) * MPID_NEM_IB_COM_NBUF_UD);
memset(conp->icom_mem, 0, sizeof(void **) * MPID_NEM_IB_COM_NBUF_UD);
- conp->icom_msize = (int *) malloc(sizeof(int *) * MPID_NEM_IB_COM_NBUF_UD);
+ conp->icom_msize = (int *) MPIU_Malloc(sizeof(int *) * MPID_NEM_IB_COM_NBUF_UD);
memset(conp->icom_msize, 0, sizeof(int *) * MPID_NEM_IB_COM_NBUF_UD);
mr_flags = IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_READ | IBV_ACCESS_REMOTE_WRITE;
@@ -734,7 +734,7 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
/* SR (send request) template */
conp->icom_sr =
- (struct ibv_send_wr *) malloc(sizeof(struct ibv_send_wr) *
+ (struct ibv_send_wr *) MPIU_Malloc(sizeof(struct ibv_send_wr) *
MPID_NEM_IB_COM_RC_SR_NTEMPLATE);
memset(conp->icom_sr, 0, sizeof(struct ibv_send_wr) * MPID_NEM_IB_COM_RC_SR_NTEMPLATE);
@@ -745,7 +745,7 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
sizeof(struct ibv_sge) * WR_SG_NUM);
#else
sge =
- (struct ibv_sge *) malloc(sizeof(struct ibv_sge) *
+ (struct ibv_sge *) MPIU_Malloc(sizeof(struct ibv_sge) *
MPID_NEM_IB_COM_SMT_INLINE_INITIATOR_NSGE);
memset(sge, 0, sizeof(struct ibv_sge) * MPID_NEM_IB_COM_SMT_INLINE_INITIATOR_NSGE);
#endif
@@ -768,7 +768,7 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
sizeof(struct ibv_sge) * WR_SG_NUM);
#else
sge =
- (struct ibv_sge *) malloc(sizeof(struct ibv_sge) *
+ (struct ibv_sge *) MPIU_Malloc(sizeof(struct ibv_sge) *
MPID_NEM_IB_COM_SMT_NOINLINE_INITIATOR_NSGE);
memset(sge, 0, sizeof(struct ibv_sge) * MPID_NEM_IB_COM_SMT_NOINLINE_INITIATOR_NSGE);
#endif
@@ -787,7 +787,7 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
sizeof(struct ibv_sge) * WR_SG_NUM);
#else
sge =
- (struct ibv_sge *) malloc(sizeof(struct ibv_sge) *
+ (struct ibv_sge *) MPIU_Malloc(sizeof(struct ibv_sge) *
MPID_NEM_IB_COM_LMT_INITIATOR_NSGE);
memset(sge, 0, sizeof(struct ibv_sge) * MPID_NEM_IB_COM_LMT_INITIATOR_NSGE);
#endif
@@ -805,7 +805,7 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
memset(&(conp->icom_sr[MPID_NEM_IB_COM_LMT_PUT].sg_list[0]), 0,
sizeof(struct ibv_sge) * WR_SG_NUM);
#else
- sge = (struct ibv_sge *) malloc(sizeof(struct ibv_sge) * MPID_NEM_IB_COM_LMT_PUT_NSGE);
+ sge = (struct ibv_sge *) MPIU_Malloc(sizeof(struct ibv_sge) * MPID_NEM_IB_COM_LMT_PUT_NSGE);
memset(sge, 0, sizeof(struct ibv_sge) * MPID_NEM_IB_COM_LMT_PUT_NSGE);
#endif
conp->icom_sr[MPID_NEM_IB_COM_LMT_PUT].next = NULL;
@@ -824,7 +824,7 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
/* RR (receive request) template for MPID_NEM_IB_COM_RDMAWR_RESPONDER */
conp->icom_rr =
- (struct ibv_recv_wr *) malloc(sizeof(struct ibv_recv_wr) *
+ (struct ibv_recv_wr *) MPIU_Malloc(sizeof(struct ibv_recv_wr) *
MPID_NEM_IB_COM_RC_RR_NTEMPLATE);
memset(conp->icom_rr, 0, sizeof(struct ibv_recv_wr) * MPID_NEM_IB_COM_RC_RR_NTEMPLATE);
@@ -840,7 +840,7 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
case MPID_NEM_IB_COM_OPEN_SCRATCH_PAD:{
/* SR (send request) template */
conp->icom_sr =
- (struct ibv_send_wr *) malloc(sizeof(struct ibv_send_wr) *
+ (struct ibv_send_wr *) MPIU_Malloc(sizeof(struct ibv_send_wr) *
MPID_NEM_IB_COM_SCRATCH_PAD_SR_NTEMPLATE);
memset(conp->icom_sr, 0,
sizeof(struct ibv_send_wr) * MPID_NEM_IB_COM_SCRATCH_PAD_SR_NTEMPLATE);
@@ -851,7 +851,7 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
sizeof(struct ibv_sge) * WR_SG_NUM);
#else
sge =
- (struct ibv_sge *) malloc(sizeof(struct ibv_sge) *
+ (struct ibv_sge *) MPIU_Malloc(sizeof(struct ibv_sge) *
MPID_NEM_IB_COM_SCRATCH_PAD_INITIATOR_NSGE);
memset(sge, 0, sizeof(struct ibv_sge) * MPID_NEM_IB_COM_SCRATCH_PAD_INITIATOR_NSGE);
#endif
@@ -869,7 +869,7 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
case MPID_NEM_IB_COM_OPEN_RC_LMT_PUT:
/* SR (send request) template */
conp->icom_sr =
- (struct ibv_send_wr *) malloc(sizeof(struct ibv_send_wr) *
+ (struct ibv_send_wr *) MPIU_Malloc(sizeof(struct ibv_send_wr) *
MPID_NEM_IB_COM_RC_SR_LMT_PUT_NTEMPLATE);
memset(conp->icom_sr, 0,
sizeof(struct ibv_send_wr) * MPID_NEM_IB_COM_RC_SR_LMT_PUT_NTEMPLATE);
@@ -878,7 +878,7 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
memset(&(conp->icom_sr[MPID_NEM_IB_COM_LMT_PUT].sg_list[0]), 0,
sizeof(struct ibv_sge) * WR_SG_NUM);
#else
- sge = (struct ibv_sge *) malloc(sizeof(struct ibv_sge) * MPID_NEM_IB_COM_LMT_PUT_NSGE);
+ sge = (struct ibv_sge *) MPIU_Malloc(sizeof(struct ibv_sge) * MPID_NEM_IB_COM_LMT_PUT_NSGE);
memset(sge, 0, sizeof(struct ibv_sge) * MPID_NEM_IB_COM_LMT_PUT_NSGE);
#endif
conp->icom_sr[MPID_NEM_IB_COM_LMT_PUT].next = NULL;
@@ -896,7 +896,7 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
sge = &(conp->icom_sr[MPID_NEM_IB_COM_UD_INITIATOR].sg_list[0]);
memset(sge, 0, sizeof(struct ibv_sge) * WR_SG_NUM);
#else
- sge = (struct ibv_sge *) calloc(1, sizeof(struct ibv_sge));
+ sge = (struct ibv_sge *) MPIU_Calloc(1, sizeof(struct ibv_sge));
#endif
/* addr to addr + length - 1 will be on the payload, but search backword for "<= 40" */
sge[0].addr = (uint64_t) conp->icom_mem[MPID_NEM_IB_COM_UDWR_FROM] + 40;
@@ -905,7 +905,7 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
conp->icom_ah_attr =
- (struct ibv_ah_attr *) calloc(MPID_NEM_IB_COM_UD_SR_NTEMPLATE,
+ (struct ibv_ah_attr *) MPIU_Calloc(MPID_NEM_IB_COM_UD_SR_NTEMPLATE,
sizeof(struct ibv_ah_attr));
conp->icom_ah_attr[MPID_NEM_IB_COM_UD_INITIATOR].sl = 0;
@@ -924,7 +924,7 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
/* SR (send request) template for MPID_NEM_IB_COM_UD_INITIATOR */
conp->icom_sr =
- (struct ibv_send_wr *) calloc(MPID_NEM_IB_COM_UD_SR_NTEMPLATE,
+ (struct ibv_send_wr *) MPIU_Calloc(MPID_NEM_IB_COM_UD_SR_NTEMPLATE,
sizeof(struct ibv_send_wr));
conp->icom_sr[MPID_NEM_IB_COM_UD_INITIATOR].next = NULL;
@@ -943,7 +943,7 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
sge = &(conp->icom_rr[MPID_NEM_IB_COM_UD_RESPONDER].sg_list[0]);
memset(sge, 0, sizeof(struct ibv_sge) * WR_SG_NUM);
#else
- sge = (struct ibv_sge *) calloc(1, sizeof(struct ibv_sge));
+ sge = (struct ibv_sge *) MPIU_Calloc(1, sizeof(struct ibv_sge));
#endif
sge[0].addr = (uint64_t) conp->icom_mem[MPID_NEM_IB_COM_UDWR_TO];
sge[0].length = MPID_NEM_IB_COM_UDBUF_SZ;
@@ -951,7 +951,7 @@ int MPID_nem_ib_com_open(int ib_port, int open_flag, int *condesc)
/* RR (receive request) template for MPID_NEM_IB_COM_UD_RESPONDER */
conp->icom_rr =
- (struct ibv_recv_wr *) calloc(MPID_NEM_IB_COM_UD_RR_NTEMPLATE,
+ (struct ibv_recv_wr *) MPIU_Calloc(MPID_NEM_IB_COM_UD_RR_NTEMPLATE,
sizeof(struct ibv_recv_wr));
/* create one dummy RR to ibv_post_recv */
@@ -2286,7 +2286,7 @@ char *MPID_nem_ib_com_strerror(int errno)
{
char *r;
if (-errno > 3) {
- r = malloc(256);
+ r = MPIU_Malloc(256);
sprintf(r, "%d", -errno);
goto fn_exit;
}
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ib/ib_impl.h b/src/mpid/ch3/channels/nemesis/netmod/ib/ib_impl.h
index e8d230d..f176e6f 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ib/ib_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/ib/ib_impl.h
@@ -593,7 +593,7 @@ static inline void *MPID_nem_ib_stmalloc(size_t _sz)
sz >>= 1;
} while (sz > 0);
if (i < 12) {
- return malloc(sz);
+ return MPIU_Malloc(sz);
}
if (i > 30) {
return mmap(0, sz, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
@@ -627,7 +627,7 @@ static inline void MPID_nem_ib_stfree(void *ptr, size_t sz)
sz >>= 1;
} while (sz > 0);
if (i < 12) {
- free(ptr);
+ MPIU_Free(ptr);
goto fn_exit;
}
if (i > 30) {
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ib/ib_poll.c b/src/mpid/ch3/channels/nemesis/netmod/ib/ib_poll.c
index 77d4c48..de1905c 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ib/ib_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ib/ib_poll.c
@@ -1123,9 +1123,11 @@ int MPID_nem_ib_recv_buf_released(struct MPIDI_VC *vc, void *user_data)
goto fn_exit;
}
- MPIU_Assert(vc_ib->ibcom->icom_mem[MPID_NEM_IB_COM_RDMAWR_TO] <= user_data &&
- user_data <
- vc_ib->ibcom->icom_mem[MPID_NEM_IB_COM_RDMAWR_TO] + MPID_NEM_IB_COM_RDMABUF_SZ);
+ MPIU_Assert((uint8_t *) vc_ib->ibcom->icom_mem[MPID_NEM_IB_COM_RDMAWR_TO] <=
+ (uint8_t *) user_data &&
+ (uint8_t *) user_data <
+ (uint8_t *) vc_ib->ibcom->icom_mem[MPID_NEM_IB_COM_RDMAWR_TO] +
+ MPID_NEM_IB_COM_RDMABUF_SZ);
unsigned long mod =
(unsigned long) ((uint8_t *) user_data -
(uint8_t *) vc_ib->ibcom->
@@ -1147,9 +1149,11 @@ int MPID_nem_ib_recv_buf_released(struct MPIDI_VC *vc, void *user_data)
1)) : 15) {
volatile MPID_nem_ib_tailmagic_t *ptr =
(MPID_nem_ib_tailmagic_t *) ((uint8_t *) buf + offset);
- MPIU_Assert(vc_ib->ibcom->icom_mem[MPID_NEM_IB_COM_RDMAWR_TO] <= ptr &&
- ptr <
- vc_ib->ibcom->icom_mem[MPID_NEM_IB_COM_RDMAWR_TO] + MPID_NEM_IB_COM_RDMABUF_SZ);
+ MPIU_Assert((uint8_t *) vc_ib->ibcom->icom_mem[MPID_NEM_IB_COM_RDMAWR_TO] <=
+ (uint8_t *) ptr &&
+ (uint8_t *) ptr <
+ (uint8_t *) vc_ib->ibcom->icom_mem[MPID_NEM_IB_COM_RDMAWR_TO] +
+ MPID_NEM_IB_COM_RDMABUF_SZ);
ptr->magic = 0 /*0xde */ ;
if (offset == sz_data_pow2) {
break;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ib/ib_reg_mr.c b/src/mpid/ch3/channels/nemesis/netmod/ib/ib_reg_mr.c
index ab9448e..b401df2 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ib/ib_reg_mr.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ib/ib_reg_mr.c
@@ -43,7 +43,7 @@ static char *arena_flist[MPID_NEM_IB_NIALLOCID] = { 0 };
static inline void *aalloc(size_t sz, int id)
{
#if 1 /* debug */
- return malloc(sz);
+ return MPIU_Malloc(sz);
#else
char *p = free_list_front[id];
if ((unsigned long) p & (MPID_NEM_IB_SZARENA - 1)) {
@@ -81,7 +81,7 @@ static inline void *aalloc(size_t sz, int id)
static inline void afree(const void *p, int id)
{
#if 1 /* debug */
- return free((void *) p);
+ return MPIU_Free((void *) p);
#else
p = (void *) ((unsigned long) p & ~(MPID_NEM_IB_SZARENA - 1));
if (!(--(*((int *) p)))) {
http://git.mpich.org/mpich.git/commitdiff/05c18c157b79590a020132c28130ccbe2…
commit 05c18c157b79590a020132c28130ccbe2a2773d5
Author: Masamichi Takagi <masamichi.takagi(a)gmail.com>
Date: Mon Jan 20 07:18:10 2014 +0900
Fix type names in the IB netmod
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ib/ib_init.c b/src/mpid/ch3/channels/nemesis/netmod/ib/ib_init.c
index 1b969d8..5c340f4 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ib/ib_init.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ib/ib_init.c
@@ -954,8 +954,8 @@ int MPID_nem_ib_vc_init(MPIDI_VC_t * vc)
VC_FIELD(vc, is_connected) = 0;
#endif
- MPIU_Assert(sizeof(sz_hdrmagic_t) == 8); /* assumption in ib_ibcom.h */
- MPIU_Assert(sizeof(tailmagic_t) == 1); /* assumption in ib_ibcom.h */
+ MPIU_Assert(sizeof(MPID_nem_ib_sz_hdrmagic_t) == 8); /* assumption in ib_ibcom.h */
+ MPIU_Assert(sizeof(MPID_nem_ib_tailmagic_t) == 1); /* assumption in ib_ibcom.h */
uint32_t sz;
#if 0
-----------------------------------------------------------------------
Summary of changes:
src/mpid/ch3/channels/nemesis/netmod/ib/ib_ibcom.c | 72 ++++++++++----------
src/mpid/ch3/channels/nemesis/netmod/ib/ib_impl.h | 4 +-
src/mpid/ch3/channels/nemesis/netmod/ib/ib_init.c | 4 +-
src/mpid/ch3/channels/nemesis/netmod/ib/ib_poll.c | 16 +++--
.../ch3/channels/nemesis/netmod/ib/ib_reg_mr.c | 4 +-
5 files changed, 52 insertions(+), 48 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1rc2-172-gc693cc6
by noreply@mpich.org 19 Jan '14
by noreply@mpich.org 19 Jan '14
19 Jan '14
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 c693cc68d4876385d7400791952e57721fbd9bd9 (commit)
from 8a502da9b928d85ee239049613e9db8e6c2e3c83 (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/c693cc68d4876385d7400791952e57721…
commit c693cc68d4876385d7400791952e57721fbd9bd9
Author: Pavan Balaji <balaji(a)mcs.anl.gov>
Date: Sat Jan 18 23:06:55 2014 -0600
Update the MPICH ABI string for the 3.1rc3 release.
No interfaces were added or removed. There were just source code
changes.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/maint/version.m4 b/maint/version.m4
index 1e729a1..39785eb 100644
--- a/maint/version.m4
+++ b/maint/version.m4
@@ -14,7 +14,7 @@
# changing this by playing with diversions, but then we would probably be
# playing with autotools-fire.
-m4_define([MPICH_VERSION_m4],[3.1rc2])dnl
+m4_define([MPICH_VERSION_m4],[3.1rc3])dnl
m4_define([MPICH_RELEASE_DATE_m4],[unreleased development copy])dnl
# For libtool ABI versioning rules see:
@@ -31,6 +31,6 @@ m4_define([MPICH_RELEASE_DATE_m4],[unreleased development copy])dnl
#
# 4. If any interfaces have been removed since the last public
# release, then set age to 0.
-m4_define([libmpich_so_version_m4],[11:1:0])dnl
+m4_define([libmpich_so_version_m4],[11:2:0])dnl
[#] end of __file__
-----------------------------------------------------------------------
Summary of changes:
maint/version.m4 | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1rc2-171-g8a502da
by noreply@mpich.org 19 Jan '14
by noreply@mpich.org 19 Jan '14
19 Jan '14
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 8a502da9b928d85ee239049613e9db8e6c2e3c83 (commit)
from 29c8529fb32a710f3707eec9397db3f4e166282f (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/8a502da9b928d85ee239049613e9db8e6…
commit 8a502da9b928d85ee239049613e9db8e6c2e3c83
Author: Pavan Balaji <balaji(a)mcs.anl.gov>
Date: Sun Jan 19 11:05:38 2014 -0600
Rename MPICH2 to MPICH.
No Reviewer.
diff --git a/src/mpid/common/datatype/dataloop/dataloop_optimize.c b/src/mpid/common/datatype/dataloop/dataloop_optimize.c
index 54cd14c..8e9136d 100644
--- a/src/mpid/common/datatype/dataloop/dataloop_optimize.c
+++ b/src/mpid/common/datatype/dataloop/dataloop_optimize.c
@@ -173,8 +173,8 @@ static int dl_contig_isFinal( DLOOP_Dataloop *dp )
* with 1 element is really a contig type)
*
* Value of these optimizations
- * A 2012 paper compared performance of Open MPI, MPICH2, and user-written code
- * for some datatypes, and found MPICH2 often performed poorer than other
+ * A 2012 paper compared performance of Open MPI, MPICH, and user-written code
+ * for some datatypes, and found MPICH often performed poorer than other
* options. An investigation showed that some of the issues are due to
* a failure to perform optimizations of these type (especially #1 and 2).
* It may also be necessary to enhance the dataloop execution engine, but
diff --git a/src/mpid/common/datatype/mpid_type_debug.c b/src/mpid/common/datatype/mpid_type_debug.c
index 2489dbd..8b58af7 100644
--- a/src/mpid/common/datatype/mpid_type_debug.c
+++ b/src/mpid/common/datatype/mpid_type_debug.c
@@ -431,7 +431,7 @@ char *MPIDU_Datatype_combiner_to_string(int combiner)
/* --BEGIN DEBUG-- */
/*
- * You must configure MPICH2 with the logging option enabled (--enable-g=log)
+ * You must configure MPICH with the logging option enabled (--enable-g=log)
* for these routines to print - in which case, they use the same options
* as the logging code, including print to file and control by class (DATATYPE)
*/
-----------------------------------------------------------------------
Summary of changes:
.../common/datatype/dataloop/dataloop_optimize.c | 4 ++--
src/mpid/common/datatype/mpid_type_debug.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1rc2-170-g29c8529
by noreply@mpich.org 18 Jan '14
by noreply@mpich.org 18 Jan '14
18 Jan '14
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 29c8529fb32a710f3707eec9397db3f4e166282f (commit)
via 57dc140192156e5d4fbdc632b6a48236d33adf0c (commit)
from eb42f62412655c0944e89a93dcd27f5a5feda0f3 (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/29c8529fb32a710f3707eec9397db3f4e…
commit 29c8529fb32a710f3707eec9397db3f4e166282f
Author: Pavan Balaji <balaji(a)mcs.anl.gov>
Date: Fri Jan 17 23:12:00 2014 -0600
Time iterations and break out if we are too slow.
On some machines the iterations take unusually long. If they are
getting to be larger than a predefined amount, break out of that loop.
Fixes #1669.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/test/mpi/rma/manyrma2.c b/test/mpi/rma/manyrma2.c
index 244fba5..571d29e 100644
--- a/test/mpi/rma/manyrma2.c
+++ b/test/mpi/rma/manyrma2.c
@@ -18,6 +18,7 @@
#define MAX_COUNT 65536*4/16
#define MAX_RMA_SIZE 2 /* 16 in manyrma performance test */
#define MAX_RUNS 10
+#define MAX_ITER_TIME 5.0 /* seconds */
typedef enum { SYNC_NONE = 0,
SYNC_ALL = -1, SYNC_FENCE = 1, SYNC_LOCK = 2, SYNC_PSCW = 4
@@ -48,6 +49,7 @@ int main(int argc, char *argv[])
MPI_Win win;
MPI_Group wgroup, accessGroup, exposureGroup;
int maxSz = MAX_RMA_SIZE;
+ double start, end;
MPI_Init(&argc, &argv);
@@ -128,10 +130,12 @@ int main(int argc, char *argv[])
for (sz = 1; sz <= maxSz; sz = sz + sz) {
if (wrank == 0 && verbose)
printf("Accumulate with fence, %d elements\n", sz);
- cnt = 1;
- while (cnt <= maxCount) {
+ for (cnt = 1; cnt <= maxCount; cnt *= 2) {
+ start = MPI_Wtime();
RunAccFence(win, destRank, cnt, sz);
- cnt = 2 * cnt;
+ end = MPI_Wtime();
+ if (end - start > MAX_ITER_TIME)
+ break;
}
}
}
@@ -140,10 +144,12 @@ int main(int argc, char *argv[])
for (sz = 1; sz <= maxSz; sz = sz + sz) {
if (wrank == 0 && verbose)
printf("Accumulate with lock, %d elements\n", sz);
- cnt = 1;
- while (cnt <= maxCount) {
+ for (cnt = 1; cnt <= maxCount; cnt *= 2) {
+ start = MPI_Wtime();
RunAccLock(win, destRank, cnt, sz);
- cnt = 2 * cnt;
+ end = MPI_Wtime();
+ if (end - start > MAX_ITER_TIME)
+ break;
}
}
}
@@ -152,10 +158,12 @@ int main(int argc, char *argv[])
for (sz = 1; sz <= maxSz; sz = sz + sz) {
if (wrank == 0 && verbose)
printf("Put with fence, %d elements\n", sz);
- cnt = 1;
- while (cnt <= maxCount) {
+ for (cnt = 1; cnt <= maxCount; cnt *= 2) {
+ start = MPI_Wtime();
RunPutFence(win, destRank, cnt, sz);
- cnt = 2 * cnt;
+ end = MPI_Wtime();
+ if (end - start > MAX_ITER_TIME)
+ break;
}
}
}
@@ -164,10 +172,12 @@ int main(int argc, char *argv[])
for (sz = 1; sz <= maxSz; sz = sz + sz) {
if (wrank == 0 && verbose)
printf("Put with lock, %d elements\n", sz);
- cnt = 1;
- while (cnt <= maxCount) {
+ for (cnt = 1; cnt <= maxCount; cnt *= 2) {
+ start = MPI_Wtime();
RunPutLock(win, destRank, cnt, sz);
- cnt = 2 * cnt;
+ end = MPI_Wtime();
+ if (end - start > MAX_ITER_TIME)
+ break;
}
}
}
@@ -176,10 +186,12 @@ int main(int argc, char *argv[])
for (sz = 1; sz <= maxSz; sz = sz + sz) {
if (wrank == 0 && verbose)
printf("Put with pscw, %d elements\n", sz);
- cnt = 1;
- while (cnt <= maxCount) {
+ for (cnt = 1; cnt <= maxCount; cnt *= 2) {
+ start = MPI_Wtime();
RunPutPSCW(win, destRank, cnt, sz, exposureGroup, accessGroup);
- cnt = 2 * cnt;
+ end = MPI_Wtime();
+ if (end - start > MAX_ITER_TIME)
+ break;
}
}
}
@@ -188,10 +200,12 @@ int main(int argc, char *argv[])
for (sz = 1; sz <= maxSz; sz = sz + sz) {
if (wrank == 0 && verbose)
printf("Accumulate with pscw, %d elements\n", sz);
- cnt = 1;
- while (cnt <= maxCount) {
+ for (cnt = 1; cnt <= maxCount; cnt *= 2) {
+ start = MPI_Wtime();
RunAccPSCW(win, destRank, cnt, sz, exposureGroup, accessGroup);
- cnt = 2 * cnt;
+ end = MPI_Wtime();
+ if (end - start > MAX_ITER_TIME)
+ break;
}
}
}
http://git.mpich.org/mpich.git/commitdiff/57dc140192156e5d4fbdc632b6a48236d…
commit 57dc140192156e5d4fbdc632b6a48236d33adf0c
Author: Pavan Balaji <balaji(a)mcs.anl.gov>
Date: Fri Jan 17 23:10:18 2014 -0600
White space cleanup.
The code was unparseable to make any changes.
diff --git a/test/mpi/rma/manyrma2.c b/test/mpi/rma/manyrma2.c
index 91d9518..244fba5 100644
--- a/test/mpi/rma/manyrma2.c
+++ b/test/mpi/rma/manyrma2.c
@@ -7,7 +7,7 @@
/* This test is a simplification of the one in perf/manyrma.c that tests
for correct handling of the case where many RMA operations occur between
synchronization events.
- This is one of the ways that RMA may be used, and is used in the
+ This is one of the ways that RMA may be used, and is used in the
reference implementation of the graph500 benchmark.
*/
#include "mpi.h"
@@ -16,12 +16,13 @@
#include <string.h>
#define MAX_COUNT 65536*4/16
-#define MAX_RMA_SIZE 2 /* 16 in manyrma performance test */
+#define MAX_RMA_SIZE 2 /* 16 in manyrma performance test */
#define MAX_RUNS 10
-typedef enum { SYNC_NONE=0,
- SYNC_ALL=-1, SYNC_FENCE=1, SYNC_LOCK=2, SYNC_PSCW=4 } sync_t;
-typedef enum { RMA_NONE=0, RMA_ALL=-1, RMA_PUT=1, RMA_ACC=2, RMA_GET=4 } rma_t;
+typedef enum { SYNC_NONE = 0,
+ SYNC_ALL = -1, SYNC_FENCE = 1, SYNC_LOCK = 2, SYNC_PSCW = 4
+} sync_t;
+typedef enum { RMA_NONE = 0, RMA_ALL = -1, RMA_PUT = 1, RMA_ACC = 2, RMA_GET = 4 } rma_t;
/* Note GET not yet implemented */
/* By default, run only a subset of the available tests, to keep the
total runtime reasonably short. Command line arguments may be used
@@ -31,278 +32,282 @@ rma_t rmaChoice = RMA_ACC;
static int verbose = 0;
-void RunAccFence( MPI_Win win, int destRank, int cnt, int sz );
-void RunAccLock( MPI_Win win, int destRank, int cnt, int sz );
-void RunPutFence( MPI_Win win, int destRank, int cnt, int sz );
-void RunPutLock( MPI_Win win, int destRank, int cnt, int sz );
-void RunAccPSCW( MPI_Win win, int destRank, int cnt, int sz,
- MPI_Group exposureGroup, MPI_Group accessGroup );
-void RunPutPSCW( MPI_Win win, int destRank, int cnt, int sz,
- MPI_Group exposureGroup, MPI_Group accessGroup );
+void RunAccFence(MPI_Win win, int destRank, int cnt, int sz);
+void RunAccLock(MPI_Win win, int destRank, int cnt, int sz);
+void RunPutFence(MPI_Win win, int destRank, int cnt, int sz);
+void RunPutLock(MPI_Win win, int destRank, int cnt, int sz);
+void RunAccPSCW(MPI_Win win, int destRank, int cnt, int sz,
+ MPI_Group exposureGroup, MPI_Group accessGroup);
+void RunPutPSCW(MPI_Win win, int destRank, int cnt, int sz,
+ MPI_Group exposureGroup, MPI_Group accessGroup);
-int main( int argc, char *argv[] )
+int main(int argc, char *argv[])
{
- int arraysize, i, cnt, sz, maxCount=MAX_COUNT, *arraybuffer;
+ int arraysize, i, cnt, sz, maxCount = MAX_COUNT, *arraybuffer;
int wrank, wsize, destRank, srcRank;
MPI_Win win;
MPI_Group wgroup, accessGroup, exposureGroup;
- int maxSz = MAX_RMA_SIZE;
-
- MPI_Init( &argc, &argv );
-
- for (i=1; i<argc; i++) {
- if (strcmp( argv[i], "-put" ) == 0) {
- if (rmaChoice == RMA_ALL) rmaChoice = RMA_NONE;
- rmaChoice |= RMA_PUT;
- }
- else if (strcmp( argv[i], "-acc" ) == 0) {
- if (rmaChoice == RMA_ALL) rmaChoice = RMA_NONE;
- rmaChoice |= RMA_ACC;
- }
- else if (strcmp( argv[i], "-fence" ) == 0) {
- if (syncChoice == SYNC_ALL) syncChoice = SYNC_NONE;
- syncChoice |= SYNC_FENCE;
- }
- else if (strcmp( argv[i], "-lock" ) == 0) {
- if (syncChoice == SYNC_ALL) syncChoice = SYNC_NONE;
- syncChoice |= SYNC_LOCK;
- }
- else if (strcmp( argv[i], "-pscw" ) == 0) {
- if (syncChoice == SYNC_ALL) syncChoice = SYNC_NONE;
- syncChoice |= SYNC_PSCW;
- }
- else if (strcmp( argv[i], "-maxsz" ) == 0) {
- i++;
- maxSz = atoi( argv[i] );
- }
- else if (strcmp( argv[i], "-maxcount" ) == 0) {
- i++;
- maxCount = atoi( argv[i] );
- }
- else {
- fprintf( stderr, "Unrecognized argument %s\n", argv[i] );
- fprintf( stderr, "%s [ -put ] [ -acc ] [ -lock ] [ -fence ] [ -pscw ] [ -maxsz msgsize ]\n", argv[0] );
- MPI_Abort( MPI_COMM_WORLD, 1 );
- }
+ int maxSz = MAX_RMA_SIZE;
+
+ MPI_Init(&argc, &argv);
+
+ for (i = 1; i < argc; i++) {
+ if (strcmp(argv[i], "-put") == 0) {
+ if (rmaChoice == RMA_ALL)
+ rmaChoice = RMA_NONE;
+ rmaChoice |= RMA_PUT;
+ }
+ else if (strcmp(argv[i], "-acc") == 0) {
+ if (rmaChoice == RMA_ALL)
+ rmaChoice = RMA_NONE;
+ rmaChoice |= RMA_ACC;
+ }
+ else if (strcmp(argv[i], "-fence") == 0) {
+ if (syncChoice == SYNC_ALL)
+ syncChoice = SYNC_NONE;
+ syncChoice |= SYNC_FENCE;
+ }
+ else if (strcmp(argv[i], "-lock") == 0) {
+ if (syncChoice == SYNC_ALL)
+ syncChoice = SYNC_NONE;
+ syncChoice |= SYNC_LOCK;
+ }
+ else if (strcmp(argv[i], "-pscw") == 0) {
+ if (syncChoice == SYNC_ALL)
+ syncChoice = SYNC_NONE;
+ syncChoice |= SYNC_PSCW;
+ }
+ else if (strcmp(argv[i], "-maxsz") == 0) {
+ i++;
+ maxSz = atoi(argv[i]);
+ }
+ else if (strcmp(argv[i], "-maxcount") == 0) {
+ i++;
+ maxCount = atoi(argv[i]);
+ }
+ else {
+ fprintf(stderr, "Unrecognized argument %s\n", argv[i]);
+ fprintf(stderr,
+ "%s [ -put ] [ -acc ] [ -lock ] [ -fence ] [ -pscw ] [ -maxsz msgsize ]\n",
+ argv[0]);
+ MPI_Abort(MPI_COMM_WORLD, 1);
+ }
}
-
- MPI_Comm_rank( MPI_COMM_WORLD, &wrank );
- MPI_Comm_size( MPI_COMM_WORLD, &wsize );
+
+ MPI_Comm_rank(MPI_COMM_WORLD, &wrank);
+ MPI_Comm_size(MPI_COMM_WORLD, &wsize);
destRank = wrank + 1;
- while (destRank >= wsize) destRank = destRank - wsize;
+ while (destRank >= wsize)
+ destRank = destRank - wsize;
srcRank = wrank - 1;
- if (srcRank < 0) srcRank += wsize;
+ if (srcRank < 0)
+ srcRank += wsize;
/* Create groups for PSCW */
- MPI_Comm_group( MPI_COMM_WORLD, &wgroup );
- MPI_Group_incl( wgroup, 1, &destRank, &accessGroup );
- MPI_Group_incl( wgroup, 1, &srcRank, &exposureGroup );
- MPI_Group_free( &wgroup );
+ MPI_Comm_group(MPI_COMM_WORLD, &wgroup);
+ MPI_Group_incl(wgroup, 1, &destRank, &accessGroup);
+ MPI_Group_incl(wgroup, 1, &srcRank, &exposureGroup);
+ MPI_Group_free(&wgroup);
arraysize = maxSz * MAX_COUNT;
- arraybuffer = (int*)malloc( arraysize * sizeof(int) );
+ arraybuffer = (int *) malloc(arraysize * sizeof(int));
if (!arraybuffer) {
- fprintf( stderr, "Unable to allocate %d words\n", arraysize );
- MPI_Abort( MPI_COMM_WORLD, 1 );
+ fprintf(stderr, "Unable to allocate %d words\n", arraysize);
+ MPI_Abort(MPI_COMM_WORLD, 1);
}
- MPI_Win_create( arraybuffer, arraysize*sizeof(int), (int)sizeof(int),
- MPI_INFO_NULL, MPI_COMM_WORLD, &win );
+ MPI_Win_create(arraybuffer, arraysize * sizeof(int), (int) sizeof(int),
+ MPI_INFO_NULL, MPI_COMM_WORLD, &win);
if (maxCount > MAX_COUNT) {
- fprintf( stderr, "MaxCount must not exceed %d\n", MAX_COUNT );
- MPI_Abort( MPI_COMM_WORLD, 1 );
+ fprintf(stderr, "MaxCount must not exceed %d\n", MAX_COUNT);
+ MPI_Abort(MPI_COMM_WORLD, 1);
}
if ((syncChoice & SYNC_FENCE) && (rmaChoice & RMA_ACC)) {
- for (sz=1; sz<=maxSz; sz = sz + sz) {
- if (wrank == 0 && verbose)
- printf( "Accumulate with fence, %d elements\n", sz );
- cnt = 1;
- while (cnt <= maxCount) {
- RunAccFence( win, destRank, cnt, sz );
- cnt = 2 * cnt;
- }
- }
+ for (sz = 1; sz <= maxSz; sz = sz + sz) {
+ if (wrank == 0 && verbose)
+ printf("Accumulate with fence, %d elements\n", sz);
+ cnt = 1;
+ while (cnt <= maxCount) {
+ RunAccFence(win, destRank, cnt, sz);
+ cnt = 2 * cnt;
+ }
+ }
}
if ((syncChoice & SYNC_LOCK) && (rmaChoice & RMA_ACC)) {
- for (sz=1; sz<=maxSz; sz = sz + sz) {
- if (wrank == 0 && verbose)
- printf( "Accumulate with lock, %d elements\n", sz );
- cnt = 1;
- while (cnt <= maxCount) {
- RunAccLock( win, destRank, cnt, sz );
- cnt = 2 * cnt;
- }
- }
+ for (sz = 1; sz <= maxSz; sz = sz + sz) {
+ if (wrank == 0 && verbose)
+ printf("Accumulate with lock, %d elements\n", sz);
+ cnt = 1;
+ while (cnt <= maxCount) {
+ RunAccLock(win, destRank, cnt, sz);
+ cnt = 2 * cnt;
+ }
+ }
}
if ((syncChoice & SYNC_FENCE) && (rmaChoice & RMA_PUT)) {
- for (sz=1; sz<=maxSz; sz = sz + sz) {
- if (wrank == 0 && verbose)
- printf( "Put with fence, %d elements\n", sz );
- cnt = 1;
- while (cnt <= maxCount) {
- RunPutFence( win, destRank, cnt, sz );
- cnt = 2 * cnt;
- }
- }
+ for (sz = 1; sz <= maxSz; sz = sz + sz) {
+ if (wrank == 0 && verbose)
+ printf("Put with fence, %d elements\n", sz);
+ cnt = 1;
+ while (cnt <= maxCount) {
+ RunPutFence(win, destRank, cnt, sz);
+ cnt = 2 * cnt;
+ }
+ }
}
if ((syncChoice & SYNC_LOCK) && (rmaChoice & RMA_PUT)) {
- for (sz=1; sz<=maxSz; sz = sz + sz) {
- if (wrank == 0 && verbose)
- printf( "Put with lock, %d elements\n", sz );
- cnt = 1;
- while (cnt <= maxCount) {
- RunPutLock( win, destRank, cnt, sz );
- cnt = 2 * cnt;
- }
- }
+ for (sz = 1; sz <= maxSz; sz = sz + sz) {
+ if (wrank == 0 && verbose)
+ printf("Put with lock, %d elements\n", sz);
+ cnt = 1;
+ while (cnt <= maxCount) {
+ RunPutLock(win, destRank, cnt, sz);
+ cnt = 2 * cnt;
+ }
+ }
}
if ((syncChoice & SYNC_PSCW) && (rmaChoice & RMA_PUT)) {
- for (sz=1; sz<=maxSz; sz = sz + sz) {
- if (wrank == 0 && verbose)
- printf( "Put with pscw, %d elements\n", sz );
- cnt = 1;
- while (cnt <= maxCount) {
- RunPutPSCW( win, destRank, cnt, sz,
- exposureGroup, accessGroup );
- cnt = 2 * cnt;
- }
- }
+ for (sz = 1; sz <= maxSz; sz = sz + sz) {
+ if (wrank == 0 && verbose)
+ printf("Put with pscw, %d elements\n", sz);
+ cnt = 1;
+ while (cnt <= maxCount) {
+ RunPutPSCW(win, destRank, cnt, sz, exposureGroup, accessGroup);
+ cnt = 2 * cnt;
+ }
+ }
}
if ((syncChoice & SYNC_PSCW) && (rmaChoice & RMA_ACC)) {
- for (sz=1; sz<=maxSz; sz = sz + sz) {
- if (wrank == 0 && verbose)
- printf( "Accumulate with pscw, %d elements\n", sz );
- cnt = 1;
- while (cnt <= maxCount) {
- RunAccPSCW( win, destRank, cnt, sz,
- exposureGroup, accessGroup );
- cnt = 2 * cnt;
- }
- }
+ for (sz = 1; sz <= maxSz; sz = sz + sz) {
+ if (wrank == 0 && verbose)
+ printf("Accumulate with pscw, %d elements\n", sz);
+ cnt = 1;
+ while (cnt <= maxCount) {
+ RunAccPSCW(win, destRank, cnt, sz, exposureGroup, accessGroup);
+ cnt = 2 * cnt;
+ }
+ }
}
- MPI_Win_free( &win );
+ MPI_Win_free(&win);
- MPI_Group_free( &accessGroup );
- MPI_Group_free( &exposureGroup );
+ MPI_Group_free(&accessGroup);
+ MPI_Group_free(&exposureGroup);
/* If we get here without timing out or failing, we succeeded */
- if (wrank == 0) printf( " No Errors\n" );
-
+ if (wrank == 0)
+ printf(" No Errors\n");
+
MPI_Finalize();
return 0;
}
-void RunAccFence( MPI_Win win, int destRank, int cnt, int sz )
+void RunAccFence(MPI_Win win, int destRank, int cnt, int sz)
{
int k, i, j, one = 1;
- for (k=0; k<MAX_RUNS; k++) {
- MPI_Barrier( MPI_COMM_WORLD );
- MPI_Win_fence( 0, win );
- j = 0;
- for (i=0; i<cnt; i++) {
- MPI_Accumulate( &one, sz, MPI_INT, destRank,
- j, sz, MPI_INT, MPI_SUM, win );
- j += sz;
- }
- MPI_Win_fence( 0, win );
+ for (k = 0; k < MAX_RUNS; k++) {
+ MPI_Barrier(MPI_COMM_WORLD);
+ MPI_Win_fence(0, win);
+ j = 0;
+ for (i = 0; i < cnt; i++) {
+ MPI_Accumulate(&one, sz, MPI_INT, destRank, j, sz, MPI_INT, MPI_SUM, win);
+ j += sz;
+ }
+ MPI_Win_fence(0, win);
}
}
-void RunAccLock( MPI_Win win, int destRank, int cnt, int sz )
+void RunAccLock(MPI_Win win, int destRank, int cnt, int sz)
{
int k, i, j, one = 1;
- for (k=0; k<MAX_RUNS; k++) {
- MPI_Barrier( MPI_COMM_WORLD );
- MPI_Win_lock( MPI_LOCK_SHARED, destRank, 0, win );
- j = 0;
- for (i=0; i<cnt; i++) {
- MPI_Accumulate( &one, sz, MPI_INT, destRank,
- j, sz, MPI_INT, MPI_SUM, win );
- j += sz;
- }
- MPI_Win_unlock( destRank, win );
+ for (k = 0; k < MAX_RUNS; k++) {
+ MPI_Barrier(MPI_COMM_WORLD);
+ MPI_Win_lock(MPI_LOCK_SHARED, destRank, 0, win);
+ j = 0;
+ for (i = 0; i < cnt; i++) {
+ MPI_Accumulate(&one, sz, MPI_INT, destRank, j, sz, MPI_INT, MPI_SUM, win);
+ j += sz;
+ }
+ MPI_Win_unlock(destRank, win);
}
}
-void RunPutFence( MPI_Win win, int destRank, int cnt, int sz )
+void RunPutFence(MPI_Win win, int destRank, int cnt, int sz)
{
int k, i, j, one = 1;
- for (k=0; k<MAX_RUNS; k++) {
- MPI_Barrier( MPI_COMM_WORLD );
- MPI_Win_fence( 0, win );
- j = 0;
- for (i=0; i<cnt; i++) {
- MPI_Put( &one, sz, MPI_INT, destRank,
- j, sz, MPI_INT, win );
- j += sz;
- }
- MPI_Win_fence( 0, win );
+ for (k = 0; k < MAX_RUNS; k++) {
+ MPI_Barrier(MPI_COMM_WORLD);
+ MPI_Win_fence(0, win);
+ j = 0;
+ for (i = 0; i < cnt; i++) {
+ MPI_Put(&one, sz, MPI_INT, destRank, j, sz, MPI_INT, win);
+ j += sz;
+ }
+ MPI_Win_fence(0, win);
}
}
-void RunPutLock( MPI_Win win, int destRank, int cnt, int sz )
+void RunPutLock(MPI_Win win, int destRank, int cnt, int sz)
{
int k, i, j, one = 1;
- for (k=0; k<MAX_RUNS; k++) {
- MPI_Barrier( MPI_COMM_WORLD );
- MPI_Win_lock( MPI_LOCK_SHARED, destRank, 0, win );
- j = 0;
- for (i=0; i<cnt; i++) {
- MPI_Put( &one, sz, MPI_INT, destRank, j, sz, MPI_INT, win );
- j += sz;
- }
- MPI_Win_unlock( destRank, win );
+ for (k = 0; k < MAX_RUNS; k++) {
+ MPI_Barrier(MPI_COMM_WORLD);
+ MPI_Win_lock(MPI_LOCK_SHARED, destRank, 0, win);
+ j = 0;
+ for (i = 0; i < cnt; i++) {
+ MPI_Put(&one, sz, MPI_INT, destRank, j, sz, MPI_INT, win);
+ j += sz;
+ }
+ MPI_Win_unlock(destRank, win);
}
}
-void RunPutPSCW( MPI_Win win, int destRank, int cnt, int sz,
- MPI_Group exposureGroup, MPI_Group accessGroup )
+void RunPutPSCW(MPI_Win win, int destRank, int cnt, int sz,
+ MPI_Group exposureGroup, MPI_Group accessGroup)
{
int k, i, j, one = 1;
- for (k=0; k<MAX_RUNS; k++) {
- MPI_Barrier( MPI_COMM_WORLD );
- MPI_Win_post( exposureGroup, 0, win );
- MPI_Win_start( accessGroup, 0, win );
- j = 0;
- for (i=0; i<cnt; i++) {
- MPI_Put( &one, sz, MPI_INT, destRank, j, sz, MPI_INT, win );
- j += sz;
- }
- MPI_Win_complete( win );
- MPI_Win_wait( win );
+ for (k = 0; k < MAX_RUNS; k++) {
+ MPI_Barrier(MPI_COMM_WORLD);
+ MPI_Win_post(exposureGroup, 0, win);
+ MPI_Win_start(accessGroup, 0, win);
+ j = 0;
+ for (i = 0; i < cnt; i++) {
+ MPI_Put(&one, sz, MPI_INT, destRank, j, sz, MPI_INT, win);
+ j += sz;
+ }
+ MPI_Win_complete(win);
+ MPI_Win_wait(win);
}
}
-void RunAccPSCW( MPI_Win win, int destRank, int cnt, int sz,
- MPI_Group exposureGroup, MPI_Group accessGroup )
+void RunAccPSCW(MPI_Win win, int destRank, int cnt, int sz,
+ MPI_Group exposureGroup, MPI_Group accessGroup)
{
int k, i, j, one = 1;
- for (k=0; k<MAX_RUNS; k++) {
- MPI_Barrier( MPI_COMM_WORLD );
- MPI_Win_post( exposureGroup, 0, win );
- MPI_Win_start( accessGroup, 0, win );
- j = 0;
- for (i=0; i<cnt; i++) {
- MPI_Accumulate( &one, sz, MPI_INT, destRank,
- j, sz, MPI_INT, MPI_SUM, win );
- j += sz;
- }
- MPI_Win_complete( win );
- MPI_Win_wait( win );
+ for (k = 0; k < MAX_RUNS; k++) {
+ MPI_Barrier(MPI_COMM_WORLD);
+ MPI_Win_post(exposureGroup, 0, win);
+ MPI_Win_start(accessGroup, 0, win);
+ j = 0;
+ for (i = 0; i < cnt; i++) {
+ MPI_Accumulate(&one, sz, MPI_INT, destRank, j, sz, MPI_INT, MPI_SUM, win);
+ j += sz;
+ }
+ MPI_Win_complete(win);
+ MPI_Win_wait(win);
}
}
-----------------------------------------------------------------------
Summary of changes:
test/mpi/rma/manyrma2.c | 419 ++++++++++++++++++++++++----------------------
1 files changed, 219 insertions(+), 200 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1rc2-168-geb42f62
by noreply@mpich.org 18 Jan '14
by noreply@mpich.org 18 Jan '14
18 Jan '14
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 eb42f62412655c0944e89a93dcd27f5a5feda0f3 (commit)
via be278b7c77c18766495d9bc756ba4a3dc6d258e2 (commit)
from 38ef5818a883568e7dcc80f0e2aa0cfc972469be (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/eb42f62412655c0944e89a93dcd27f5a5…
commit eb42f62412655c0944e89a93dcd27f5a5feda0f3
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Fri Dec 20 15:39:42 2013 -0600
compile wrapper cleanup
Simplify logic in compile wrapper scripts. Use configure substitutions
where possible to better match pkg-config style.
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
Includes the following modifications by Pavan Balaji:
Remove the PAC_COMPILER_SHLIB_FLAGS usage, instead of modifying the
macro in confdb.
The ordering of flags in mpicc and friends does not match that of
pkg-config. This is because of two reasons.
1. pkg-config reorders flags when it outputs them. This requires us
to manually adjust the flags in mpicc to match up, and is error prone.
2. mpicc and friends provide LDFLAGS before the user-specified flags,
followed by the include and library directories. This is to make sure
that the LDFLAGS are listed before the application source file.
Reordering them to match pkg-config loses this flexibility.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/configure.ac b/configure.ac
index 7b095b2..cd0eaf6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1797,14 +1797,6 @@ export NEEDSPLIB
AM_CONDITIONAL([BUILD_PROFILING_LIB],[test "$NEEDSPLIB" = "yes"])
-# ---------------------------------------------------------------------------
-# determine rpath and other shared library flags for CC
-# src/env may not exist yet in a vpath build
-$MKDIR_P src/env
-cc_shlib_conf=src/env/cc_shlib.conf
-PAC_COMPILER_SHLIB_FLAGS([CC],[$cc_shlib_conf])
-AC_SUBST_FILE([cc_shlib_conf])
-
# output rpath flags in a usable format for mpich.pc (pkg-config)
if test "X$enable_wrapper_rpath" = "Xyes"; then
eval WRAPPER_RPATH_LDFLAGS=\"$hardcode_libdir_flag_spec\"
@@ -2090,11 +2082,6 @@ fi
# Now test for Fortran compiler characteristics
# ----------------------------------------------------------------------------
if test "$enable_f77" = "yes" ; then
- # determine rpath and other shared library flags for F77
- f77_shlib_conf=src/env/f77_shlib.conf
- PAC_COMPILER_SHLIB_FLAGS([F77],[$f77_shlib_conf])
- AC_SUBST_FILE([f77_shlib_conf])
-
AC_LANG_FORTRAN77
PAC_PROG_F77_EXCLAIM_COMMENTS(has_exclaim="yes",has_exclaim="no")
PAC_PROG_F77_HAS_INCDIR(src)
@@ -2191,11 +2178,6 @@ MPICONSTMODNAME=mpi_constants
MPISIZEOFMODNAME=mpi_sizeofs
MPIBASEMODNAME=mpi_base
if test "$enable_fc" = "yes" ; then
- # determine rpath and other shared library flags for FC
- fc_shlib_conf=src/env/fc_shlib.conf
- PAC_COMPILER_SHLIB_FLAGS([FC],[$fc_shlib_conf])
- AC_SUBST_FILE([fc_shlib_conf])
-
# Determine characteristics of the Fortran 90 compiler
# Find a Fortran 90 compiler. Sets FC
# Work around bug in autoconf that adds -g to FCFLAGS
@@ -2430,11 +2412,6 @@ int main() {
AC_SUBST(MPIR_CXX_COMPLEX)
AC_SUBST(MPIR_CXX_DOUBLE_COMPLEX)
AC_SUBST(MPIR_CXX_LONG_DOUBLE_COMPLEX)
-
- # determine rpath and other shared library flags for CXX
- cxx_shlib_conf=src/env/cxx_shlib.conf
- PAC_COMPILER_SHLIB_FLAGS([CXX],[$cxx_shlib_conf])
- AC_SUBST_FILE([cxx_shlib_conf])
fi
if test "$enable_cxx" = yes; then
diff --git a/src/env/Makefile.mk b/src/env/Makefile.mk
index e5480ae..b23a6c0 100644
--- a/src/env/Makefile.mk
+++ b/src/env/Makefile.mk
@@ -59,11 +59,7 @@ src/env/mpif90: $(top_builddir)/src/env/mpif90.sh
cp -p $? $@
endif !BUILD_BASH_SCRIPTS
-DISTCLEANFILES += $(top_builddir)/src/env/cc_shlib.conf \
- $(top_builddir)/src/env/cxx_shlib.conf \
- $(top_builddir)/src/env/f77_shlib.conf \
- $(top_builddir)/src/env/fc_shlib.conf \
- $(top_builddir)/src/env/mpicc \
+DISTCLEANFILES += $(top_builddir)/src/env/mpicc \
$(top_builddir)/src/env/mpicxx \
$(top_builddir)/src/env/mpif77 \
$(top_builddir)/src/env/mpif90
diff --git a/src/env/mpicc.bash.in b/src/env/mpicc.bash.in
index b1bcee1..29cc415 100644
--- a/src/env/mpicc.bash.in
+++ b/src/env/mpicc.bash.in
@@ -37,15 +37,8 @@ libdir=@libdir@
# Determined by a combination of environment variables and tests within
# configure (e.g., determining whehter -lsocket is needee)
CC="@CC@"
-CFLAGS="@WRAPPER_CFLAGS@"
-CPPFLAGS="@WRAPPER_CPPFLAGS@"
-LDFLAGS="@WRAPPER_LDFLAGS@"
-LIBS="@WRAPPER_LIBS@"
MPICH_VERSION="@MPICH_VERSION@"
-enable_wrapper_rpath="@enable_wrapper_rpath@"
-@cc_shlib_conf@
-
# Internal variables
# Show is set to echo to cause the compilation command to be echoed instead
# of executed.
@@ -189,13 +182,13 @@ fi
# Derived variables. These are assembled from variables set from the
# default, environment, configuration file (if any) and command-line
# options (if any)
-mpilibs="@LPMPILIBNAME@ -l@MPILIBNAME@"
+PROFILE_FOO=
# Handle the case of a profile switch
if [ -n "$profConf" ] ; then
profConffile=
if [ -s "$libdir/lib$profConf.a" -o -s "$libdir/lib$profConf.so" ] ; then
- mpilibs="-l$profConf $mpilibs"
+ PROFILE_FOO="-l$profConf"
elif [ -s "$sysconfdir/$profConf.conf" ] ; then
profConffile="$sysconfdir/$profConf.conf"
elif [ -s "$profConf.conf" ] ; then
@@ -205,15 +198,6 @@ if [ -n "$profConf" ] ; then
fi
if [ -n "$profConffile" -a -s "$profConffile" ] ; then
. $profConffile
- if [ -n "$PROFILE_INCPATHS" ] ; then
- CFLAGS="$PROFILE_INCPATHS $CFLAGS"
- fi
- if [ -n "$PROFILE_PRELIB" ] ; then
- mpilibs="$PROFILE_PRELIB $mpilibs"
- fi
- if [ -n "$PROFILE_POSTLIB" ] ; then
- mpilibs="$mpilibs $PROFILE_POSTLIB"
- fi
fi
fi
@@ -230,34 +214,15 @@ fi
# file or an object file. Instead, we just check for an option that
# suppressing linking, such as -c or -M.
if [ "$linking" = yes ] ; then
- # Attempt to encode rpath info into the executable if the user has not
- # disabled rpath usage and some flavor of rpath makes sense on this
- # platform.
- # TODO configure and config.rpath are computing more sophisticated rpath
- # schemes than this simple one. Consider updating this logic accordingly.
- if test "X$enable_wrapper_rpath" = "Xyes" ; then
- # prepend the path for the shared libraries to the library list
- eval mpilibs=\"${hardcode_libdir_flag_spec} \$mpilibs\"
- fi
-
- path_list=""
- for path in "-L$libdir" ; do
- found_path=0
- for p in $path_list ; do
- if [ "$path" = "$p" ] ; then found_path=1 ; break ; fi
- done
- if [ "$found_path" = "0" ] ; then path_list="$path_list $path" ; fi
- done
-
if [ "$nativelinking" = yes ] ; then
- $Show $CC $CPPFLAGS $CFLAGS $LDFLAGS "${allargs[@]}" -I$includedir
+ $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir
rc=$?
else
- $Show $CC $CPPFLAGS $CFLAGS $LDFLAGS "${allargs[@]}" -I$includedir ${path_list} $mpilibs $LIBS
+ $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@
rc=$?
fi
else
- $Show $CC $CPPFLAGS $CFLAGS "${allargs[@]}" -I$includedir
+ $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ "${allargs[@]}" -I$includedir
rc=$?
fi
diff --git a/src/env/mpicc.sh.in b/src/env/mpicc.sh.in
index db2074a..7a0f9db 100644
--- a/src/env/mpicc.sh.in
+++ b/src/env/mpicc.sh.in
@@ -37,15 +37,8 @@ libdir=@libdir@
# Determined by a combination of environment variables and tests within
# configure (e.g., determining whehter -lsocket is needee)
CC="@CC@"
-CFLAGS="@WRAPPER_CFLAGS@"
-CPPFLAGS="@WRAPPER_CPPFLAGS@"
-LDFLAGS="@WRAPPER_LDFLAGS@"
-LIBS="@WRAPPER_LIBS@"
MPICH_VERSION="@MPICH_VERSION@"
-enable_wrapper_rpath="@enable_wrapper_rpath@"
-@cc_shlib_conf@
-
# Internal variables
# Show is set to echo to cause the compilation command to be echoed instead
# of executed.
@@ -198,13 +191,13 @@ fi
# Derived variables. These are assembled from variables set from the
# default, environment, configuration file (if any) and command-line
# options (if any)
-mpilibs="@LPMPILIBNAME@ -l@MPILIBNAME@"
+PROFILE_FOO=
# Handle the case of a profile switch
if [ -n "$profConf" ] ; then
profConffile=
if [ -s "$libdir/lib$profConf.a" -o -s "$libdir/lib$profConf.so" ] ; then
- mpilibs="-l$profConf $mpilibs"
+ PROFILE_FOO="-l$profConf"
elif [ -s "$sysconfdir/$profConf.conf" ] ; then
profConffile="$sysconfdir/$profConf.conf"
elif [ -s "$profConf.conf" ] ; then
@@ -214,15 +207,6 @@ if [ -n "$profConf" ] ; then
fi
if [ -n "$profConffile" -a -s "$profConffile" ] ; then
. $profConffile
- if [ -n "$PROFILE_INCPATHS" ] ; then
- CFLAGS="$PROFILE_INCPATHS $CFLAGS"
- fi
- if [ -n "$PROFILE_PRELIB" ] ; then
- mpilibs="$PROFILE_PRELIB $mpilibs"
- fi
- if [ -n "$PROFILE_POSTLIB" ] ; then
- mpilibs="$mpilibs $PROFILE_POSTLIB"
- fi
fi
fi
@@ -239,33 +223,15 @@ fi
# file or an object file. Instead, we just check for an option that
# suppressing linking, such as -c or -M.
if [ "$linking" = yes ] ; then
- # Attempt to encode rpath info into the executable if the user has not
- # disabled rpath usage and some flavor of rpath makes sense on this
- # platform.
- # TODO configure and config.rpath are computing more sophisticated rpath
- # schemes than this simple one. Consider updating this logic accordingly.
- if test "X$enable_wrapper_rpath" = "Xyes" ; then
- eval mpilibs=\"${hardcode_libdir_flag_spec} \$mpilibs\"
- fi
-
- path_list=""
- for path in "-L$libdir" ; do
- found_path=0
- for p in $path_list ; do
- if [ "$path" = "$p" ] ; then found_path=1 ; break ; fi
- done
- if [ "$found_path" = "0" ] ; then path_list="$path_list $path" ; fi
- done
-
if [ "$nativelinking" = yes ] ; then
- $Show $CC $CPPFLAGS $CFLAGS $LDFLAGS $allargs -I$includedir
+ $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir
rc=$?
else
- $Show $CC $CPPFLAGS $CFLAGS $LDFLAGS $allargs -I$includedir ${path_list} $mpilibs $LIBS
+ $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@
rc=$?
fi
else
- $Show $CC $CPPFLAGS $CFLAGS $allargs -I$includedir
+ $Show $CC @WRAPPER_CPPFLAGS@ $PROFILE_INCPATHS @WRAPPER_CFLAGS@ $allargs -I$includedir
rc=$?
fi
diff --git a/src/env/mpicxx.bash.in b/src/env/mpicxx.bash.in
index bb031c8..61e56fe 100644
--- a/src/env/mpicxx.bash.in
+++ b/src/env/mpicxx.bash.in
@@ -34,14 +34,8 @@ libdir=@libdir@
# Default settings for compiler, flags, and libraries
CXX="@CXX@"
-CXXFLAGS="@WRAPPER_CXXFLAGS@"
-LDFLAGS="@WRAPPER_LDFLAGS@"
-LIBS="@WRAPPER_LIBS@"
MPICH_VERSION="@MPICH_VERSION@"
-enable_wrapper_rpath="@enable_wrapper_rpath@"
-@cxx_shlib_conf@
-
# Internal variables
# Show is set to echo to cause the compilation command to be echoed instead
# of executed.
@@ -190,17 +184,17 @@ fi
# Derived variables. These are assembled from variables set from the
# default, environment, configuration file (if any) and command-line
# options (if any)
-mpilibs="@LPMPILIBNAME@ -l@MPILIBNAME@"
cxxlibs=
if [ "@MPICXXLIBNAME@" != "@MPILIBNAME@" ] ; then
cxxlibs="-l@MPICXXLIBNAME@"
fi
+PROFILE_FOO=
# Handle the case of a profile switch
if [ -n "$profConf" ] ; then
profConffile=
if [ -s "$libdir/lib$profConf.a" -o -s "$libdir/lib$profConf.so" ] ; then
- mpilibs="-l$profConf $mpilibs"
+ PROFILE_FOO="-l$profConf"
elif [ -s "$sysconfdir/$profConf.conf" ] ; then
profConffile="$sysconfdir/$profConf.conf"
elif [ -s "$profConf.conf" ] ; then
@@ -210,15 +204,6 @@ if [ -n "$profConf" ] ; then
fi
if [ -n "$profConffile" -a -s "$profConffile" ] ; then
. $profConffile
- if [ -n "$PROFILE_INCPATHS" ] ; then
- CXXFLAGS="$PROFILE_INCPATHS $CXXFLAGS"
- fi
- if [ -n "$PROFILE_PRELIB" ] ; then
- mpilibs="$PROFILE_PRELIB $mpilibs"
- fi
- if [ -n "$PROFILE_POSTLIB" ] ; then
- mpilibs="$mpilibs $PROFILE_POSTLIB"
- fi
fi
fi
# A temporary statement to invoke the compiler
@@ -226,34 +211,15 @@ fi
# Eventually, we'll want to move this after any non-MPI implementation
# libraries
if [ "$linking" = yes ] ; then
- # Attempt to encode rpath info into the executable if the user has not
- # disabled rpath usage and some flavor of rpath makes sense on this
- # platform.
- # TODO configure and config.rpath are computing more sophisticated rpath
- # schemes than this simple one. Consider updating this logic accordingly.
- if test "X$enable_wrapper_rpath" = "Xyes" ; then
- # prepend the path for the shared libraries to the library list
- eval mpilibs=\"${hardcode_libdir_flag_spec} \$mpilibs\"
- fi
-
- path_list=""
- for path in "-L$libdir" ; do
- found_path=0
- for p in $path_list ; do
- if [ "$path" = "$p" ] ; then found_path=1 ; break ; fi
- done
- if [ "$found_path" = "0" ] ; then path_list="$path_list $path" ; fi
- done
-
if [ "$nativelinking" = yes ] ; then
- $Show $CXX $CXXFLAGS $LDFLAGS "${allargs[@]}" -I$includedir
+ $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir
rc=$?
else
- $Show $CXX $CXXFLAGS $LDFLAGS "${allargs[@]}" -I$includedir ${path_list} $shllibpath $cxxlibs $mpilibs $LIBS
+ $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@
rc=$?
fi
else
- $Show $CXX $CXXFLAGS "${allargs[@]}" -I$includedir
+ $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ "${allargs[@]}" -I$includedir
rc=$?
fi
diff --git a/src/env/mpicxx.sh.in b/src/env/mpicxx.sh.in
index a135bf7..92424cc 100644
--- a/src/env/mpicxx.sh.in
+++ b/src/env/mpicxx.sh.in
@@ -34,14 +34,8 @@ libdir=@libdir@
# Default settings for compiler, flags, and libraries
CXX="@CXX@"
-CXXFLAGS="@WRAPPER_CXXFLAGS@"
-LDFLAGS="@WRAPPER_LDFLAGS@"
-LIBS="@WRAPPER_LIBS@"
MPICH_VERSION="@MPICH_VERSION@"
-enable_wrapper_rpath="@enable_wrapper_rpath@"
-@cxx_shlib_conf@
-
# Internal variables
# Show is set to echo to cause the compilation command to be echoed instead
# of executed.
@@ -199,17 +193,17 @@ fi
# Derived variables. These are assembled from variables set from the
# default, environment, configuration file (if any) and command-line
# options (if any)
-mpilibs="@LPMPILIBNAME@ -l@MPILIBNAME@"
cxxlibs=
if [ "@MPICXXLIBNAME@" != "@MPILIBNAME@" ] ; then
cxxlibs="-l@MPICXXLIBNAME@"
fi
+PROFILE_FOO=
# Handle the case of a profile switch
if [ -n "$profConf" ] ; then
profConffile=
if [ -s "$libdir/lib$profConf.a" -o -s "$libdir/lib$profConf.so" ] ; then
- mpilibs="-l$profConf $mpilibs"
+ PROFILE_FOO="-l$profConf"
elif [ -s "$sysconfdir/$profConf.conf" ] ; then
profConffile="$sysconfdir/$profConf.conf"
elif [ -s "$profConf.conf" ] ; then
@@ -219,15 +213,6 @@ if [ -n "$profConf" ] ; then
fi
if [ -n "$profConffile" -a -s "$profConffile" ] ; then
. $profConffile
- if [ -n "$PROFILE_INCPATHS" ] ; then
- CXXFLAGS="$PROFILE_INCPATHS $CXXFLAGS"
- fi
- if [ -n "$PROFILE_PRELIB" ] ; then
- mpilibs="$PROFILE_PRELIB $mpilibs"
- fi
- if [ -n "$PROFILE_POSTLIB" ] ; then
- mpilibs="$mpilibs $PROFILE_POSTLIB"
- fi
fi
fi
# A temporary statement to invoke the compiler
@@ -235,33 +220,15 @@ fi
# Eventually, we'll want to move this after any non-MPI implementation
# libraries
if [ "$linking" = yes ] ; then
- # Attempt to encode rpath info into the executable if the user has not
- # disabled rpath usage and some flavor of rpath makes sense on this
- # platform.
- # TODO configure and config.rpath are computing more sophisticated rpath
- # schemes than this simple one. Consider updating this logic accordingly.
- if test "X$enable_wrapper_rpath" = "Xyes" ; then
- eval mpilibs=\"${hardcode_libdir_flag_spec} \$mpilibs\"
- fi
-
- path_list=""
- for path in "-L$libdir" ; do
- found_path=0
- for p in $path_list ; do
- if [ "$path" = "$p" ] ; then found_path=1 ; break ; fi
- done
- if [ "$found_path" = "0" ] ; then path_list="$path_list $path" ; fi
- done
-
if [ "$nativelinking" = yes ] ; then
- $Show $CXX $CXXFLAGS $LDFLAGS $allargs -I$includedir
+ $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir
rc=$?
else
- $Show $CXX $CXXFLAGS $LDFLAGS $allargs -I$includedir ${path_list} $shllibpath $cxxlibs $mpilibs $LIBS
+ $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir -L$libdir $cxxlibs $PROFILE_PRELIB $PROFILE_FOO @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@
rc=$?
fi
else
- $Show $CXX $CXXFLAGS $allargs -I$includedir
+ $Show $CXX $PROFILE_INCPATHS @WRAPPER_CXXFLAGS@ $allargs -I$includedir
rc=$?
fi
diff --git a/src/env/mpif77.bash.in b/src/env/mpif77.bash.in
index 04d7817..9625dd3 100644
--- a/src/env/mpif77.bash.in
+++ b/src/env/mpif77.bash.in
@@ -40,14 +40,8 @@ libdir=@libdir@
# configure (e.g., determining whehter -lsocket is needee)
F77="@F77@"
F77CPP="@F77CPP@"
-FFLAGS="@WRAPPER_FFLAGS@"
-LDFLAGS="@WRAPPER_LDFLAGS@"
-LIBS="@WRAPPER_LIBS@ @F77_OTHER_LIBS@"
MPICH_VERSION="@MPICH_VERSION@"
-enable_wrapper_rpath="@enable_wrapper_rpath@"
-@f77_shlib_conf@
-
# Internal variables
# Show is set to echo to cause the compilation command to be echoed instead
# of executed.
@@ -242,13 +236,13 @@ fi
# Derived variables. These are assembled from variables set from the
# default, environment, configuration file (if any) and command-line
# options (if any)
-mpilibs="@LPMPILIBNAME@ -l@MPILIBNAME@"
+PROFILE_FOO=
# Handle the case of a profile switch
if [ -n "$profConf" ] ; then
profConffile=
if [ -s "$libdir/lib$profConf.a" -o -s "$libdir/lib$profConf.so" ] ; then
- mpilibs="-l$profConf $mpilibs"
+ PROFILE_FOO="-l$profConf"
elif [ -s "$sysconfdir/$profConf.conf" ] ; then
profConffile="$sysconfdir/$profConf.conf"
elif [ -s "$profConf.conf" ] ; then
@@ -258,15 +252,6 @@ if [ -n "$profConf" ] ; then
fi
if [ -n "$profConffile" -a -s "$profConffile" ] ; then
. $profConffile
- if [ -n "$PROFILE_INCPATHS" ] ; then
- FFLAGS="$PROFILE_INCPATHS $FFLAGS"
- fi
- if [ -n "$PROFILE_PRELIB" ] ; then
- mpilibs="$PROFILE_PRELIB $mpilibs"
- fi
- if [ -n "$PROFILE_POSTLIB" ] ; then
- mpilibs="$mpilibs $PROFILE_POSTLIB"
- fi
fi
fi
#
@@ -276,34 +261,15 @@ fi
# libraries
#
if [ "$linking" = yes ] ; then
- # Attempt to encode rpath info into the executable if the user has not
- # disabled rpath usage and some flavor of rpath makes sense on this
- # platform.
- # TODO configure and config.rpath are computing more sophisticated rpath
- # schemes than this simple one. Consider updating this logic accordingly.
- if test "X$enable_wrapper_rpath" = "Xyes" ; then
- # prepend the path for the shared libraries to the library list
- eval mpilibs=\"${hardcode_libdir_flag_spec} \$mpilibs\"
- fi
-
- path_list=""
- for path in "-L$libdir" ; do
- found_path=0
- for p in $path_list ; do
- if [ "$path" = "$p" ] ; then found_path=1 ; break ; fi
- done
- if [ "$found_path" = "0" ] ; then path_list="$path_list $path" ; fi
- done
-
if [ "$nativelinking" = yes ] ; then
- $Show $F77 $FFLAGS $LDFLAGS "${allargs[@]}" -I$includedir
+ $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir
rc=$?
else
- $Show $F77 $FFLAGS $LDFLAGS "${allargs[@]}" -I$includedir ${path_list} $mpilibs $LIBS
+ $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ @F77_OTHER_LIBS@
rc=$?
fi
else
- $Show $F77 $FFLAGS "${allargs[@]}" -I$includedir
+ $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ "${allargs[@]}" -I$includedir
rc=$?
fi
if [ -n "$rmfiles" ] ; then
diff --git a/src/env/mpif77.sh.in b/src/env/mpif77.sh.in
index ab8077e..73f664d 100644
--- a/src/env/mpif77.sh.in
+++ b/src/env/mpif77.sh.in
@@ -40,14 +40,8 @@ libdir=@libdir@
# configure (e.g., determining whehter -lsocket is needee)
F77="@F77@"
F77CPP="@F77CPP@"
-FFLAGS="@WRAPPER_FFLAGS@"
-LDFLAGS="@WRAPPER_LDFLAGS@"
-LIBS="@WRAPPER_LIBS@ @F77_OTHER_LIBS@"
MPICH_VERSION="@MPICH_VERSION@"
-enable_wrapper_rpath="@enable_wrapper_rpath@"
-@f77_shlib_conf@
-
# Internal variables
# Show is set to echo to cause the compilation command to be echoed instead
# of executed.
@@ -264,13 +258,13 @@ fi
# Derived variables. These are assembled from variables set from the
# default, environment, configuration file (if any) and command-line
# options (if any)
-mpilibs="@LPMPILIBNAME@ -l@MPILIBNAME@"
+PROFILE_FOO=
# Handle the case of a profile switch
if [ -n "$profConf" ] ; then
profConffile=
if [ -s "$libdir/lib$profConf.a" -o -s "$libdir/lib$profConf.so" ] ; then
- mpilibs="-l$profConf $mpilibs"
+ PROFILE_FOO="-l$profConf"
elif [ -s "$sysconfdir/$profConf.conf" ] ; then
profConffile="$sysconfdir/$profConf.conf"
elif [ -s "$profConf.conf" ] ; then
@@ -280,15 +274,6 @@ if [ -n "$profConf" ] ; then
fi
if [ -n "$profConffile" -a -s "$profConffile" ] ; then
. $profConffile
- if [ -n "$PROFILE_INCPATHS" ] ; then
- FFLAGS="$PROFILE_INCPATHS $FFLAGS"
- fi
- if [ -n "$PROFILE_PRELIB" ] ; then
- mpilibs="$PROFILE_PRELIB $mpilibs"
- fi
- if [ -n "$PROFILE_POSTLIB" ] ; then
- mpilibs="$mpilibs $PROFILE_POSTLIB"
- fi
fi
fi
#
@@ -298,33 +283,15 @@ fi
# libraries
#
if [ "$linking" = yes ] ; then
- # Attempt to encode rpath info into the executable if the user has not
- # disabled rpath usage and some flavor of rpath makes sense on this
- # platform.
- # TODO configure and config.rpath are computing more sophisticated rpath
- # schemes than this simple one. Consider updating this logic accordingly.
- if test "X$enable_wrapper_rpath" = "Xyes" ; then
- eval mpilibs=\"${hardcode_libdir_flag_spec} \$mpilibs\"
- fi
-
- path_list=""
- for path in "-L$libdir" ; do
- found_path=0
- for p in $path_list ; do
- if [ "$path" = "$p" ] ; then found_path=1 ; break ; fi
- done
- if [ "$found_path" = "0" ] ; then path_list="$path_list $path" ; fi
- done
-
if [ "$nativelinking" = yes ] ; then
- $Show $F77 $FFLAGS $LDFLAGS $allargs -I$includedir
+ $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir
rc=$?
else
- $Show $F77 $FFLAGS $LDFLAGS $allargs -I$includedir ${path_list} $mpilibs $LIBS
+ $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ $allargs -I$includedir -L$libdir $PROFILE_PRELIB $PROFILE_FOO @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ @F77_OTHER_LIBS@
rc=$?
fi
else
- $Show $F77 $FFLAGS $allargs -I$includedir
+ $Show $F77 $PROFILE_INCPATHS @WRAPPER_FFLAGS@ $allargs -I$includedir
rc=$?
fi
if [ -n "$rmfiles" ] ; then
diff --git a/src/env/mpif90.bash.in b/src/env/mpif90.bash.in
index e3529af..c93ff1f 100644
--- a/src/env/mpif90.bash.in
+++ b/src/env/mpif90.bash.in
@@ -53,14 +53,8 @@ FCMODINC="@FCMODINCFLAG@"
FCMODINCSPEC="@FCMODINCSPEC@"
FCEXT="@FCEXT@"
-FCFLAGS="@WRAPPER_FCFLAGS@"
-LDFLAGS="@WRAPPER_LDFLAGS@"
-LIBS="@WRAPPER_LIBS@ @FC_OTHER_LIBS@"
MPICH_VERSION="@MPICH_VERSION@"
-enable_wrapper_rpath="@enable_wrapper_rpath@"
-@fc_shlib_conf@
-
# Internal variables
# Show is set to echo to cause the compilation command to be echoed instead
# of executed.
@@ -259,13 +253,13 @@ fi
# The library lib${MPILIBNAME}f90 contains the f90-specific features,
# such as the module objects and the routines defined by them
# (MPI_SIZEOF is handled in lib${MPILIBNAME)f90, for example).
-mpilibs="@LPMPILIBNAME@ -l@MPILIBNAME@"
+PROFILE_FOO=
# Handle the case of a profile switch
if [ -n "$profConf" ] ; then
profConffile=
if [ -s "$libdir/lib$profConf.a" -o -s "$libdir/lib$profConf.so" ] ; then
- mpilibs="-l$profConf $mpilibs"
+ PROFILE_FOO="-l$profConf"
elif [ -s "$sysconfdir/$profConf.conf" ] ; then
profConffile="$sysconfdir/$profConf.conf"
elif [ -s "$profConf.conf" ] ; then
@@ -275,15 +269,6 @@ if [ -n "$profConf" ] ; then
fi
if [ -n "$profConffile" -a -s "$profConffile" ] ; then
. $profConffile
- if [ -n "$PROFILE_INCPATHS" ] ; then
- FCFLAGS="$PROFILE_INCPATHS $FCFLAGS"
- fi
- if [ -n "$PROFILE_PRELIB" ] ; then
- mpilibs="$PROFILE_PRELIB $mpilibs"
- fi
- if [ -n "$PROFILE_POSTLIB" ] ; then
- mpilibs="$mpilibs $PROFILE_POSTLIB"
- fi
fi
fi
@@ -327,34 +312,15 @@ fi
# libraries
if [ "$linking" = yes ] ; then
- # Attempt to encode rpath info into the executable if the user has not
- # disabled rpath usage and some flavor of rpath makes sense on this
- # platform.
- # TODO configure and config.rpath are computing more sophisticated rpath
- # schemes than this simple one. Consider updating this logic accordingly.
- if test "X$enable_wrapper_rpath" = "Xyes" ; then
- # prepend the path for the shared libraries to the library list
- eval mpilibs=\"${hardcode_libdir_flag_spec} \$mpilibs\"
- fi
-
- path_list=""
- for path in "-L$libdir" ; do
- found_path=0
- for p in $path_list ; do
- if [ "$path" = "$p" ] ; then found_path=1 ; break ; fi
- done
- if [ "$found_path" = "0" ] ; then path_list="$path_list $path" ; fi
- done
-
if [ "$nativelinking" = yes ] ; then
- $Show $FC $FCFLAGS $LDFLAGS "${allargs[@]}"
+ $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}"
rc=$?
else
- $Show $FC $FCFLAGS $LDFLAGS "${allargs[@]}" $FCINCDIRS $FCMODDIRS ${path_list} $FCMODLIBS $mpilibs $LIBS
+ $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ "${allargs[@]}" $FCINCDIRS $FCMODDIRS -L$libdir $FCMODLIBS $PROFILE_PRELIB $PROFILE_FOO @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ @FC_OTHER_LIBS@
rc=$?
fi
else
- $Show $FC $FCFLAGS "${allargs[@]}" $FCINCDIRS $FCMODDIRS
+ $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ "${allargs[@]}" $FCINCDIRS $FCMODDIRS
rc=$?
fi
if [ -n "$rmfiles" ] ; then
diff --git a/src/env/mpif90.sh.in b/src/env/mpif90.sh.in
index 238df12..6f862c0 100644
--- a/src/env/mpif90.sh.in
+++ b/src/env/mpif90.sh.in
@@ -53,14 +53,8 @@ FCMODINC="@FCMODINCFLAG@"
FCMODINCSPEC="@FCMODINCSPEC@"
FCEXT="@FCEXT@"
#
-FCFLAGS="@WRAPPER_FCFLAGS@"
-LDFLAGS="@WRAPPER_LDFLAGS@"
-LIBS="@WRAPPER_LIBS@ @FC_OTHER_LIBS@"
MPICH_VERSION="@MPICH_VERSION@"
-enable_wrapper_rpath="@enable_wrapper_rpath@"
-@fc_shlib_conf@
-
# Internal variables
# Show is set to echo to cause the compilation command to be echoed instead
# of executed.
@@ -276,13 +270,13 @@ fi
# Derived variables. These are assembled from variables set from the
# default, environment, configuration file (if any) and command-line
# options (if any)
-mpilibs="@LPMPILIBNAME@ -l@MPILIBNAME@"
+PROFILE_FOO=
# Handle the case of a profile switch
if [ -n "$profConf" ] ; then
profConffile=
if [ -s "$libdir/lib$profConf.a" -o -s "$libdir/lib$profConf.so" ] ; then
- mpilibs="-l$profConf $mpilibs"
+ PROFILE_FOO="-l$profConf"
elif [ -s "$sysconfdir/$profConf.conf" ] ; then
profConffile="$sysconfdir/$profConf.conf"
elif [ -s "$profConf.conf" ] ; then
@@ -292,15 +286,6 @@ if [ -n "$profConf" ] ; then
fi
if [ -n "$profConffile" -a -s "$profConffile" ] ; then
. $profConffile
- if [ -n "$PROFILE_INCPATHS" ] ; then
- FCFLAGS="$PROFILE_INCPATHS $FCFLAGS"
- fi
- if [ -n "$PROFILE_PRELIB" ] ; then
- mpilibs="$PROFILE_PRELIB $mpilibs"
- fi
- if [ -n "$PROFILE_POSTLIB" ] ; then
- mpilibs="$mpilibs $PROFILE_POSTLIB"
- fi
fi
fi
@@ -344,33 +329,15 @@ fi
# libraries
if [ "$linking" = yes ] ; then
- # Attempt to encode rpath info into the executable if the user has not
- # disabled rpath usage and some flavor of rpath makes sense on this
- # platform.
- # TODO configure and config.rpath are computing more sophisticated rpath
- # schemes than this simple one. Consider updating this logic accordingly.
- if test "X$enable_wrapper_rpath" = "Xyes" ; then
- eval mpilibs=\"${hardcode_libdir_flag_spec} \$mpilibs\"
- fi
-
- path_list=""
- for path in "-L$libdir" ; do
- found_path=0
- for p in $path_list ; do
- if [ "$path" = "$p" ] ; then found_path=1 ; break ; fi
- done
- if [ "$found_path" = "0" ] ; then path_list="$path_list $path" ; fi
- done
-
if [ "$nativelinking" = yes ] ; then
- $Show $FC $FCFLAGS $LDFLAGS $allargs
+ $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ @WRAPPER_LDFLAGS@ $allargs
rc=$?
else
- $Show $FC $FCFLAGS $LDFLAGS $allargs $FCINCDIRS $FCMODDIRS ${path_list} $FCMODLIBS $mpilibs $LIBS
+ $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ $allargs $FCINCDIRS $FCMODDIRS -L$libdir $FCMODLIBS $PROFILE_PRELIB $PROFILE_FOO @LPMPILIBNAME@ -l@MPILIBNAME@ $PROFILE_POSTLIB @WRAPPER_LIBS@ @FC_OTHER_LIBS@
rc=$?
fi
else
- $Show $FC $FCFLAGS $allargs $FCINCDIRS $FCMODDIRS
+ $Show $FC $PROFILE_INCPATHS @WRAPPER_FCFLAGS@ $allargs $FCINCDIRS $FCMODDIRS
rc=$?
fi
if [ -n "$rmfiles" ] ; then
http://git.mpich.org/mpich.git/commitdiff/be278b7c77c18766495d9bc756ba4a3dc…
commit be278b7c77c18766495d9bc756ba4a3dc6d258e2
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Mon Dec 9 08:01:58 2013 -0600
Improve pkg-config support
Add rpath flags to pkg-config to match compiler wrappers. Fixes #1044
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/configure.ac b/configure.ac
index 21fc951..7b095b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1805,6 +1805,12 @@ cc_shlib_conf=src/env/cc_shlib.conf
PAC_COMPILER_SHLIB_FLAGS([CC],[$cc_shlib_conf])
AC_SUBST_FILE([cc_shlib_conf])
+# output rpath flags in a usable format for mpich.pc (pkg-config)
+if test "X$enable_wrapper_rpath" = "Xyes"; then
+ eval WRAPPER_RPATH_LDFLAGS=\"$hardcode_libdir_flag_spec\"
+fi
+AC_SUBST(WRAPPER_RPATH_LDFLAGS)
+
# ---------------------------------------------------------------------------
# Support for MPI_T performance variables
diff --git a/src/packaging/pkgconfig/mpich.pc.in b/src/packaging/pkgconfig/mpich.pc.in
index ece3e55..48657fa 100644
--- a/src/packaging/pkgconfig/mpich.pc.in
+++ b/src/packaging/pkgconfig/mpich.pc.in
@@ -9,7 +9,7 @@ Description: High Performance and portable MPI
Version: @MPICH_VERSION@
URL: http://www.mcs.anl.gov/research/projects/mpich
Requires:
-Libs: @WRAPPER_LDFLAGS@ -L${libdir} @LPMPILIBNAME@ -l@MPILIBNAME@ @WRAPPER_LIBS@
+Libs: @WRAPPER_RPATH_LDFLAGS@ @WRAPPER_LDFLAGS@ -L${libdir} @LPMPILIBNAME@ -l@MPILIBNAME@ @WRAPPER_LIBS@
Cflags: @WRAPPER_CPPFLAGS@ @WRAPPER_CFLAGS@ -I${includedir}
# pkg-config does not understand Cxxflags, etc. So we allow users to
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 27 ++++-----------------
src/env/Makefile.mk | 6 +----
src/env/mpicc.bash.in | 45 ++++-------------------------------
src/env/mpicc.sh.in | 44 ++++------------------------------
src/env/mpicxx.bash.in | 44 ++++------------------------------
src/env/mpicxx.sh.in | 43 ++++-----------------------------
src/env/mpif77.bash.in | 44 ++++------------------------------
src/env/mpif77.sh.in | 43 ++++-----------------------------
src/env/mpif90.bash.in | 44 ++++------------------------------
src/env/mpif90.sh.in | 43 ++++-----------------------------
src/packaging/pkgconfig/mpich.pc.in | 2 +-
11 files changed, 47 insertions(+), 338 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1rc2-166-g38ef581
by noreply@mpich.org 16 Jan '14
by noreply@mpich.org 16 Jan '14
16 Jan '14
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 38ef5818a883568e7dcc80f0e2aa0cfc972469be (commit)
from 4e1b470dd1b47b514c65da9add3613fdd301c90c (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/38ef5818a883568e7dcc80f0e2aa0cfc9…
commit 38ef5818a883568e7dcc80f0e2aa0cfc972469be
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Mon Jan 13 15:43:51 2014 -0600
a partial round of datatype optimizations
Some datatype performance tests in the MPICH test suite fail:
(perf/twovec, perf/nestvec, perf/nestvec2, perf/indexperf,
perf/transp-datatype).
This changeset introduces a few optimizations that operate on the
dataloop representation to make it more performant. perf/indexperf
should still fail under these changes.
Original-author: Bill Gropp <wgropp(a)illinois.edu>
See #1788, for which this resolves some but not all performance issues.
Signed-off-by: Rob Latham <robl(a)mcs.anl.gov>
diff --git a/src/mpid/common/datatype/dataloop/Makefile.mk b/src/mpid/common/datatype/dataloop/Makefile.mk
index ec67180..e2f6cf1 100644
--- a/src/mpid/common/datatype/dataloop/Makefile.mk
+++ b/src/mpid/common/datatype/dataloop/Makefile.mk
@@ -21,7 +21,8 @@ lib_lib@MPILIBNAME@_la_SOURCES += \
src/mpid/common/datatype/dataloop/segment_count.c \
src/mpid/common/datatype/dataloop/segment_flatten.c \
src/mpid/common/datatype/dataloop/segment_packunpack.c \
- src/mpid/common/datatype/dataloop/subarray_support.c
+ src/mpid/common/datatype/dataloop/subarray_support.c \
+ src/mpid/common/datatype/dataloop/dataloop_optimize.c
# several headers are included by the rest of MPICH
AM_CPPFLAGS += -I$(top_srcdir)/src/mpid/common/datatype
diff --git a/src/mpid/common/datatype/dataloop/dataloop.c b/src/mpid/common/datatype/dataloop/dataloop.c
index 532c51d..2cca5b9 100644
--- a/src/mpid/common/datatype/dataloop/dataloop.c
+++ b/src/mpid/common/datatype/dataloop/dataloop.c
@@ -54,7 +54,7 @@
/*@
Dataloop_free - deallocate the resources used to store a dataloop
-Input Parameters:
+Input/output Parameters:
. dataloop - pointer to dataloop structure
@*/
void PREPEND_PREFIX(Dataloop_free)(DLOOP_Dataloop **dataloop)
@@ -483,7 +483,7 @@ void PREPEND_PREFIX(Dataloop_alloc_and_copy)(int kind,
/*@
Dataloop_struct_alloc - allocate the resources used to store a dataloop and
- copy in old dataloop as appropriate. this version
+ copy in old dataloop as appropriate. This version
is specifically for use when a struct dataloop is
being created; the space to hold old dataloops in
this case must be described back to the
diff --git a/src/mpid/common/datatype/dataloop/dataloop_create.h b/src/mpid/common/datatype/dataloop/dataloop_create.h
index f054429..803d7d4 100644
--- a/src/mpid/common/datatype/dataloop/dataloop_create.h
+++ b/src/mpid/common/datatype/dataloop/dataloop_create.h
@@ -94,5 +94,14 @@ DLOOP_Count PREPEND_PREFIX(Type_blockindexed_count_contig)(DLOOP_Count count,
const void *disp_array,
int dispinbytes,
DLOOP_Offset old_extent);
-
+
+int PREPEND_PREFIX(Dataloop_optimize)( DLOOP_Dataloop *dlpOld_p );
+
+int PREPEND_PREFIX(Dataloop_est_complexity)(DLOOP_Dataloop *,
+ MPI_Aint *, MPI_Aint *);
+int PREPEND_PREFIX(Dataloop_est_struct_complexity)( int,
+ const int [],
+ const DLOOP_Type [],
+ MPI_Aint *,
+ MPI_Aint * );
#endif
diff --git a/src/mpid/common/datatype/dataloop/dataloop_create_contig.c b/src/mpid/common/datatype/dataloop/dataloop_create_contig.c
index 290bf2a..2f3421c 100644
--- a/src/mpid/common/datatype/dataloop/dataloop_create_contig.c
+++ b/src/mpid/common/datatype/dataloop/dataloop_create_contig.c
@@ -11,14 +11,17 @@
Dataloop_contiguous - create the dataloop representation for a
contiguous datatype
- Arguments:
+ Input Parameters:
+ int icount,
-. MPI_Datatype oldtype,
-. DLOOP_Dataloop **dlp_p,
-. int *dlsz_p,
-. int *dldepth_p,
+. DLOOP_Type oldtype
- int flag
+ Output Parameters:
++ DLOOP_Dataloop **dlp_p,
+. DLOOP_Size *dlsz_p,
+- int *dldepth_p,
+
+
.N Errors
.N Returns 0 on success, -1 on failure.
@*/
diff --git a/src/mpid/common/datatype/dataloop/dataloop_create_struct.c b/src/mpid/common/datatype/dataloop/dataloop_create_struct.c
index 7d51b7b..47bbffc 100644
--- a/src/mpid/common/datatype/dataloop/dataloop_create_struct.c
+++ b/src/mpid/common/datatype/dataloop/dataloop_create_struct.c
@@ -11,6 +11,57 @@
#error "You must explicitly include a header that sets the PREPEND_PREFIX and includes dataloop_parts.h"
#endif
+
+/*
+=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
+
+categories :
+ - name : DATATYPE
+ description : Datatype optimization parameters
+
+cvars:
+ - name : MPIR_CVAR_DATALOOP_OPTIMIZE
+ category : DATATYPE
+ type : boolean
+ default : true
+ class : none
+ verbosity : MPI_T_VERBOSITY_USER_BASIC
+ scope : MPI_T_SCOPE_ALL_EQ
+ description : >-
+ By default, the internal representation of an MPI datatype that
+ is used by MPICH to move data is very similar to the original
+ description of the datatype. If this flag is true, additional
+ optimizations are used to improve the performance of datatypes.
+
+ - name : MPIR_CVAR_DATALOOP_FLATTEN
+ category : DATATYPE
+ type : boolean
+ class : none
+ default : true
+ verbosity : MPI_T_VERBOSITY_USER_BASIC
+ scope : MPI_T_SCOPE_ALL_EQ
+ description : >-
+ If true, attempt to "flatten" the internal representation of
+ MPI struct datatypes (created with MPI_Type_create_struct).
+
+ - name : MPIR_CVAR_DATALOOP_FLATTEN_MULT
+ category : DATATYPE
+ type : int
+ class : none
+ default : 2
+ verbosity : MPI_T_VERBOSITY_USER_BASIC
+ scope : MPI_T_SCOPE_ALL_EQ
+ description : >-
+ Flattening an MPI struct datatype does not always improve
+ performance. This parameter is a threshold that is used in
+ comparing the size of the description with the amount of data
+ moved. Larger values make it more likely that a struct datatype
+ will be flattened. The default value is adequate for flattening
+ simple structs, and will usually avoid flattening structs
+ containing vectors or block-indexed data.
+
+=== END_MPI_T_CVAR_INFO_BLOCK ===
+*/
static int DLOOP_Dataloop_create_struct_memory_error(void);
static int DLOOP_Dataloop_create_unique_type_struct(DLOOP_Count count,
const int *blklens,
@@ -238,19 +289,37 @@ int PREPEND_PREFIX(Dataloop_create_struct)(DLOOP_Count count,
* if caller asked for homogeneous or all bytes representation,
* flatten the type and store it as an indexed type so that
* there are no branches in the dataloop tree.
+ *
+ * Note that this is not always an optimization - for example,
+ * replacing two long block_indexed with one longer indexed (with
+ * the additional blockcount array) is likely to be slower, because
+ * of the additional memory motion required.
*/
- if ((flag == DLOOP_DATALOOP_HOMOGENEOUS) ||
- (flag == DLOOP_DATALOOP_ALL_BYTES))
- {
- return DLOOP_Dataloop_create_flattened_struct(count,
- blklens,
- disps,
- oldtypes,
- dlp_p,
- dlsz_p,
- dldepth_p,
- flag);
- }
+ if (MPIR_CVAR_DATALOOP_FLATTEN && (
+ (flag == DLOOP_DATALOOP_HOMOGENEOUS) ||
+ (flag == DLOOP_DATALOOP_ALL_BYTES) ))
+ {
+ MPI_Aint nElms = 0, nDesc = 0;
+ PREPEND_PREFIX(Dataloop_est_struct_complexity)( count,
+ blklens,
+ oldtypes,
+ &nElms,
+ &nDesc );
+
+ /* Only convert to flattened if the flattened description
+ is likely to be more efficient. We estimate this
+ by */
+ if ( nDesc * 24 * MPIR_CVAR_DATALOOP_FLATTEN_MULT > nElms) {
+ return DLOOP_Dataloop_create_flattened_struct(count,
+ blklens,
+ disps,
+ oldtypes,
+ dlp_p,
+ dlsz_p,
+ dldepth_p,
+ flag);
+ }
+ }
/* scan through types and gather derived type info */
for (i=0; i < count; i++)
diff --git a/src/mpid/common/datatype/dataloop/dataloop_optimize.c b/src/mpid/common/datatype/dataloop/dataloop_optimize.c
new file mode 100644
index 0000000..54cd14c
--- /dev/null
+++ b/src/mpid/common/datatype/dataloop/dataloop_optimize.c
@@ -0,0 +1,514 @@
+/* -*- Mode: C; c-basic-offset:4 ; -*- */
+
+/*
+ * (C) 2001 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+
+#include "dataloop.h"
+
+#define MPICH_DEBUG_DATALOOP
+#ifdef MPICH_DEBUG_DATALOOP
+static int level = 0;
+static int printDataloop = 0;
+static int printIfOptimized = 0;
+
+/* Print format:
+ (spaces for level).(el_size,el_extent,el_type)(count)....
+*/
+static void dl_print_dataloop( int, DLOOP_Dataloop * );
+static void dl_print_contig( int, DLOOP_Dataloop * );
+static void dl_print_vector( int, DLOOP_Dataloop * );
+static void dl_print_blockindexed( int, DLOOP_Dataloop * );
+static void dl_print_struct( int, DLOOP_Dataloop * );
+static void dl_print( int, const char * );
+
+static void dl_print_tab( int l )
+{
+ int i;
+ for (i=2*l; i!=0; i--) printf( "%c", ' ' );
+}
+static void dl_print_base( DLOOP_Dataloop *dp )
+{
+ printf( "(%ld,%ld,%lx)(%ld)", (long)dp->el_size, (long)dp->el_extent,
+ (long)dp->el_type, (long)dp->loop_params.count );
+}
+static void dl_print( int l, const char *s )
+{
+ dl_print_tab(l);
+ printf( "%s", s );
+}
+static void dl_print_contig( int l, DLOOP_Dataloop *dp )
+{
+ dl_print_tab(l);
+ printf( "CONTIG " );
+ dl_print_base( dp );
+ printf( "\n" );
+}
+static void dl_print_vector( int l, DLOOP_Dataloop *dp )
+{
+ int stride = dp->loop_params.v_t.stride;
+ int blocksize = dp->loop_params.v_t.blocksize ;
+ dl_print_tab(l);
+ printf( "VECTOR " );
+ dl_print_base( dp );
+ printf( ":Stride %d Blocksize %d\n", stride, blocksize );
+}
+static void dl_print_blockindexed( int l, DLOOP_Dataloop *dp )
+{
+ int blocksize = dp->loop_params.bi_t.blocksize ;
+ DLOOP_Offset *offarray = dp->loop_params.bi_t.offset_array;
+ int i, n;
+ dl_print_tab(l);
+ printf( "BLOCKINDEXED " );
+ dl_print_base( dp );
+ printf( ":Blocksize %d:", blocksize );
+ n = dp->loop_params.bi_t.count;
+ if (n > 8) n = 8;
+ for (i=0; i<n; i++) {
+ printf( "%lx,", (long)offarray[i] );
+ }
+ if (dp->loop_params.bi_t.count > n) printf( "..." );
+ printf( "\n" );
+}
+static void dl_print_indexed( int l, DLOOP_Dataloop *dp )
+{
+ DLOOP_Count *blocksizearray = dp->loop_params.i_t.blocksize_array ;
+ DLOOP_Offset *offarray = dp->loop_params.i_t.offset_array;
+ int i, n;
+ int minblock, maxblock;
+ dl_print_tab(l);
+ printf( "INDEXED " );
+ dl_print_base( dp );
+ n = dp->loop_params.i_t.count;
+ minblock = maxblock = (n>0) ? blocksizearray[0] : 0;
+ for (i=0; i<n; i++) {
+ if (blocksizearray[i] > maxblock) maxblock = blocksizearray[i];
+ if (blocksizearray[i] < minblock) minblock = blocksizearray[i];
+ }
+ printf( "blocks in [%d,%d]", minblock, maxblock );
+
+ if (n > 8) n = 8;
+ for (i=0; i<n; i++) {
+ printf( "(%lx,%ld)", (long)offarray[i], (long)blocksizearray[i] );
+ }
+ if (dp->loop_params.i_t.count > n) printf( "..." );
+ printf( "\n" );
+}
+
+static void dl_print_struct( int l, DLOOP_Dataloop *dp )
+{
+ DLOOP_Count *blocksizearray = dp->loop_params.s_t.blocksize_array ;
+ DLOOP_Offset *offarray = dp->loop_params.s_t.offset_array;
+ DLOOP_Dataloop **looparray = dp->loop_params.s_t.dataloop_array;
+ int i, n;
+ dl_print_tab(l);
+ printf( "STRUCT " );
+ dl_print_base( dp );
+ printf( "\n" );
+ n = dp->loop_params.i_t.count;
+ if (n > 8) n = 8;
+ for (i=0; i<n; i++) {
+ dl_print_tab(l+1);
+ printf( "(%lx,%ld)", (long)offarray[i], (long)blocksizearray[i] );
+ dl_print_dataloop( l+1, looparray[i] );
+ printf( "\n" );
+ }
+ if (dp->loop_params.i_t.count > n) printf( "...\n" );
+}
+static void dl_print_dataloop( int l, DLOOP_Dataloop *dp )
+{
+ dl_print_tab( l );
+ dl_print_base( dp );
+ switch (dp->kind & DLOOP_KIND_MASK) {
+ case DLOOP_KIND_CONTIG:
+ dl_print_contig( l, dp );
+ break;
+ case DLOOP_KIND_VECTOR:
+ dl_print_vector( l, dp );
+ break;
+ case DLOOP_KIND_BLOCKINDEXED:
+ dl_print_blockindexed( l, dp );
+ break;
+ case DLOOP_KIND_INDEXED:
+ dl_print_indexed( l, dp );
+ break;
+ case DLOOP_KIND_STRUCT:
+ dl_print_struct( l, dp );
+ break;
+ default:
+ dl_print( l, "Unknown dataloop type " );
+ printf( "\n" );
+ break;
+ }
+}
+#endif
+
+/*
+ * Indicates whether a dataloop is a basic and final contig type.
+ * This can be used to determine when a contig type can be removed
+ * in a dataloop.
+ */
+static int dl_contig_isFinal( DLOOP_Dataloop *dp )
+{
+ if ((dp->kind & DLOOP_KIND_MASK) != DLOOP_KIND_CONTIG) return 0;
+ if (dp->el_size == dp->el_extent &&
+ (dp->kind & DLOOP_FINAL_MASK))
+ return 1;
+ return 0;
+}
+
+/*
+ * Optimize a dataloop
+ *
+ * Apply the following transformations and return a new dataloop.
+ * 1. Convert all predefined types to UINTS with the best alignment (may be BYTE
+ * in worst case)
+ * 2. Convert blocks of contiguous into a single block of basic unit (e.g.,
+ * a vector type with a block count of 27 applied to a contiguous type of
+ * 6 ints will be turned into a block count of (27*6) UINTs)
+ * 3. Convert struct (with different dataloops (from different MPI datatypes)
+ * into indexed when all types are contig
+ * 4. Convert dataloops with counts of 1 into simpler types (e.g., q vector
+ * with 1 element is really a contig type)
+ *
+ * Value of these optimizations
+ * A 2012 paper compared performance of Open MPI, MPICH2, and user-written code
+ * for some datatypes, and found MPICH2 often performed poorer than other
+ * options. An investigation showed that some of the issues are due to
+ * a failure to perform optimizations of these type (especially #1 and 2).
+ * It may also be necessary to enhance the dataloop execution engine, but
+ * that will b a separate step.
+ */
+int PREPEND_PREFIX(Dataloop_optimize)(DLOOP_Dataloop *dlpOld_p )
+{
+ int i;
+
+#ifdef MPICH_DEBUG_DATALOOP
+ /* Temp for debugging */
+ static int firstCall = 1;
+ /* This is threadsafe in the sense that we don't care */
+ if (firstCall) {
+ if (getenv("MPICH_DATALOOP_PRINT")) {
+ printDataloop = 1;
+ printIfOptimized = 1;
+ }
+ firstCall = 0;
+ }
+#endif
+
+ switch (dlpOld_p->kind & DLOOP_KIND_MASK) {
+ case DLOOP_KIND_CONTIG:
+#ifdef MPICH_DEBUG_DATALOOP
+ if (printDataloop)
+ dl_print_contig( level, dlpOld_p );
+#endif
+ /* replace contig of (non-basic) contig with contig (basic) */
+ if (!(dlpOld_p->kind & DLOOP_FINAL_MASK)) {
+ DLOOP_Dataloop *dlpChild_p = dlpOld_p->loop_params.c_t.dataloop;
+ level++;
+ PREPEND_PREFIX(Dataloop_optimize)( dlpChild_p );
+ level--;
+ if (dl_contig_isFinal( dlpChild_p ) ) {
+ dlpOld_p->loop_params.c_t.count *= dlpChild_p->loop_params.c_t.count;
+ dlpOld_p->el_size = dlpChild_p->el_size;
+ dlpOld_p->el_extent = dlpChild_p->el_extent;
+ dlpOld_p->kind |= DLOOP_FINAL_MASK;
+ dlpOld_p->loop_params.c_t.dataloop = 0;
+#ifdef MPICH_DEBUG_DATALOOP
+ if (printIfOptimized || printDataloop) {
+ printf( "replacement contig is:\n" );
+ dl_print_contig( level, dlpOld_p );
+ }
+#endif
+ }
+ }
+ break;
+
+ case DLOOP_KIND_VECTOR:
+ /* if sub-dloop is (non-basic) contig, merge with blockcount */
+#ifdef MPICH_DEBUG_DATALOOP
+ if (printDataloop)
+ dl_print_vector( level, dlpOld_p );
+#endif
+
+ if (!(dlpOld_p->kind & DLOOP_FINAL_MASK)) {
+ DLOOP_Dataloop *dlpChild_p = dlpOld_p->loop_params.v_t.dataloop;
+ level++;
+ PREPEND_PREFIX(Dataloop_optimize)( dlpChild_p );
+ level--;
+
+ if (dl_contig_isFinal( dlpChild_p ) ) {
+ /* We can replace the contig type by enlarging the blocksize */
+
+ /* Reset the kind to final, free the child type, set to null */
+ dlpOld_p->loop_params.v_t.blocksize *= dlpChild_p->loop_params.count;
+ dlpOld_p->el_size = dlpChild_p->el_size;
+ dlpOld_p->el_extent = dlpChild_p->el_extent;
+ dlpOld_p->kind |= DLOOP_FINAL_MASK;
+ dlpOld_p->loop_params.v_t.dataloop = 0;
+#ifdef MPICH_DEBUG_DATALOOP
+ if (printIfOptimized || printDataloop) {
+ printf( "replacement Vector is:\n" );
+ dl_print_vector( level, dlpOld_p );
+ }
+#endif
+ }
+ }
+ /* replace vector of a single element with contig */
+ if ((dlpOld_p->kind & DLOOP_FINAL_MASK)) {
+ int blocksize = dlpOld_p->loop_params.v_t.blocksize;
+ int count = dlpOld_p->loop_params.v_t.count;
+ if (dlpOld_p->el_size * blocksize ==
+ dlpOld_p->loop_params.v_t.stride ) {
+ dlpOld_p->kind = DLOOP_KIND_CONTIG | DLOOP_FINAL_MASK;
+ dlpOld_p->loop_params.c_t.dataloop = 0;
+ dlpOld_p->loop_params.c_t.count = count * blocksize;
+#ifdef MPICH_DEBUG_DATALOOP
+ if (printIfOptimized || printDataloop) {
+ printf( "replacement Contig is:\n" );
+ dl_print_contig( level, dlpOld_p );
+ }
+#endif
+ }
+ }
+ /* replace vector that is contiguous with contiguous */
+ break;
+
+ case DLOOP_KIND_BLOCKINDEXED:
+ /* if subdloop is (non-basic) contig, merge with blockcount */
+#ifdef MPICH_DEBUG_DATALOOP
+ if (printDataloop)
+ dl_print_blockindexed( level, dlpOld_p );
+#endif
+ if (!(dlpOld_p->kind & DLOOP_FINAL_MASK)) {
+ DLOOP_Dataloop *dlpChild_p = dlpOld_p->loop_params.bi_t.dataloop;
+ level++;
+ PREPEND_PREFIX(Dataloop_optimize)( dlpChild_p );
+ level--;
+ if (dl_contig_isFinal( dlpChild_p ) ) {
+ /* We can replace the contig type by enlarging the blocksize */
+
+ /* Reset the kind to final, free the child type, set to null */
+ dlpOld_p->loop_params.bi_t.blocksize *= dlpChild_p->loop_params.count;
+ dlpOld_p->el_size = dlpChild_p->el_size;
+ dlpOld_p->el_extent = dlpChild_p->el_extent;
+ dlpOld_p->kind |= DLOOP_FINAL_MASK;
+ dlpOld_p->loop_params.bi_t.dataloop = 0;
+#ifdef MPICH_DEBUG_DATALOOP
+ if (printIfOptimized || printDataloop) {
+ printf( "replacement BlockIndexed is:\n" );
+ dl_print_blockindexed( level, dlpOld_p );
+ }
+#endif
+ }
+ }
+ /* replace blockindexed of a single element with contig */
+ break;
+ case DLOOP_KIND_INDEXED:
+ /* if sub-dloop is (non-basic) contig, merge with blockcount */
+#ifdef MPICH_DEBUG_DATALOOP
+ if (printDataloop)
+ dl_print_indexed( level, dlpOld_p );
+#endif
+ if (!(dlpOld_p->kind & DLOOP_FINAL_MASK)) {
+ DLOOP_Dataloop *dlpChild_p = dlpOld_p->loop_params.i_t.dataloop;
+ level++;
+ PREPEND_PREFIX(Dataloop_optimize)( dlpChild_p );
+ level--;
+ if (dl_contig_isFinal( dlpChild_p ) ) {
+ /* Could include the child type in the blocksize counts */
+ }
+ }
+
+ /* replace indexed of constant block count with blockindexed */
+
+ /* replace indexed of a single element with contig */
+
+ /* If all block counts are multiples of the smallest, and if most
+ blocks are smallest, then the other blocks could be split into
+ separate blocks with appropriate offsets, replacing indexed with
+ blockindexed */
+
+ break;
+
+ case DLOOP_KIND_STRUCT:
+ /* if sub-dloops are all contig, replace with indexed */
+#ifdef MPICH_DEBUG_DATALOOP
+ if (printDataloop)
+ dl_print_struct( level, dlpOld_p );
+#endif
+ if (!(dlpOld_p->kind & DLOOP_FINAL_MASK)) {
+ for (i=0; i<dlpOld_p->loop_params.s_t.count; i++) {
+ level ++;
+ PREPEND_PREFIX(Dataloop_optimize)(
+ dlpOld_p->loop_params.s_t.dataloop_array[i] );
+ level --;
+ }
+ }
+ break;
+ default:
+#ifdef MPICH_DEBUG_DATALOOP
+ if (printDataloop)
+ dl_print( level, "Unknown type!" );
+#endif
+ break;
+ }
+
+ return 0;
+}
+
+
+/*
+ * Make an estimate at the complexity of a datatype. This can be used
+ * to determine whether flattening the datatype to an indexed type is
+ * likely to be efficient.
+ */
+int PREPEND_PREFIX(Dataloop_est_complexity)(DLOOP_Dataloop *dlp_p,
+ MPI_Aint *nElms,
+ MPI_Aint *nDesc )
+{
+ int i;
+ MPI_Aint myElms = 0;
+ MPI_Aint myDesc = 0;
+ MPI_Aint childElms = 0, childDesc = 0;
+ DLOOP_Dataloop *dlpChild_p;
+
+ switch (dlp_p->kind & DLOOP_KIND_MASK) {
+ case DLOOP_KIND_CONTIG:
+ /* Data moved is count*size of the child type */
+
+ if (!(dlp_p->kind & DLOOP_FINAL_MASK)) {
+ dlpChild_p = dlp_p->loop_params.c_t.dataloop;
+ PREPEND_PREFIX(Dataloop_est_complexity)( dlpChild_p, &childElms,
+ &childDesc );
+ }
+ else {
+ childElms = dlp_p->el_size;
+ childDesc = 0;
+ }
+ myElms += dlp_p->loop_params.c_t.count * childElms;
+ myDesc += childDesc + 1;
+
+ break;
+
+ case DLOOP_KIND_VECTOR:
+ /* Data moved is count*size of the child type */
+
+ if (!(dlp_p->kind & DLOOP_FINAL_MASK)) {
+ dlpChild_p = dlp_p->loop_params.v_t.dataloop;
+ PREPEND_PREFIX(Dataloop_est_complexity)( dlpChild_p, &childElms,
+ &childDesc );
+ }
+ else {
+ childElms = dlp_p->el_size;
+ childDesc = 0;
+ }
+ myElms += dlp_p->loop_params.v_t.count *
+ dlp_p->loop_params.v_t.blocksize * childElms;
+ myDesc += childDesc + 2;
+
+ break;
+
+ case DLOOP_KIND_BLOCKINDEXED:
+ if (!(dlp_p->kind & DLOOP_FINAL_MASK)) {
+ dlpChild_p = dlp_p->loop_params.bi_t.dataloop;
+ PREPEND_PREFIX(Dataloop_est_complexity)( dlpChild_p, &childElms,
+ &childDesc );
+ }
+ else {
+ childElms = dlp_p->el_size;
+ childDesc = 0;
+ }
+ myElms += dlp_p->loop_params.bi_t.count *
+ dlp_p->loop_params.bi_t.blocksize * childElms;
+ myDesc += childDesc + dlp_p->loop_params.bi_t.count;
+ break;
+
+ case DLOOP_KIND_INDEXED:
+
+ if (!(dlp_p->kind & DLOOP_FINAL_MASK)) {
+ dlpChild_p = dlp_p->loop_params.i_t.dataloop;
+ PREPEND_PREFIX(Dataloop_est_complexity)( dlpChild_p, &childElms,
+ &childDesc );
+ }
+ else {
+ childElms = dlp_p->el_size;
+ childDesc = 0;
+ }
+ myElms += dlp_p->loop_params.i_t.total_blocks * childElms;
+ myDesc += childDesc + 2 * dlp_p->loop_params.i_t.count;
+
+ break;
+
+ case DLOOP_KIND_STRUCT:
+ if (!(dlp_p->kind & DLOOP_FINAL_MASK)) {
+ MPI_Aint celm, cdesc;
+ for (i=0; i<dlp_p->loop_params.s_t.count; i++) {
+ celm = 0; cdesc = 0;
+ PREPEND_PREFIX(Dataloop_est_complexity)(
+ dlp_p->loop_params.s_t.dataloop_array[i],
+ &celm, &cdesc );
+ childElms += celm * dlp_p->loop_params.s_t.blocksize_array[i];
+ childDesc += cdesc + 3;
+ }
+ }
+ else {
+ int elsize = dlp_p->el_size;
+ childElms = 0;
+ childDesc = 0;
+ for (i=0; i<dlp_p->loop_params.s_t.count; i++) {
+ childElms += elsize * dlp_p->loop_params.s_t.blocksize_array[i];
+ childDesc += 3;
+ }
+ }
+
+ myElms += childElms;
+ myDesc += childDesc;
+ break;
+
+ default:
+ break;
+ }
+
+ /* Return the final values */
+ *nElms += myElms;
+ *nDesc += myDesc;
+
+ return 0;
+}
+
+/*
+ * Estimate the complexity of a struct Dataloop before it is constructed.
+ */
+int PREPEND_PREFIX(Dataloop_est_struct_complexity)( int count,
+ const int blklens[],
+ const DLOOP_Type oldtypes[],
+ MPI_Aint *nElms,
+ MPI_Aint *nDesc )
+{
+ MPI_Aint myElms = 0, myDesc = 0;
+ int i;
+ int flag = MPID_DATALOOP_ALL_BYTES;
+
+ for (i=0; i<count; i++) {
+ DLOOP_Dataloop *dlp_p = 0;
+ MPI_Aint celms = 0, cdesc = 0;
+
+ DLOOP_Handle_get_loopptr_macro(oldtypes[i],dlp_p,flag);
+ if (dlp_p) {
+ PREPEND_PREFIX(Dataloop_est_complexity)( dlp_p,
+ &celms, &cdesc );
+ }
+ else {
+ celms = 1;
+ cdesc = 1;
+ }
+ myElms += celms * blklens[i];
+ myDesc += cdesc;
+ }
+ *nElms = myElms;
+ *nDesc = myDesc;
+
+ return MPI_SUCCESS;
+}
diff --git a/src/mpid/common/datatype/dataloop/segment_packunpack.c b/src/mpid/common/datatype/dataloop/segment_packunpack.c
index 7446b59..5de8053 100644
--- a/src/mpid/common/datatype/dataloop/segment_packunpack.c
+++ b/src/mpid/common/datatype/dataloop/segment_packunpack.c
@@ -283,6 +283,22 @@ int PREPEND_PREFIX(Segment_blkidx_m2m)(DLOOP_Offset *blocks_p,
DLOOP_Handle_get_size_macro(el_type, el_size);
+ /* If the blocklen * el_size is relatively small, then for
+ performance reasons, its important to hoist most of these
+ tests out of the loop. Ignoring some of the issues of handling
+ the available buffer size (blocks_left), this should translate
+ directly into code that looks like this for blocksize == 1
+
+ for (i=0; i<count; i++) {
+ dest[i] = userbuf[offsetarray[i]];
+ }
+
+ where "dest" and "userbuf" are pointers to objects of the correct
+ size. If blocksize is > 1, then various unrollings are important
+ until blocksize is large enough to make the overhead of memcpy
+ negligible. Datatypes such as this are used in LAMMPS, for example.
+ */
+
while (blocks_left) {
char *src, *dest;
diff --git a/src/mpid/common/datatype/mpid_type_commit.c b/src/mpid/common/datatype/mpid_type_commit.c
index a384e50..7a9091b 100644
--- a/src/mpid/common/datatype/mpid_type_commit.c
+++ b/src/mpid/common/datatype/mpid_type_commit.c
@@ -19,6 +19,7 @@ Output Parameters:
Return Value:
0 on success, -1 on failure.
@*/
+
int MPID_Type_commit(MPI_Datatype *datatype_p)
{
int mpi_errno=MPI_SUCCESS;
@@ -57,9 +58,13 @@ int MPID_Type_commit(MPI_Datatype *datatype_p)
MPIU_DBG_PRINTF(("# contig blocks = %d\n",
(int) datatype_ptr->max_contig_blocks));
+ if (MPIR_CVAR_DATALOOP_OPTIMIZE) {
+ MPID_Dataloop_optimize(datatype_ptr->dataloop );
+ }
#if 0
MPIDI_Dataloop_dot_printf(datatype_ptr->dataloop, 0, 1);
#endif
+
}
return mpi_errno;
diff --git a/src/mpid/common/datatype/mpid_type_debug.c b/src/mpid/common/datatype/mpid_type_debug.c
index 2dc5ceb..2489dbd 100644
--- a/src/mpid/common/datatype/mpid_type_debug.c
+++ b/src/mpid/common/datatype/mpid_type_debug.c
@@ -429,7 +429,12 @@ char *MPIDU_Datatype_combiner_to_string(int combiner)
return NULL;
}
-/* --BEGIN ERROR HANDLING-- */
+/* --BEGIN DEBUG-- */
+/*
+ * You must configure MPICH2 with the logging option enabled (--enable-g=log)
+ * for these routines to print - in which case, they use the same options
+ * as the logging code, including print to file and control by class (DATATYPE)
+ */
void MPIDU_Datatype_debug(MPI_Datatype type,
int array_ct)
{
@@ -660,4 +665,4 @@ void MPIDI_Datatype_contents_printf(MPI_Datatype type,
__mpidi_datatype_free_and_return;
}
}
-/* --END ERROR HANDLING-- */
+/* --END DEBUG-- */
diff --git a/src/mpid/common/datatype/mpid_type_dup.c b/src/mpid/common/datatype/mpid_type_dup.c
index 46ad53e..2fdae83 100644
--- a/src/mpid/common/datatype/mpid_type_dup.c
+++ b/src/mpid/common/datatype/mpid_type_dup.c
@@ -24,7 +24,7 @@ Output Parameters:
. newtype - handle of newly created copy of datatype
Return Value:
- 0 on success, -1 on failure.
+ 0 on success, MPI error code on failure.
@*/
int MPID_Type_dup(MPI_Datatype oldtype,
MPI_Datatype *newtype)
@@ -66,9 +66,12 @@ int MPID_Type_dup(MPI_Datatype oldtype,
new_dtp->has_sticky_lb = old_dtp->has_sticky_lb;
new_dtp->is_permanent = old_dtp->is_permanent;
new_dtp->is_committed = old_dtp->is_committed;
- new_dtp->attributes = NULL; /* ??? */
- new_dtp->cache_id = -1; /* ??? */
- new_dtp->name[0] = 0; /* ??? */
+
+ new_dtp->attributes = NULL; /* Attributes are copied in the
+ top-level MPI_Type_dup routine */
+ new_dtp->cache_id = -1; /* ??? */
+ new_dtp->name[0] = 0; /* The Object name is not copied on
+ a dup */
new_dtp->n_elements = old_dtp->n_elements;
new_dtp->element_size = old_dtp->element_size;
new_dtp->eltype = old_dtp->eltype;
diff --git a/test/mpi/perf/testlist b/test/mpi/perf/testlist
index fb206ed..4d665bc 100644
--- a/test/mpi/perf/testlist
+++ b/test/mpi/perf/testlist
@@ -1,10 +1,10 @@
-transp-datatype 2 xfail=ticket1788
+transp-datatype 2
sendrecvl 2
-twovec 1 xfail=ticket1788
-dtpack 1 xfail=ticket1789
-nestvec 1 xfail=ticket1788
-nestvec2 1 xfail=ticket1788
-indexperf 1 xfail=ticket1788
+twovec 1
+dtpack 1
+nestvec 1
+nestvec2 1
+indexperf 1 xfail=ticket1788
non_zero_root 4
timer 1
# The commcreatep test looks at how communicator creation scales with group
-----------------------------------------------------------------------
Summary of changes:
src/mpid/common/datatype/dataloop/Makefile.mk | 3 +-
src/mpid/common/datatype/dataloop/dataloop.c | 4 +-
.../common/datatype/dataloop/dataloop_create.h | 11 +-
.../datatype/dataloop/dataloop_create_contig.c | 13 +-
.../datatype/dataloop/dataloop_create_struct.c | 93 +++-
.../common/datatype/dataloop/dataloop_optimize.c | 514 ++++++++++++++++++++
.../common/datatype/dataloop/segment_packunpack.c | 16 +
src/mpid/common/datatype/mpid_type_commit.c | 5 +
src/mpid/common/datatype/mpid_type_debug.c | 9 +-
src/mpid/common/datatype/mpid_type_dup.c | 11 +-
test/mpi/perf/testlist | 12 +-
11 files changed, 658 insertions(+), 33 deletions(-)
create mode 100644 src/mpid/common/datatype/dataloop/dataloop_optimize.c
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1rc2-165-g4e1b470
by noreply@mpich.org 16 Jan '14
by noreply@mpich.org 16 Jan '14
16 Jan '14
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 4e1b470dd1b47b514c65da9add3613fdd301c90c (commit)
from cf551af40234c520afff8d0182d067e32d0e329d (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/4e1b470dd1b47b514c65da9add3613fdd…
commit 4e1b470dd1b47b514c65da9add3613fdd301c90c
Author: William Gropp <wgropp(a)illinois.edu>
Date: Thu Jan 16 15:29:32 2014 -0600
Fix bogus datatype perf test
The test in test/mpi/perf/twovec made invalid assumptions about the
performance of two MPI datatype creation routines. This is a hard test to
get right, but this version is more likely to avoid falsely signalling
an error.
diff --git a/test/mpi/perf/twovec.c b/test/mpi/perf/twovec.c
index 1bbe5a3..774693e 100644
--- a/test/mpi/perf/twovec.c
+++ b/test/mpi/perf/twovec.c
@@ -9,11 +9,20 @@
#include <math.h>
#include "mpi.h"
-/* Make sure datatype creation is independent of data size */
+/* Make sure datatype creation is independent of data size
+ Note, however, that there is no guarantee or expectation
+ that the time would be constant. In particular, some
+ optimizations might take more time than others.
+
+ The real goal of this is to ensure that the time to create
+ a datatype doesn't increase strongly with the number of elements
+ within the datatype, particularly for these datatypes that are
+ quite simple patterns.
+ */
#define SKIP 4
#define NUM_SIZES 16
-#define FRACTION 0.2
+#define FRACTION 1.0
/* Don't make the number of loops too high; we create so many
* datatypes before trying to free them */
@@ -23,14 +32,15 @@ int main(int argc, char *argv[])
{
MPI_Datatype column[LOOPS], xpose[LOOPS];
double t[NUM_SIZES], ttmp, tmin, tmax, tmean, tdiff;
+ double tMeanLower, tMeanHigher;
int size;
- int i, j, isMonotone, errs = 0, nrows, ncols, isvalid;
+ int i, j, errs = 0, nrows, ncols;
MPI_Init(&argc, &argv);
tmean = 0;
- size = 1;
- for (i = 0; i < NUM_SIZES + SKIP; i++) {
+ size = 1;
+ for (i = -SKIP; i < NUM_SIZES; i++) {
nrows = ncols = size;
ttmp = MPI_Wtime();
@@ -41,9 +51,15 @@ int main(int argc, char *argv[])
MPI_Type_commit(&xpose[j]);
}
- if (i >= SKIP) {
- t[i - SKIP] = MPI_Wtime() - ttmp;
- tmean += t[i - SKIP];
+ if (i >= 0) {
+ t[i] = MPI_Wtime() - ttmp;
+ if (t[i] < 100 * MPI_Wtick()) {
+ /* Time is too inaccurate to use. Set to zero.
+ Consider increasing the LOOPS value to make this
+ time large enough */
+ t[i] = 0;
+ }
+ tmean += t[i];
}
for (j = 0; j < LOOPS; j++) {
@@ -51,19 +67,37 @@ int main(int argc, char *argv[])
MPI_Type_free(&column[j]);
}
- if (i >= SKIP)
+ if (i >= 0)
size *= 2;
}
tmean /= NUM_SIZES;
- /* Now, analyze the times to see that they are nearly independent
- * of size */
- for (i = 0; i < NUM_SIZES; i++) {
- /* The difference between the value and the mean is more than
- * a "FRACTION" of mean. */
- if (fabs(t[i] - tmean) > (FRACTION * tmean))
- errs++;
- }
+ /* Now, analyze the times to see that they do not grow too fast
+ as a function of size. As that is a vague criteria, we do the
+ following as a simple test:
+ Compute the mean of the first half and the second half of the
+ data
+ Compare the two means
+ If the mean of the second half is more than FRACTION times the
+ mean of the first half, then the time may be growing too fast.
+ */
+ tMeanLower = tMeanHigher = 0;
+ for (i=0; i<NUM_SIZES/2; i++)
+ tMeanLower += t[i];
+ tMeanLower /= (NUM_SIZES/2);
+ for (i=NUM_SIZES/2; i<NUM_SIZES; i++)
+ tMeanHigher += t[i];
+ tMeanHigher /= (NUM_SIZES - NUM_SIZES/2);
+ /* A large value (even 1 or greater) is a good choice for
+ FRACTION here - the goal is to detect significant growth in
+ execution time as the size increases, and there is no MPI
+ standard requirement here to meet.
+
+ If the times were too small, then the test also passes - the
+ goal is to find implementation problems that lead to excessive
+ time in these routines.
+ */
+ if (tMeanLower > 0 && tMeanHigher > (1 + FRACTION) * tMeanLower) errs++;
if (errs) {
fprintf(stderr, "too much difference in performance: ");
-----------------------------------------------------------------------
Summary of changes:
test/mpi/perf/twovec.c | 68 ++++++++++++++++++++++++++++++++++++------------
1 files changed, 51 insertions(+), 17 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1rc2-164-gcf551af
by noreply@mpich.org 16 Jan '14
by noreply@mpich.org 16 Jan '14
16 Jan '14
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 cf551af40234c520afff8d0182d067e32d0e329d (commit)
from 5d4a5dba00941a4a7e62e5a09b7ec5973e3ce0c0 (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/cf551af40234c520afff8d0182d067e32…
commit cf551af40234c520afff8d0182d067e32d0e329d
Author: Pavan Balaji <balaji(a)mcs.anl.gov>
Date: Wed Jan 8 21:32:18 2014 -0600
Comment out nb_test, since it's not entirely correct.
This was meant to test out the case when MPI_Test is not nonblocking.
However, we ended up assuming that MPI_Win_lock will be nonblocking.
That is not specified by the standard and might not be true.
Commenting this out till be find a better way to test the original
problem with MPI_Test.
Fixes #1910.
Signed-off-by: Rajeev Thakur <thakur(a)mcs.anl.gov>
diff --git a/test/mpi/rma/testlist.in b/test/mpi/rma/testlist.in
index a21bed4..facadc8 100644
--- a/test/mpi/rma/testlist.in
+++ b/test/mpi/rma/testlist.in
@@ -106,4 +106,11 @@ mutex_bench_shared 4 mpiversion=3.0
mutex_bench_shm 4 mpiversion=3.0
rma-contig 4 mpiversion=3.0 timeLimit=600
badrma 2 mpiversion=3.0
-nb_test 2 mpiversion=3.0 xfail=ticket1910
+
+## This test is not strictly correct. This was meant to test out the
+## case when MPI_Test is not nonblocking. However, we ended up
+## assuming that MPI_Win_lock will be nonblocking. That is not
+## specified by the standard and might not be true. Commenting this
+## out till be find a better way to test the original problem with
+## MPI_Test.
+# nb_test 2 mpiversion=3.0 xfail=ticket1910
-----------------------------------------------------------------------
Summary of changes:
test/mpi/rma/testlist.in | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1rc2-163-g5d4a5db
by noreply@mpich.org 16 Jan '14
by noreply@mpich.org 16 Jan '14
16 Jan '14
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 5d4a5dba00941a4a7e62e5a09b7ec5973e3ce0c0 (commit)
via 7967558c38f769b317754322b06161487185f631 (commit)
via d3a203dd8f0c478c46584b2fb19b4b7ae86c97bd (commit)
via d3d749dd5c5303096b9649aa34460d00da9bd783 (commit)
via 9a4cc43c3f5adeee390a31862afb8178f3095010 (commit)
from e96118089e83a118a93b2ffdfa872015ab091291 (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/5d4a5dba00941a4a7e62e5a09b7ec5973…
commit 5d4a5dba00941a4a7e62e5a09b7ec5973e3ce0c0
Author: William Gropp <wgropp(a)illinois.edu>
Date: Wed Jan 15 11:05:57 2014 -0600
Fix typos in mpivars
Fix a transposition in use of fprintf and remove benign trailing blanks
diff --git a/src/env/mpivars.c b/src/env/mpivars.c
index bde49ec..33cc456 100644
--- a/src/env/mpivars.c
+++ b/src/env/mpivars.c
@@ -100,7 +100,7 @@ int main( int argc, char *argv[] )
}
/* Print all of the MPI_T control variables, along with their major properties
- and if possible a value (if possible depends on both the complexity of the
+ and if possible a value (if possible depends on both the complexity of the
variable and whether a value is defined) */
int PrintControlVars( FILE *fp )
{
@@ -219,7 +219,7 @@ int PrintCategories( FILE *fp )
checkStringLen( name, nameLen, "nameLen" );
if (numCvars > 0 || numPvars > 0 || numSubcat > 0) {
- fprintf( fp, "Category %s has %d control variables, %d performance variables, and %d subcategories\n",
+ fprintf( fp, "Category %s has %d control variables, %d performance variables, and %d subcategories\n",
name, numCvars, numPvars, numSubcat );
}
else {
@@ -445,7 +445,7 @@ const char *mpit_errclasscheck( int err )
return p;
}
-/* Read a control variable value and return the value as a null terminated
+/* Read a control variable value and return the value as a null terminated
string.
For numeric values, only return a value for scalars (count == 1).
For character data, return the string if it fits in the available space.
@@ -496,7 +496,7 @@ int getCvarValueAsStr( int idx, MPI_Datatype datatype,
return hasValue;
}
-/* Read a performance variable value and return the value as a null terminated
+/* Read a performance variable value and return the value as a null terminated
string.
For numeric values, only return a value for scalars (count == 1).
For character data, return the string if it fits in the available space.
@@ -647,7 +647,7 @@ int checkStringLen( const char *str, int expectedLen, const char *strName )
{
int actLen = strlen(str) + 1;
if (expectedLen != actLen) {
- fpritnf( stderr,
+ fprintf( stderr,
"Incorrect return value for %s = %d, should = %d\n",
strName, expectedLen, actLen );
return 1;
http://git.mpich.org/mpich.git/commitdiff/7967558c38f769b317754322b06161487…
commit 7967558c38f769b317754322b06161487185f631
Author: William Gropp <wgropp(a)illinois.edu>
Date: Wed Jan 15 11:03:08 2014 -0600
Add mpivars to build
Added mpivars to the programs known to Automake so that it will
build and install it.
diff --git a/src/env/Makefile.mk b/src/env/Makefile.mk
index d617716..e5480ae 100644
--- a/src/env/Makefile.mk
+++ b/src/env/Makefile.mk
@@ -9,7 +9,8 @@ bin_SCRIPTS += \
src/env/mpicc \
src/env/parkill
-bin_PROGRAMS += src/env/mpichversion
+bin_PROGRAMS += src/env/mpichversion \
+ src/env/mpivars
src_env_mpichversion_SOURCES = src/env/mpichversion.c
src_env_mpichversion_LDADD = lib/lib@[email protected]
http://git.mpich.org/mpich.git/commitdiff/d3a203dd8f0c478c46584b2fb19b4b7ae…
commit d3a203dd8f0c478c46584b2fb19b4b7ae86c97bd
Author: William Gropp <wgropp(a)illinois.edu>
Date: Wed Jan 15 08:17:27 2014 -0600
Fix typo in library choice for mpivars
If we need to build a separate profiling library, make sure we add that to
the link link.
diff --git a/src/env/Makefile.mk b/src/env/Makefile.mk
index 29dc2fd..d617716 100644
--- a/src/env/Makefile.mk
+++ b/src/env/Makefile.mk
@@ -22,7 +22,7 @@ src_env_mpichversion_LDFLAGS = $(mpich_libtool_static_flag)
src_env_mpivars_SOURCES = src/env/mpivars.c
src_env_mpivars_LDADD = lib/lib@[email protected]
if BUILD_PROFILING_LIB
-src_env_mpivars_LDADD += lib/lib@[email protected]
+src_env_mpivars_LDADD += lib/lib@[email protected]
endif BUILD_PROFILING_LIB
if BUILD_F77_BINDING
http://git.mpich.org/mpich.git/commitdiff/d3d749dd5c5303096b9649aa34460d00d…
commit d3d749dd5c5303096b9649aa34460d00da9bd783
Author: William Gropp <wgropp(a)illinois.edu>
Date: Sun Jan 12 22:16:47 2014 -0500
Add program to show MPI_T variables
This adds a program that should work with any MPI 3 implementation to
show the control and performance variables defined at MPI_Init time.
diff --git a/src/env/Makefile.mk b/src/env/Makefile.mk
index 9d398b0..29dc2fd 100644
--- a/src/env/Makefile.mk
+++ b/src/env/Makefile.mk
@@ -19,6 +19,12 @@ endif BUILD_PROFILING_LIB
src_env_mpichversion_LDFLAGS = $(mpich_libtool_static_flag)
+src_env_mpivars_SOURCES = src/env/mpivars.c
+src_env_mpivars_LDADD = lib/lib@[email protected]
+if BUILD_PROFILING_LIB
+src_env_mpivars_LDADD += lib/lib@[email protected]
+endif BUILD_PROFILING_LIB
+
if BUILD_F77_BINDING
bin_SCRIPTS += src/env/mpif77
endif BUILD_F77_BINDING
diff --git a/src/env/mpivars.c b/src/env/mpivars.c
new file mode 100644
index 0000000..bde49ec
--- /dev/null
+++ b/src/env/mpivars.c
@@ -0,0 +1,656 @@
+/* -*- 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 <string.h>
+#include <stdlib.h>
+#include "mpi.h"
+
+/* At least one early implementation of MPIT failed to set the
+ enumtype and thus dirty data was returned. This should not be needed,
+ but is provided in case an implementation returns too many
+ bogus results. In that case, define NEEDS_MPIT_ENUM_LIMIT */
+#ifdef NEEDS_MPIT_ENUM_LIMIT
+#define MAX_ENUM_NUMBER 10
+#endif
+
+/* Lengths for statically allocated character arrays */
+#define MAX_NAME_LEN 128
+#define MAX_DESC_LEN 1024
+
+/* Function Prototypes */
+/* Top level routines for printing MPI_T variables */
+int PrintControlVars( FILE *fp );
+int PrintPerfVars( FILE *fp );
+int PrintCategories( FILE *fp );
+
+/* Functions to print MPI_T objects */
+int PrintEnum( FILE *fp, MPI_T_enum enumtype );
+
+/* Functions to convert enums or handles to strings for printing */
+const char *mpit_scopeToStr( int scope );
+const char *mpit_bindingToStr( int binding );
+const char *mpit_validDtypeStr( MPI_Datatype datatype );
+const char *mpit_varclassToStr( int varClass );
+const char *mpit_verbosityToStr( int verbosity );
+const char *mpit_errclasscheck( int err );
+
+/* Function to convert MPI_T variables to strings for printing */
+int getCvarValueAsStr( int idx, MPI_Datatype dataytpe,
+ char varValue[], int varValueLen );
+int getPvarValueAsStr( int idx, MPI_Datatype datatype, int isContinuous,
+ char varValue[], int varValueLen );
+
+/* Functions for checking on correctness */
+int perfCheckVarType( int varClass, MPI_Datatype datatype );
+int checkStringLen( const char *str, int expectedLen, const char *strName );
+
+/* Variable descriptions are sometimes long - this variable controls
+ whether they are printed */
+static int showDesc = 1;
+
+int main( int argc, char *argv[] )
+{
+ int required, provided, i, wrank;
+ required = MPI_THREAD_SINGLE;
+
+ /* The MPI standard permits MPI_T_init_thread to be called before or
+ after MPI_Init_thread. In some cases, a user may need to
+ call MPI_T_init_thread and set some MPI_T variables before calling
+ MPI_Init_thread to change the behavior of the initialization. */
+ MPI_Init_thread( &argc, &argv, required, &provided );
+
+ MPI_T_init_thread( required, &provided );
+
+ MPI_Comm_rank( MPI_COMM_WORLD, &wrank );
+
+ /* Check for a few command-line controls */
+ /* Assumes that all processes see this */
+ for (i=1; i<argc; i++) {
+ /* Check for "no descriptions" */
+ if (strcmp( argv[i], "--nodesc" ) == 0 ||
+ strcmp( argv[i], "-nodex" ) == 0) showDesc = 0;
+ else {
+ if (wrank == 0) {
+ fprintf( stderr, "Unrecognized command line argument %s\n",
+ argv[i] );
+ fprintf( stderr, "Usage: mpivars [ -nodesc ]\n" );
+ MPI_Abort( MPI_COMM_WORLD, 1 );
+ return 1;
+ }
+ }
+ }
+
+ PrintControlVars( stdout );
+ fprintf( stdout, "\n" );
+ PrintPerfVars( stdout );
+ fprintf( stdout, "\n" );
+ PrintCategories( stdout );
+
+ /* Finalize MPI_T before MPI in case MPI_Finalize checks for any
+ allocated resources (MPICH can be configured to do this) */
+ MPI_T_finalize();
+
+ MPI_Finalize();
+
+ return 0;
+}
+
+/* Print all of the MPI_T control variables, along with their major properties
+ and if possible a value (if possible depends on both the complexity of the
+ variable and whether a value is defined) */
+int PrintControlVars( FILE *fp )
+{
+ int i, num_cvar, nameLen, verbosity, descLen, binding, scope;
+ int hasValue;
+ char name[MAX_NAME_LEN], desc[MAX_DESC_LEN], varValue[21];
+ MPI_T_enum enumtype;
+ MPI_Datatype datatype;
+
+ MPI_T_cvar_get_num( &num_cvar );
+ fprintf( fp, "%d MPI Control Variables\n", num_cvar );
+ for (i=0; i<num_cvar; i++) {
+ hasValue = 0;
+ nameLen = sizeof(name);
+ descLen = sizeof(desc);
+ MPI_T_cvar_get_info( i, name, &nameLen, &verbosity, &datatype,
+ &enumtype, desc, &descLen, &binding, &scope );
+ /* Check on correct output */
+ checkStringLen( desc, descLen, "descLen" );
+
+ /* Attempt to get a value */
+ if (binding == MPI_T_BIND_NO_OBJECT) {
+ hasValue = getCvarValueAsStr( i, datatype,
+ varValue, sizeof(varValue) );
+ }
+
+ if (hasValue) {
+ fprintf( fp, "\t%-32s=%s\t%s\t%s\t%s\t%s\t%s\n", name, varValue,
+ mpit_scopeToStr( scope ),
+ mpit_bindingToStr( binding ),
+ mpit_validDtypeStr( datatype ),
+ mpit_verbosityToStr( verbosity ),
+ showDesc ? desc : "" );
+ }
+ else {
+ fprintf( fp, "\t%-32s\t%s\t%s\t%s\t%s\t%s\n", name,
+ mpit_scopeToStr( scope ),
+ mpit_bindingToStr( binding ),
+ mpit_validDtypeStr( datatype ),
+ mpit_verbosityToStr( verbosity ),
+ showDesc ? desc : "" );
+ }
+ if (datatype == MPI_INT && enumtype != MPI_T_ENUM_NULL) {
+ PrintEnum( fp, enumtype );
+ }
+
+ }
+
+ return 0;
+}
+
+/* Print all of the MPI_T performance variables, along with their
+ major properties and if possible a value (if possible depends on
+ both the complexity of the variable and whether a value is
+ defined) */
+int PrintPerfVars( FILE *fp )
+{
+ int i, numPvar, nameLen, descLen, verbosity, varClass;
+ int binding, isReadonly, isContinuous, isAtomic;
+ char name[MAX_NAME_LEN], desc[MAX_DESC_LEN], varValue[21];
+ MPI_T_enum enumtype;
+ MPI_Datatype datatype;
+
+ MPI_T_pvar_get_num( &numPvar );
+ fprintf( fp, "%d MPI Performance Variables\n", numPvar );
+
+ for (i=0; i<numPvar; i++) {
+ nameLen = sizeof(name);
+ descLen = sizeof(desc);
+ MPI_T_pvar_get_info( i, name, &nameLen, &verbosity, &varClass,
+ &datatype, &enumtype, desc, &descLen, &binding,
+ &isReadonly, &isContinuous, &isAtomic );
+ /* Check for correct return values */
+ checkStringLen( name, nameLen, "nameLen" );
+ perfCheckVarType( varClass, datatype );
+
+ fprintf( fp, "\t%-32s\t%s\t%s\t%s\t%s\tReadonly=%s\tContinuous=%s\tAtomic=%s\t%s\n",
+ name,
+ mpit_varclassToStr( varClass ),
+ mpit_bindingToStr( binding ),
+ mpit_validDtypeStr( datatype ),
+ mpit_verbosityToStr( verbosity ),
+ isReadonly ? "T" : "F",
+ isContinuous ? "T" : "F",
+ isAtomic ? "T" : "F",
+ showDesc ? desc : "" );
+
+ if (getPvarValueAsStr( i, datatype, isContinuous,
+ varValue, sizeof(varValue) )) {
+ fprintf( fp, "\tValue = %s\n", varValue );
+ }
+ /* A special case for MPI_INT */
+ if (datatype == MPI_INT && enumtype != MPI_T_ENUM_NULL) {
+ PrintEnum( fp, enumtype );
+ }
+ }
+ return 0;
+}
+
+/* Print the categories of MPI_T variables defined by the implementation. */
+int PrintCategories( FILE *fp )
+{
+ int i, j, numCat, nameLen, descLen, numCvars, numPvars, numSubcat;
+ char name[MAX_NAME_LEN], desc[MAX_DESC_LEN];
+
+ MPI_T_category_get_num( &numCat );
+ if (numCat > 0) fprintf( fp, "%d MPI_T categories\n", numCat );
+ else fprintf( fp, "No categories defined\n" );
+
+ for (i=0; i<numCat; i++) {
+ nameLen = sizeof(name);
+ descLen = sizeof(desc);
+ MPI_T_category_get_info( i, name, &nameLen, desc, &descLen, &numCvars,
+ &numPvars, &numSubcat );
+ /* Check on correct output */
+ checkStringLen( name, nameLen, "nameLen" );
+
+ if (numCvars > 0 || numPvars > 0 || numSubcat > 0) {
+ fprintf( fp, "Category %s has %d control variables, %d performance variables, and %d subcategories\n",
+ name, numCvars, numPvars, numSubcat );
+ }
+ else {
+ fprintf( fp, "Category %s defined but has no content\n", name );
+ }
+ /* Output information about the categories */
+ if (numCvars > 0) {
+ int *cvarIndex = (int *)malloc( numCvars * sizeof(int) );
+ MPI_T_category_get_cvars( i, numCvars, cvarIndex );
+ fprintf( fp, "\tControl Variables:\n" );
+ for (j=0; j<numCvars; j++) {
+ int varnameLen, verbose, binding, scope;
+ MPI_Datatype datatype;
+ char varname[MAX_NAME_LEN];
+ varnameLen = sizeof(varname);
+ MPI_T_cvar_get_info( cvarIndex[j], varname, &varnameLen,
+ &verbose, &datatype, NULL, NULL, NULL,
+ &binding, &scope );
+ fprintf( fp, "\t%-32s:\t%s\t%s\t%s\t%s\n", varname,
+ mpit_scopeToStr( scope ),
+ mpit_bindingToStr( binding ),
+ mpit_validDtypeStr( datatype ),
+ mpit_verbosityToStr( verbose ) );
+ }
+ free( cvarIndex );
+ }
+ if (numPvars > 0) {
+ int *pvarIndex = (int *)malloc( numPvars * sizeof(int) );
+ MPI_T_category_get_pvars( i, numPvars, pvarIndex );
+ fprintf( fp, "\tPerformance Variables:\n" );
+ for (j=0; j<numPvars; j++) {
+ int varnameLen, verbose, binding, varclass;
+ int isReadonly, isContinuous, isAtomic;
+ MPI_Datatype datatype;
+ char varname[MAX_NAME_LEN];
+ varnameLen = sizeof(varname);
+ MPI_T_pvar_get_info( pvarIndex[j], varname, &varnameLen,
+ &verbose, &varclass, &datatype,
+ NULL, NULL, NULL, &binding,
+ &isReadonly, &isContinuous, &isAtomic );
+ fprintf( fp, "\t%-32s:\t%s\t%s\t%s\t%s\n", varname,
+ mpit_varclassToStr( varclass ),
+ mpit_bindingToStr( binding ),
+ mpit_validDtypeStr( datatype ),
+ mpit_verbosityToStr( verbose ) );
+ }
+ free( pvarIndex );
+ }
+ if (numSubcat > 0) {
+ int *subcatIndex = (int *) malloc(numSubcat * sizeof(int));
+ MPI_T_category_get_categories(i, numSubcat, subcatIndex);
+ fprintf( fp, "\tSubcategories:\n" );
+ for (j=0; j<numSubcat; j++) {
+ int catnameLen, ncvars, npvars, nsubcats;
+ char catname[MAX_NAME_LEN];
+ catnameLen = sizeof(catname);
+ MPI_T_category_get_info(subcatIndex[j], catname, &catnameLen,
+ NULL, NULL,
+ &ncvars, &npvars, &nsubcats);
+ fprintf(fp, "\t%s\n", catname);
+ }
+ free( subcatIndex );
+ }
+ }
+
+ return 0;
+}
+
+/* Print any MPI_T enum values defined by the implementation. */
+int PrintEnum( FILE *fp, MPI_T_enum enumtype )
+{
+ int i, enumber, enameLen, enumval;
+ char ename[MAX_NAME_LEN];
+
+ enameLen = sizeof(ename);
+ MPI_T_enum_get_info( enumtype, &enumber, ename, &enameLen);
+
+ fprintf( fp, "Enum %s (%d) values: ", ename, enumber );
+#ifdef MAX_ENUM_NUMBER
+ if (enumber > MAX_ENUM_NUMBER) {
+ fprintf( stderr, "Max number of enum values = %d, > max permitted of %d\n",
+ enumber, MAX_ENUM_NUMBER );
+ enumber = MAX_ENUM_NUMBER;
+ }
+#endif
+ for (i=0; i<enumber; i++) {
+ enameLen = sizeof(ename);
+ MPI_T_enum_get_item( enumtype, i, &enumval, ename, &enameLen );
+ fprintf( fp, "%s(%d)%c", ename, enumval, (i != enumber-1) ? ',' : ' ' );
+ }
+ fprintf( fp, "\n" );
+
+ return 0;
+}
+
+/* --- Support routines --- */
+
+const char *mpit_scopeToStr( int scope )
+{
+ const char *p = 0;
+ switch (scope) {
+ case MPI_T_SCOPE_CONSTANT: p = "SCOPE_CONSTANT"; break;
+ case MPI_T_SCOPE_READONLY: p = "SCOPE_READONLY"; break;
+ case MPI_T_SCOPE_LOCAL: p = "SCOPE_LOCAL"; break;
+ case MPI_T_SCOPE_GROUP: p = "SCOPE_GROUP"; break;
+ case MPI_T_SCOPE_GROUP_EQ: p = "SCOPE_GROUP_EQ"; break;
+ case MPI_T_SCOPE_ALL: p = "SCOPE_ALL"; break;
+ case MPI_T_SCOPE_ALL_EQ: p = "SCOPE_ALL_EQ"; break;
+ default: p = "Unrecoginized scope"; break;
+ }
+ return p;
+}
+
+const char *mpit_bindingToStr( int binding )
+ {
+ const char *p;
+ switch (binding) {
+ case MPI_T_BIND_NO_OBJECT: p = "No-object"; break;
+ case MPI_T_BIND_MPI_COMM: p = "MPI_COMM"; break;
+ case MPI_T_BIND_MPI_DATATYPE: p = "MPI_DATATYPE"; break;
+ case MPI_T_BIND_MPI_ERRHANDLER: p = "MPI_ERRHANDLER"; break;
+ case MPI_T_BIND_MPI_FILE: p = "MPI_FILE"; break;
+ case MPI_T_BIND_MPI_GROUP: p = "MPI_GROUP"; break;
+ case MPI_T_BIND_MPI_OP: p = "MPI_OP"; break;
+ case MPI_T_BIND_MPI_REQUEST: p = "MPI_REQUEST"; break;
+ case MPI_T_BIND_MPI_WIN: p = "MPI_WIN"; break;
+ case MPI_T_BIND_MPI_MESSAGE: p = "MPI_MESSAGE"; break;
+ case MPI_T_BIND_MPI_INFO: p = "MPI_INFO"; break;
+ default: p = "Unknown object binding";
+ }
+ return p;
+ }
+
+const char *mpit_varclassToStr( int varClass )
+{
+ const char *p=0;
+ switch (varClass) {
+ case MPI_T_PVAR_CLASS_STATE: p = "CLASS_STATE"; break;
+ case MPI_T_PVAR_CLASS_LEVEL: p = "CLASS_LEVEL"; break;
+ case MPI_T_PVAR_CLASS_SIZE: p = "CLASS_SIZE"; break;
+ case MPI_T_PVAR_CLASS_PERCENTAGE: p = "CLASS_PERCENTAGE"; break;
+ case MPI_T_PVAR_CLASS_HIGHWATERMARK: p = "CLASS_HIGHWATERMARK"; break;
+ case MPI_T_PVAR_CLASS_LOWWATERMARK: p = "CLASS_LOWWATERMARK"; break;
+ case MPI_T_PVAR_CLASS_COUNTER: p = "CLASS_COUNTER"; break;
+ case MPI_T_PVAR_CLASS_AGGREGATE: p = "CLASS_AGGREGATE"; break;
+ case MPI_T_PVAR_CLASS_TIMER: p = "CLASS_TIMER"; break;
+ case MPI_T_PVAR_CLASS_GENERIC: p = "CLASS_GENERIC"; break;
+ default: p = "Unrecognized pvar class"; break;
+ }
+ return p;
+}
+
+const char *mpit_validDtypeStr( MPI_Datatype datatype )
+{
+ const char *p = 0;
+ if (datatype == MPI_INT) p = "MPI_INT";
+ else if (datatype == MPI_UNSIGNED) p = "MPI_UNSIGNED";
+ else if (datatype == MPI_UNSIGNED_LONG) p = "MPI_UNSIGNED_LONG";
+ else if (datatype == MPI_UNSIGNED_LONG_LONG) p = "MPI_UNSIGNED_LONG_LONG";
+ else if (datatype == MPI_COUNT) p = "MPI_COUNT";
+ else if (datatype == MPI_CHAR) p = "MPI_CHAR";
+ else if (datatype == MPI_DOUBLE) p = "MPI_DOUBLE";
+ else {
+ if (datatype == MPI_DATATYPE_NULL) {
+ p = "Invalid MPI datatype:NULL";
+ }
+ else {
+ static char typename[MPI_MAX_OBJECT_NAME+9];
+ int tlen;
+ strncpy( typename, "Invalid:", MPI_MAX_OBJECT_NAME );
+ MPI_Type_get_name( datatype, typename+8, &tlen );
+ /* We must check location typename[8] to see if
+ MPI_Type_get_name returned a name (not all datatypes
+ have names). If it did not, then we indicate that
+ with a different message */
+ if (typename[8]) p = typename;
+ else p = "Invalid: Unknown datatype name";
+ }
+ }
+
+ return p;
+}
+
+const char *mpit_verbosityToStr( int verbosity )
+{
+ const char *p = 0;
+ switch (verbosity) {
+ case MPI_T_VERBOSITY_USER_BASIC: p = "VERBOSITY_USER_BASIC"; break;
+ case MPI_T_VERBOSITY_USER_DETAIL: p = "VERBOSITY_USER_DETAIL"; break;
+ case MPI_T_VERBOSITY_USER_ALL: p = "VERBOSITY_USER_ALL"; break;
+ case MPI_T_VERBOSITY_TUNER_BASIC: p = "VERBOSITY_TUNER_BASIC"; break;
+ case MPI_T_VERBOSITY_TUNER_DETAIL: p = "VERBOSITY_TUNER_DETAIL"; break;
+ case MPI_T_VERBOSITY_TUNER_ALL: p = "VERBOSITY_TUNER_ALL"; break;
+ case MPI_T_VERBOSITY_MPIDEV_BASIC: p = "VERBOSITY_MPIDEV_BASIC"; break;
+ case MPI_T_VERBOSITY_MPIDEV_DETAIL: p = "VERBOSITY_MPIDEV_DETAIL"; break;
+ case MPI_T_VERBOSITY_MPIDEV_ALL: p = "VERBOSITY_MPIDEV_ALL"; break;
+ default: p = "Invalid verbosity"; break;
+ }
+ return p;
+}
+
+/* Provide English strings for the MPI_T error codes */
+const char *mpit_errclasscheck( int err )
+{
+ const char *p = 0;
+ switch (err) {
+ case MPI_T_ERR_CVAR_SET_NOT_NOW: p = "MPI_T cvar not set"; break;
+ case MPI_T_ERR_CVAR_SET_NEVER: p = "MPI_T cvar was never set"; break;
+ case MPI_T_ERR_PVAR_NO_STARTSTOP: p = "MPI_T pvar does not support start and stop"; break;
+ case MPI_T_ERR_PVAR_NO_WRITE: p = "MPI_T pvar cannot be written"; break;
+ case MPI_T_ERR_PVAR_NO_ATOMIC: p = "MPI_T pvar not atomic"; break;
+ case MPI_T_ERR_MEMORY: p = "MPI_T out of memory"; break;
+ case MPI_T_ERR_NOT_INITIALIZED: p = "MPI_T not initialized"; break;
+ case MPI_T_ERR_CANNOT_INIT: p = "MPI_T not initializable"; break;
+ case MPI_T_ERR_INVALID_INDEX: p = "MPI_T index invalid";break;
+ case MPI_T_ERR_INVALID_ITEM: p = "MPI_T item index out of range"; break;
+ case MPI_T_ERR_INVALID_HANDLE: p = "MPI_T handle invalid"; break;
+ case MPI_T_ERR_OUT_OF_HANDLES: p = "MPI_T out of handles"; break;
+ case MPI_T_ERR_OUT_OF_SESSIONS: p = "MPI_T out of sessions"; break;
+ case MPI_T_ERR_INVALID_SESSION: p = "MPI_T invalid session"; break;
+ default: p = "Unknown MPI_T_ERR class"; break;
+ }
+ return p;
+}
+
+/* Read a control variable value and return the value as a null terminated
+ string.
+ For numeric values, only return a value for scalars (count == 1).
+ For character data, return the string if it fits in the available space.
+*/
+int getCvarValueAsStr( int idx, MPI_Datatype datatype,
+ char varValue[], int varValueLen )
+{
+ int count, hasValue = 0;
+ int ival;
+ unsigned uval;
+ unsigned long ulval;
+ unsigned long long ullval;
+ MPI_T_cvar_handle chandle;
+
+ MPI_T_cvar_handle_alloc( idx, NULL, &chandle, &count );
+ if (count == 1 || (datatype==MPI_CHAR && count < varValueLen)) {
+ switch (datatype) {
+ case MPI_INT:
+ MPI_T_cvar_read( chandle, &ival );
+ snprintf( varValue, varValueLen, "%d", ival );
+ hasValue = 1;
+ break;
+ case MPI_UNSIGNED:
+ MPI_T_cvar_read( chandle, &uval );
+ snprintf( varValue, varValueLen, "%u", uval );
+ hasValue = 1;
+ break;
+ case MPI_UNSIGNED_LONG:
+ MPI_T_cvar_read( chandle, &ulval );
+ snprintf( varValue, varValueLen, "%lu", ulval );
+ hasValue = 1;
+ break;
+ case MPI_UNSIGNED_LONG_LONG:
+ MPI_T_cvar_read( chandle, &ullval );
+ snprintf( varValue, varValueLen, "%llu", ullval );
+ hasValue = 1;
+ break;
+ case MPI_CHAR:
+ MPI_T_cvar_read( chandle, varValue );
+ hasValue = 1;
+ break;
+ default:
+ break;
+ }
+ }
+ MPI_T_cvar_handle_free( &chandle );
+
+ return hasValue;
+}
+
+/* Read a performance variable value and return the value as a null terminated
+ string.
+ For numeric values, only return a value for scalars (count == 1).
+ For character data, return the string if it fits in the available space.
+*/
+int getPvarValueAsStr( int idx, MPI_Datatype datatype, int isContinuous,
+ char varValue[], int varValueLen )
+{
+ int err, count, hasValue = 0;
+ int ival;
+ unsigned uval;
+ unsigned long ulval;
+ unsigned long long ullval;
+ double dval;
+ MPI_T_pvar_session session;
+ MPI_T_pvar_handle phandle;
+
+ MPI_T_pvar_session_create( &session );
+ MPI_T_pvar_handle_alloc( session, idx, NULL, &phandle, &count );
+ if (count == 1 || (datatype==MPI_CHAR && count < varValueLen)) {
+ if (!isContinuous) {
+ err = MPI_T_pvar_start( session, phandle );
+ if (err != MPI_SUCCESS) {
+ strncpy( varValue, "Failed to start pvar", varValueLen );
+ goto fn_fail;
+ }
+ err = MPI_T_pvar_stop( session, phandle );
+ if (err != MPI_SUCCESS) {
+ strncpy( varValue, "Failed to stop pvar", varValueLen );
+ goto fn_fail;
+ }
+ }
+ switch (datatype) {
+ case MPI_INT:
+ MPI_T_pvar_read( session, phandle, &ival );
+ snprintf( varValue, varValueLen, "%d", ival );
+ hasValue = 1;
+ break;
+ case MPI_UNSIGNED:
+ MPI_T_pvar_read( session, phandle, &uval );
+ snprintf( varValue, varValueLen, "%u", uval );
+ hasValue = 1;
+ break;
+ case MPI_UNSIGNED_LONG:
+ MPI_T_pvar_read( session, phandle, &ulval );
+ snprintf( varValue, varValueLen, "%lu", ulval );
+ hasValue = 1;
+ break;
+ case MPI_UNSIGNED_LONG_LONG:
+ MPI_T_pvar_read( session, phandle, &ullval );
+ snprintf( varValue, varValueLen, "%llu", ullval );
+ hasValue = 1;
+ break;
+ case MPI_DOUBLE:
+ MPI_T_pvar_read( session, phandle, &dval );
+ snprintf( varValue, varValueLen, "%e", dval );
+ hasValue = 1;
+ break;
+ case MPI_CHAR:
+ MPI_T_pvar_read( session, phandle, varValue );
+ hasValue = 1;
+ break;
+ default:
+ break;
+ }
+ }
+ fn_fail:
+ MPI_T_pvar_handle_free( session, &phandle );
+ MPI_T_pvar_session_free( &session );
+
+ return hasValue;
+}
+
+
+/* Confirm that the datatype is valid for the given performance variable type */
+int perfCheckVarType( int varClass, MPI_Datatype datatype )
+{
+ const char *p = 0;
+ switch (varClass) {
+ /* INT only */
+ case MPI_T_PVAR_CLASS_STATE:
+ if (datatype != MPI_INT) {
+ p = "Invalid datatype for CLASS_STATE: %s\n";
+ }
+ break;
+
+ /* Arithmetic */
+ case MPI_T_PVAR_CLASS_LEVEL:
+ case MPI_T_PVAR_CLASS_SIZE:
+ case MPI_T_PVAR_CLASS_HIGHWATERMARK:
+ case MPI_T_PVAR_CLASS_LOWWATERMARK:
+ case MPI_T_PVAR_CLASS_AGGREGATE:
+ case MPI_T_PVAR_CLASS_TIMER:
+ if (datatype != MPI_UNSIGNED && datatype != MPI_UNSIGNED_LONG &&
+ datatype != MPI_UNSIGNED_LONG_LONG && datatype != MPI_DOUBLE)
+ p = "Invalid datatype for arithmetic valued class: %s\n";
+ break;
+ /* DOUBLE only */
+ case MPI_T_PVAR_CLASS_PERCENTAGE:
+ if (datatype != MPI_DOUBLE)
+ p = "Invalid datatype for CLASS_PERCENTAGE: %s\n";
+ break;
+
+ /* Integer valued */
+ case MPI_T_PVAR_CLASS_COUNTER:
+ if (datatype != MPI_UNSIGNED && datatype != MPI_UNSIGNED_LONG &&
+ datatype != MPI_UNSIGNED_LONG_LONG)
+ p = "Invalid datatype for integer valued CLASS_COUNTER: %s\n";
+ break;
+
+ /* Any */
+ case MPI_T_PVAR_CLASS_GENERIC:
+ break;
+
+ default:
+ p = "Invalid class! (datatype = %s)\n";
+ break;
+ }
+ if (p) {
+ const char *p1 = 0;
+ if (datatype == MPI_INT) p1 = "MPI_INT";
+ else if (datatype == MPI_UNSIGNED) p1 = "MPI_UNSIGNED";
+ else if (datatype == MPI_UNSIGNED_LONG) p1 = "MPI_UNSIGNED_LONG";
+ else if (datatype == MPI_UNSIGNED_LONG_LONG) p1 = "MPI_UNSIGNED_LONG_LONG";
+ else if (datatype == MPI_COUNT) p1 = "MPI_COUNT";
+ else if (datatype == MPI_CHAR) p1 = "MPI_CHAR";
+ else if (datatype == MPI_DOUBLE) p1 = "MPI_DOUBLE";
+ else {
+ if (datatype == MPI_DATATYPE_NULL) {
+ p1 = "Invalid MPI datatype:NULL";
+ }
+ else {
+ static char typename[MPI_MAX_OBJECT_NAME];
+ int tlen;
+ MPI_Type_get_name( datatype, typename, &tlen );
+ if (typename[0]) p1 = typename;
+ else p1 = "Invalid: Unknown datatype name";
+ }
+ }
+ fprintf( stderr, p, p1 );
+ }
+ return 0;
+}
+
+/* Several of the MPI_T routines return a string length as well as the string.
+ Test that the value returned is correct (yes, at least one implementation
+ got this wrong). */
+int checkStringLen( const char *str, int expectedLen, const char *strName )
+{
+ int actLen = strlen(str) + 1;
+ if (expectedLen != actLen) {
+ fpritnf( stderr,
+ "Incorrect return value for %s = %d, should = %d\n",
+ strName, expectedLen, actLen );
+ return 1;
+ }
+ return 0;
+}
http://git.mpich.org/mpich.git/commitdiff/9a4cc43c3f5adeee390a31862afb8178f…
commit 9a4cc43c3f5adeee390a31862afb8178f3095010
Author: William Gropp <wgropp(a)illinois.edu>
Date: Sun Jan 12 20:46:11 2014 -0500
Fix check for datatype name
The original code here was a bit subtle, so this fix adds a comment
explaining the particular test and provides the fallback message
when a datatype has no name associated with it.
diff --git a/test/mpi/mpi_t/mpit_vars.c b/test/mpi/mpi_t/mpit_vars.c
index ced40a7..ea18680 100644
--- a/test/mpi/mpi_t/mpit_vars.c
+++ b/test/mpi/mpi_t/mpit_vars.c
@@ -293,8 +293,14 @@ char *mpit_validDtypeStr(MPI_Datatype datatype)
int tlen;
strncpy(typename, "Invalid:", MPI_MAX_OBJECT_NAME);
MPI_Type_get_name(datatype, typename + 8, &tlen);
- if (typename[0])
+ /* We must check location typename[8] to see if
+ MPI_Type_get_name returned a name (not all datatypes
+ have names). If it did not, then we indicate that
+ with a different message */
+ if (typename[8])
p = typename;
+ else
+ p = "Invalid: Unknown datatype name";
}
}
-----------------------------------------------------------------------
Summary of changes:
src/env/Makefile.mk | 9 +-
src/env/mpivars.c | 656 ++++++++++++++++++++++++++++++++++++++++++++
test/mpi/mpi_t/mpit_vars.c | 8 +-
3 files changed, 671 insertions(+), 2 deletions(-)
create mode 100644 src/env/mpivars.c
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1rc2-158-ge961180
by noreply@mpich.org 13 Jan '14
by noreply@mpich.org 13 Jan '14
13 Jan '14
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 e96118089e83a118a93b2ffdfa872015ab091291 (commit)
via 2b829d4ac7c2a9a93af2a8d537cbc37d21ed6ef8 (commit)
from 7b6824bf2e565f30bd147a3f72a9c6c66075615a (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/e96118089e83a118a93b2ffdfa872015a…
commit e96118089e83a118a93b2ffdfa872015ab091291
Author: Junchao Zhang <jczhang(a)mcs.anl.gov>
Date: Sun Jan 12 21:18:31 2014 -0600
Add -lgcov to LIBS when --enable-coverage
When mpich is configured with ./configure --enable-coverage ..., we put
-fprofile-arcs -ftest-coverage to CXXFLAGS. According to gcc manual,
-fprofile-arcs -ftest-coverage can be replaced by --coverage. But unfortunately,
I found though both add -lgcov when linking libmpichcxx.so, -lgcov is put to the
end of the link command, which is too late.
Adding -lgcov directly to LIBS will put -lgcov before -lc, which makes
the linker correctly resolve symbol 'atexit' in linking.
Fixes #2000
Signed-off-by: Huiwei Lu <huiweilu(a)mcs.anl.gov>
diff --git a/confdb/aclocal_coverage.m4 b/confdb/aclocal_coverage.m4
index 9e1659a..ce949d4 100644
--- a/confdb/aclocal_coverage.m4
+++ b/confdb/aclocal_coverage.m4
@@ -25,6 +25,7 @@ AC_ARG_ENABLE([coverage],
if test "$enable_coverage" = "yes" ; then
if test "$ac_cv_prog_gcc" = "yes" ; then
CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
+ LIBS="$LIBS -lgcov"
if test ${WRAPPER_CFLAGS+set} = set ; then
WRAPPER_CFLAGS="$WRAPPER_CFLAGS -fprofile-arcs -ftest-coverage"
fi
@@ -34,6 +35,7 @@ if test "$enable_coverage" = "yes" ; then
if test "$enable_cxx" = "yes" ; then
if test "$ac_cv_cxx_compiler_gnu" = "yes" ; then
CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
+ LIBS="$LIBS -lgcov"
if test ${WRAPPER_CXXFLAGS+set} = set ; then
WRAPPER_CXXFLAGS="$WRAPPER_CXXFLAGS -fprofile-arcs -ftest-coverage"
fi
@@ -46,6 +48,7 @@ if test "$enable_coverage" = "yes" ; then
if test "$enable_f77" = yes ; then
if test "$ac_cv_f77_compiler_gnu" = "yes" ; then
FFLAGS="$FFLAGS -fprofile-arcs -ftest-coverage"
+ LIBS="$LIBS -lgcov"
if test ${WRAPPER_FFLAGS+set} = set ; then
WRAPPER_FFLAGS="$WRAPPER_FFLAGS -fprofile-arcs -ftest-coverage"
fi
@@ -56,6 +59,7 @@ if test "$enable_coverage" = "yes" ; then
if test "$enable_fc" = yes ; then
if test "$ac_cv_fc_compiler_gnu" = "yes" ; then
FCFLAGS="$FCFLAGS -fprofile-arcs -ftest-coverage"
+ LIBS="$LIBS -lgcov"
if test ${WRAPPER_FCFLAGS+set} = set ; then
WRAPPER_FCFLAGS="$WRAPPER_FCFLAGS -fprofile-arcs -ftest-coverage"
fi
http://git.mpich.org/mpich.git/commitdiff/2b829d4ac7c2a9a93af2a8d537cbc37d2…
commit 2b829d4ac7c2a9a93af2a8d537cbc37d21ed6ef8
Author: Junchao Zhang <jczhang(a)mcs.anl.gov>
Date: Sun Jan 12 15:46:36 2014 -0600
Add return 0 to the main function of tests
Signed-off-by: Huiwei Lu <huiweilu(a)mcs.anl.gov>
diff --git a/test/mpi/pt2pt/big_count_status.c b/test/mpi/pt2pt/big_count_status.c
index 3b93109..a8b9b67 100644
--- a/test/mpi/pt2pt/big_count_status.c
+++ b/test/mpi/pt2pt/big_count_status.c
@@ -48,4 +48,5 @@ int main(int argc, char **argv)
printf(" No Errors\n");
}
MPI_Finalize();
+ return 0;
}
diff --git a/test/mpi/threads/pt2pt/ibsend.c b/test/mpi/threads/pt2pt/ibsend.c
index c21fd69..a54d591 100644
--- a/test/mpi/threads/pt2pt/ibsend.c
+++ b/test/mpi/threads/pt2pt/ibsend.c
@@ -153,4 +153,5 @@ int main(int argc, char *argv[])
MPI_Buffer_detach(&ptr_dt, &bs);
free(buffer);
MPI_Finalize();
+ return 0;
}
-----------------------------------------------------------------------
Summary of changes:
confdb/aclocal_coverage.m4 | 4 ++++
test/mpi/pt2pt/big_count_status.c | 1 +
test/mpi/threads/pt2pt/ibsend.c | 1 +
3 files changed, 6 insertions(+), 0 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0