[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.0.4-309-g08c22eb

mysql vizuser noreply at mpich.org
Wed Jun 19 14:32:56 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  08c22ebe9f47923b56a19770200fccf48187ee92 (commit)
      from  6dbb07aa774daabd4c87787d87f0ec30347c256b (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/08c22ebe9f47923b56a19770200fccf48187ee92

commit 08c22ebe9f47923b56a19770200fccf48187ee92
Author: Michael Blocksome <blocksom at us.ibm.com>
Date:   Wed Apr 3 12:58:43 2013 -0500

    Debugger changes from IBM.
    
    These are misc debugger changes that were not picked up during the merge
    for some reason.

diff --git a/src/mpi/debugger/dbginit.c b/src/mpi/debugger/dbginit.c
index 57227e5..fccc557 100644
--- a/src/mpi/debugger/dbginit.c
+++ b/src/mpi/debugger/dbginit.c
@@ -309,6 +309,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;
@@ -333,6 +334,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;
 	}
     }
@@ -341,7 +343,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);
 }
@@ -351,22 +356,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 5578a31..cf957eb 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,39 @@ 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;
+        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 +804,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
@@ -818,13 +827,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
 	    
@@ -1101,14 +1110,14 @@ 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, 
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/mpi/debugger/dbginit.c        |   32 +++++-----
 src/mpi/debugger/dll_mpich.c      |  117 ++++++++++++++++++++-----------------
 src/mpi/debugger/mpich_dll_defs.h |    8 ++-
 3 files changed, 85 insertions(+), 72 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list