[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.0.4-444-g92a7e41
mysql vizuser
noreply at mpich.org
Wed Aug 7 09:49:08 CDT 2013
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 92a7e4115d8c923dc4cf8c0002f911f7f60138c9 (commit)
via 4e00ba381ee3c69aa53bc2fa020e4f0f74260e67 (commit)
via e0a1cf6190ac813b9460af51606bf99ba11a2c03 (commit)
from a3571f526d03db5362dfaac3c819434a55915925 (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/92a7e4115d8c923dc4cf8c0002f911f7f60138c9
commit 92a7e4115d8c923dc4cf8c0002f911f7f60138c9
Author: Michael Blocksome <blocksom at us.ibm.com>
Date: Thu Jul 18 12:38:40 2013 -0500
add 'dbg_next' field to mpi request structure.
Do not overload the 'mpid.next' pointer in the request as this field is
defined by the mpid layer and therefore is specific to the device. Not
all adi implementations have this field.
Signed-off-by: Haizhu Liu <haizhu at us.ibm.com>
Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 9786192..48b6733 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -1484,6 +1484,8 @@ typedef struct MPID_Request {
* bloated request for regular pt2pt and NBC requests. */
struct MPID_Grequest_fns *greq_fns;
+ struct MPIR_Sendq *dbg_next;
+
/* Other, device-specific information */
#ifdef MPID_DEV_REQUEST_DECL
MPID_DEV_REQUEST_DECL
diff --git a/src/mpi/debugger/dbginit.c b/src/mpi/debugger/dbginit.c
index 86f4b4d..90a8101 100644
--- a/src/mpi/debugger/dbginit.c
+++ b/src/mpi/debugger/dbginit.c
@@ -337,7 +337,7 @@ void MPIR_Sendq_remember( MPID_Request *req,
p = (MPIR_Sendq *)MPIU_Malloc( sizeof(MPIR_Sendq) );
if (!p) {
/* Just ignore it */
- req->mpid.next = NULL;
+ req->dbg_next = NULL;
goto fn_exit;
}
}
@@ -349,7 +349,7 @@ void MPIR_Sendq_remember( MPID_Request *req,
p->prev = NULL;
MPIR_Sendq_head = p;
if (p->next) p->next->prev = p;
- req->mpid.next = (MPID_Request *)p; /* overload 'next' for debugger SEND queue */
+ req->dbg_next = p;
fn_exit:
MPIU_THREAD_CS_EXIT(HANDLE,req);
}
@@ -359,7 +359,7 @@ void MPIR_Sendq_forget( MPID_Request *req )
MPIR_Sendq *p, *prev;
MPIU_THREAD_CS_ENTER(HANDLE,req);
- p = (MPIR_Sendq *)req->mpid.next;
+ p = req->dbg_next;
if (!p) {
/* Just ignore it */
MPIU_THREAD_CS_EXIT(HANDLE,req);
http://git.mpich.org/mpich.git/commitdiff/4e00ba381ee3c69aa53bc2fa020e4f0f74260e67
commit 4e00ba381ee3c69aa53bc2fa020e4f0f74260e67
Author: Douglas Miller <dougmill at us.ibm.com>
Date: Thu Jun 28 08:29:02 2012 -0500
Make debugger SEND queue faster
This patch overloads the MPID_Request.mpid.next pointer to use for
referencing the debugger SEND queue structure to facilitate
faster removal during completion. MPID_Request.mpid.next is only
used by receives and free-pools otherwise.
(ibm) Issue 8178
(ibm) e1c4d5cfe88fccc67624f81497a74bc55d774e43
Signed-off-by: Su Huang <suhuang at us.ibm.com>
Signed-off-by: Michael Blocksome <blocksom at us.ibm.com>
Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>
diff --git a/src/mpi/debugger/dbginit.c b/src/mpi/debugger/dbginit.c
index 52bac79..86f4b4d 100644
--- a/src/mpi/debugger/dbginit.c
+++ b/src/mpi/debugger/dbginit.c
@@ -312,6 +312,7 @@ typedef struct MPIR_Sendq {
MPID_Request *sreq;
int tag, rank, context_id;
struct MPIR_Sendq *next;
+ struct MPIR_Sendq *prev;
} MPIR_Sendq;
MPIR_Sendq *MPIR_Sendq_head = 0;
@@ -336,6 +337,7 @@ void MPIR_Sendq_remember( MPID_Request *req,
p = (MPIR_Sendq *)MPIU_Malloc( sizeof(MPIR_Sendq) );
if (!p) {
/* Just ignore it */
+ req->mpid.next = NULL;
goto fn_exit;
}
}
@@ -344,7 +346,10 @@ void MPIR_Sendq_remember( MPID_Request *req,
p->rank = rank;
p->context_id = context_id;
p->next = MPIR_Sendq_head;
+ p->prev = NULL;
MPIR_Sendq_head = p;
+ if (p->next) p->next->prev = p;
+ req->mpid.next = (MPID_Request *)p; /* overload 'next' for debugger SEND queue */
fn_exit:
MPIU_THREAD_CS_EXIT(HANDLE,req);
}
@@ -354,22 +359,19 @@ void MPIR_Sendq_forget( MPID_Request *req )
MPIR_Sendq *p, *prev;
MPIU_THREAD_CS_ENTER(HANDLE,req);
- p = MPIR_Sendq_head;
- prev = 0;
-
- while (p) {
- if (p->sreq == req) {
- if (prev) prev->next = p->next;
- else MPIR_Sendq_head = p->next;
- /* Return this element to the pool */
- p->next = pool;
- pool = p;
- break;
- }
- prev = p;
- p = p->next;
+ p = (MPIR_Sendq *)req->mpid.next;
+ if (!p) {
+ /* Just ignore it */
+ MPIU_THREAD_CS_EXIT(HANDLE,req);
+ return;
}
- /* If we don't find the request, just ignore it */
+ prev = p->prev;
+ if (prev != NULL) prev->next = p->next;
+ else MPIR_Sendq_head = p->next;
+ if (p->next != NULL) p->next->prev = prev;
+ /* Return this element to the pool */
+ p->next = pool;
+ pool = p;
MPIU_THREAD_CS_EXIT(HANDLE,req);
}
diff --git a/src/mpi/debugger/dll_mpich.c b/src/mpi/debugger/dll_mpich.c
index ac9b834..cf957eb 100644
--- a/src/mpi/debugger/dll_mpich.c
+++ b/src/mpi/debugger/dll_mpich.c
@@ -655,7 +655,8 @@ static int fetch_receive (mqs_process *proc, mpich_process_info *p_info,
int is_complete = fetch_int ( proc, base + i_info->req_cc_offs, p_info);
mqs_taddr_t buffer = 0;
unsigned buf_count = -1;
- int datatype = fetch_int(proc, base + i_info->req_datatype_offs, p_info);
+ int datatype;
+ datatype = fetch_int(proc, base + i_info->req_datatype_offs, p_info);
if(look_for_user_buffer)
{
@@ -816,7 +817,7 @@ static int fetch_send (mqs_process *proc, mpich_process_info *p_info,
while (base != 0) {
/* Check this entry to see if the context matches */
- int actual_context = fetch_int( proc, base + i_info->sendq_context_id_offs, p_info );
+ int actual_context = fetch_int16( proc, base + i_info->sendq_context_id_offs, p_info );
if (actual_context == wanted_context) {
/* Fill in some of the fields */
@@ -846,6 +847,7 @@ static int fetch_send (mqs_process *proc, mpich_process_info *p_info,
res->system_buffer = 0;
res->buffer = data;
+
/* Don't forget to step the queue ! */
p_info->next_msg = base + i_info->sendq_next_offs;
return mqs_ok;
@@ -1121,6 +1123,7 @@ static mqs_tword_t fetch_int16 (mqs_process * proc, mqs_taddr_t addr,
dbgr_target_to_host (proc, buffer,
((char *)&res) + (host_is_big_endian ? sizeof(mqs_tword_t)-2 : 0),
2);
+
return res;
}
http://git.mpich.org/mpich.git/commitdiff/e0a1cf6190ac813b9460af51606bf99ba11a2c03
commit e0a1cf6190ac813b9460af51606bf99ba11a2c03
Author: Keira Zhang <keirazhang at cn.ibm.com>
Date: Sun Dec 18 21:16:22 2011 -0500
Message Queue debug support
(ibm) bd92b21a52afd8f4f6ef018d764d50060966f20b
Signed-off-by: Michael Blocksome <blocksom at us.ibm.com>
Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>
diff --git a/src/mpi/debugger/dbginit.c b/src/mpi/debugger/dbginit.c
index 57227e5..52bac79 100644
--- a/src/mpi/debugger/dbginit.c
+++ b/src/mpi/debugger/dbginit.c
@@ -87,8 +87,11 @@ void *MPIR_Breakpoint(void);
library that the debugger can load in order to access information about
the parallel program, such as message queues */
#ifdef HAVE_DEBUGGER_SUPPORT
+#undef MPICH_INFODLL_LOC
#ifdef MPICH_INFODLL_LOC
char MPIR_dll_name[] = MPICH_INFODLL_LOC;
+#else
+char MPIR_dll_name[] = "libtvmpich2.so";
#endif
#endif
diff --git a/src/mpi/debugger/dll_mpich.c b/src/mpi/debugger/dll_mpich.c
index 5578a31..ac9b834 100644
--- a/src/mpi/debugger/dll_mpich.c
+++ b/src/mpi/debugger/dll_mpich.c
@@ -308,57 +308,54 @@ int mqs_image_has_queues (mqs_image *image, char **message)
request definition */
{
mqs_type *req_type = dbgr_find_type( image, (char *)"MPID_Request", mqs_lang_c );
- if (req_type) {
- int dev_offs;
+ if (req_type) {
+ int mpid_offs;
have_req = 1;
- dev_offs = dbgr_field_offset( req_type, (char *)"dev" );
+ mpid_offs = dbgr_field_offset( req_type, (char *)"mpid" );
i_info->req_status_offs = dbgr_field_offset( req_type, (char *)"status" );
i_info->req_cc_offs = dbgr_field_offset( req_type, (char *)"cc" );
- if (dev_offs >= 0) {
+
+ if (mpid_offs >= 0) {
mqs_type *dreq_type = dbgr_find_type( image, (char *)"MPIDI_Request",
mqs_lang_c );
- i_info->req_dev_offs = dev_offs;
+ i_info->req_mpid_offs = mpid_offs;
if (dreq_type) {
- int loff, match_offs;
+ int loff, envelope_offs;
have_dreq = 1;
loff = dbgr_field_offset( dreq_type, (char *)"next" );
- i_info->req_next_offs = dev_offs + loff;
- loff = dbgr_field_offset( dreq_type, (char *)"user_buf" );
- i_info->req_user_buf_offs = dev_offs + loff;
- loff = dbgr_field_offset( dreq_type, (char *)"user_count" );
- i_info->req_user_count_offs = dev_offs + loff;
+ i_info->req_next_offs = mpid_offs + loff;
+ loff = dbgr_field_offset( dreq_type, (char *)"userbuf" );
+ i_info->req_userbuf_offs = mpid_offs + loff;
+ loff = dbgr_field_offset( dreq_type, (char *)"userbufcount" );
+ i_info->req_userbufcount_offs = mpid_offs + loff;
loff = dbgr_field_offset( dreq_type, (char *)"datatype" );
- i_info->req_datatype_offs = dev_offs + loff;
- match_offs = dbgr_field_offset( dreq_type, (char *)"match" );
- /*
- Current definition from the mpidpre.h file for ch3.
-
- typedef struct MPIDI_Message_match_parts {
- int32_t tag;
- MPIR_Rank_t rank;
- MPIR_Context_id_t context_id;
- } MPIDI_Message_match_parts_t;
- typedef union {
- MPIDI_Message_match_parts_t parts;
- MPIR_Upint whole;
- } MPIDI_Message_match;
- */
- if (match_offs >= 0) {
- mqs_type *match_type = dbgr_find_type( image, (char *)"MPIDI_Message_match", mqs_lang_c );
- if (match_type) {
- int parts_offs = dbgr_field_offset( match_type, (char *)"parts" );
- if (parts_offs >= 0) {
- mqs_type *parts_type = dbgr_find_type( image, (char *)"MPIDI_Message_match_parts_t", mqs_lang_c );
- if (parts_type) {
+ i_info->req_datatype_offs = mpid_offs + loff;
+ loff = dbgr_field_offset( dreq_type, (char *)"uebuflen" );
+ i_info->req_uebuflen_offs = mpid_offs + loff;
+ loff = dbgr_field_offset( dreq_type, (char *)"uebuf" );
+ i_info->req_uebuf_offs = mpid_offs + loff;
+ envelope_offs = dbgr_field_offset( dreq_type, (char *)"envelope" );
+ envelope_offs += mpid_offs ;
+
+ if (envelope_offs >= 0) {
+ mqs_type *envelope_type = dbgr_find_type( image, (char *)"MPIDI_MsgEnvelope", mqs_lang_c );
+ if (envelope_type) {
+ int msginfo_offs= dbgr_field_offset( envelope_type, (char *)"msginfo" );
+ msginfo_offs = envelope_offs + msginfo_offs;
+
+ if (msginfo_offs >= 0) {
+ mqs_type *msginfo_type= dbgr_find_type( image, (char *)"MPIDI_MsgInfo", mqs_lang_c );
+ if (msginfo_type) {
int moff;
- moff = dbgr_field_offset( parts_type, (char *)"tag" );
- i_info->req_tag_offs = dev_offs + match_offs + moff;
- moff = dbgr_field_offset( parts_type, (char *)"rank" );
- i_info->req_rank_offs = dev_offs + match_offs + moff;
- moff = dbgr_field_offset( parts_type, (char *)"context_id" );
- i_info->req_context_id_offs = dev_offs + match_offs + moff;
+ moff = dbgr_field_offset( msginfo_type, (char *)"MPItag" );
+ i_info->req_tag_offs = msginfo_offs + moff;
+ moff = dbgr_field_offset( msginfo_type, (char *)"MPIrank" );
+ i_info->req_rank_offs = msginfo_offs + moff;
+ moff = dbgr_field_offset( msginfo_type, (char *)"MPIctxt" );
+ i_info->req_context_id_offs = msginfo_offs + moff;
}
}
+
}
}
}
@@ -645,7 +642,7 @@ static int fetch_receive (mqs_process *proc, mpich_process_info *p_info,
#endif
while (base != 0) {
/* Check this entry to see if the context matches */
- int16_t actual_context = fetch_int16( proc, base + i_info->req_context_id_offs, p_info );
+ int actual_context = fetch_int16( proc, base + i_info->req_context_id_offs, p_info );
#ifdef DEBUG_LIST_ITER
initLogFile();
@@ -654,27 +651,38 @@ static int fetch_receive (mqs_process *proc, mpich_process_info *p_info,
if (actual_context == wanted_context) {
/* Found a request for this communicator */
int tag = fetch_int( proc, base + i_info->req_tag_offs, p_info );
- int rank = fetch_int16( proc, base + i_info->req_rank_offs, p_info );
+ int rank = fetch_int( proc, base + i_info->req_rank_offs, p_info );
int is_complete = fetch_int ( proc, base + i_info->req_cc_offs, p_info);
- mqs_tword_t user_buffer = fetch_pointer( proc,base+i_info->req_user_buf_offs, p_info);
- int user_count = fetch_int( proc,base + i_info->req_user_count_offs, p_info );
-
- /* Return -1 for ANY_TAG or ANY_SOURCE */
+ mqs_taddr_t buffer = 0;
+ unsigned buf_count = -1;
+ int datatype = fetch_int(proc, base + i_info->req_datatype_offs, p_info);
+
+ if(look_for_user_buffer)
+ {
+ buffer = fetch_pointer(proc, base + i_info->req_userbuf_offs, p_info);
+ buf_count = fetch_int(proc, base + i_info->req_userbufcount_offs, p_info);
+ }else{
+ /* unexpected buffer*/
+ buffer = fetch_pointer(proc, base + i_info->req_uebuf_offs, p_info);
+ buf_count = fetch_int(proc, base + i_info->req_uebuflen_offs, p_info);
+ }
+
+ /* Return -1 for ANY_TAG or ANY_SOURCE */
res->desired_tag = (tag >= 0) ? tag : -1;
res->desired_local_rank = (rank >= 0) ? rank : -1;
res->desired_global_rank = -1; /* Convert to rank in comm world,
if valid (in mpi-2, may
not be available) */
- res->desired_length = user_count; /* Count, not bytes */
+ res->desired_length = buf_count; /* Count, not bytes */
res->tag_wild = (tag < 0);
- res->buffer = user_buffer;
+ res->buffer = buffer;
/* We don't know the rest of these */
res->system_buffer = 0;
res->actual_local_rank = rank;
res->actual_global_rank = -1;
res->actual_tag = tag;
- res->actual_length = -1;
+ res->actual_length = buf_count;
res->extra_text[0][0] = 0;
res->status = (is_complete != 0) ? mqs_st_pending : mqs_st_complete;
@@ -795,7 +803,7 @@ static int fetch_send (mqs_process *proc, mpich_process_info *p_info,
#ifdef DEBUG_LIST_ITER
if (base) {
initLogFile();
- fprintf( debugf, "comm ptr = %p, comm context = %d\n",
+ fprintf( debugfp, "comm ptr = %p, comm context = %d\n",
comm, comm->context_id );
}
#endif
@@ -808,7 +816,7 @@ static int fetch_send (mqs_process *proc, mpich_process_info *p_info,
while (base != 0) {
/* Check this entry to see if the context matches */
- int actual_context = fetch_int16( proc, base + i_info->sendq_context_id_offs, p_info );
+ int actual_context = fetch_int( proc, base + i_info->sendq_context_id_offs, p_info );
if (actual_context == wanted_context) {
/* Fill in some of the fields */
@@ -818,13 +826,13 @@ static int fetch_send (mqs_process *proc, mpich_process_info *p_info,
mqs_taddr_t data = 0;
mqs_taddr_t sreq = fetch_pointer(proc, base+i_info->sendq_req_offs, p_info );
mqs_tword_t is_complete = fetch_int( proc, sreq+i_info->req_cc_offs, p_info );
- data = fetch_pointer( proc, sreq+i_info->req_user_buf_offs, p_info );
- length = fetch_int( proc, sreq+i_info->req_user_count_offs, p_info );
+ data = fetch_pointer( proc, sreq+i_info->req_userbuf_offs, p_info );
+ length = fetch_int( proc, sreq+i_info->req_userbufcount_offs, p_info );
/* mqs_tword_t complete=0; */
#ifdef DEBUG_LIST_ITER
initLogFile();
- fprintf( debugpf, "sendq entry = %p, rank off = %d, tag off = %d, context = %d\n",
+ fprintf( debugfp, "sendq entry = %p, rank off = %d, tag off = %d, context = %d\n",
base, i_info->sendq_rank_offs, i_info->sendq_tag_offs, actual_context );
#endif
@@ -838,7 +846,6 @@ static int fetch_send (mqs_process *proc, mpich_process_info *p_info,
res->system_buffer = 0;
res->buffer = data;
-
/* Don't forget to step the queue ! */
p_info->next_msg = base + i_info->sendq_next_offs;
return mqs_ok;
@@ -1101,20 +1108,19 @@ static mqs_tword_t fetch_int (mqs_process * proc, mqs_taddr_t addr,
dbgr_target_to_host (proc, buffer,
((char *)&res) + (host_is_big_endian ? sizeof(mqs_tword_t)-isize : 0),
isize);
-
+
return res;
}
static mqs_tword_t fetch_int16 (mqs_process * proc, mqs_taddr_t addr,
mpich_process_info *p_info)
{
char buffer[8]; /* ASSUME an integer fits in 8 bytes */
- int16_t res = 0;
+ mqs_tword_t res = 0;
if (mqs_ok == dbgr_fetch_data (proc, addr, 2, buffer))
dbgr_target_to_host (proc, buffer,
((char *)&res) + (host_is_big_endian ? sizeof(mqs_tword_t)-2 : 0),
2);
-
return res;
}
diff --git a/src/mpi/debugger/mpich_dll_defs.h b/src/mpi/debugger/mpich_dll_defs.h
index c66c39a..561dfba 100644
--- a/src/mpi/debugger/mpich_dll_defs.h
+++ b/src/mpi/debugger/mpich_dll_defs.h
@@ -32,14 +32,16 @@ typedef struct
/* Fields in MPID_Request (including structures within the request) */
int req_status_offs;
int req_cc_offs;
- int req_dev_offs;
+ int req_mpid_offs;
int req_next_offs;
int req_tag_offs;
int req_rank_offs;
int req_context_id_offs;
- int req_user_buf_offs;
- int req_user_count_offs;
+ int req_userbuf_offs;
+ int req_userbufcount_offs;
int req_datatype_offs;
+ int req_uebuf_offs;
+ int req_uebuflen_offs;
/* Fields in MPIR_Sendq */
int sendq_next_offs;
-----------------------------------------------------------------------
Summary of changes:
src/include/mpiimpl.h | 2 +
src/mpi/debugger/dbginit.c | 35 ++++++-----
src/mpi/debugger/dll_mpich.c | 117 ++++++++++++++++++++-----------------
src/mpi/debugger/mpich_dll_defs.h | 8 ++-
4 files changed, 90 insertions(+), 72 deletions(-)
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list