From 1b5fa48a2958a6dd106367d6f5abd00e5f726986 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Thu, 23 Aug 2007 07:09:43 +0000 Subject: [PATCH] - Add missing PERUSE_COMM_REQ_REMOVE_FROM_POSTED_Q when matching from the posted generic_recv-queue. - Move the PERUSE_COMM_MSG_MATCH_POSTED_REQ from MCA_PML_OB1_RECV_REQUEST_MATCHED to mca_pml_ob1_recv_frag_match() as suggested by Terry Dontje Only post, if this is not a probe/iprobe request. - Do not post PERUSE_COMM_REQ_MATCH_UNEX for probes / iprobes and do in correct order before PERUSE_COMM_MSG_REMOVE_FROM_UNEX_Q This commit was SVN r15947. --- ompi/mca/pml/ob1/pml_ob1_recvfrag.c | 11 ++++++++++- ompi/mca/pml/ob1/pml_ob1_recvreq.c | 11 +++++++---- ompi/mca/pml/ob1/pml_ob1_recvreq.h | 5 +---- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/ompi/mca/pml/ob1/pml_ob1_recvfrag.c b/ompi/mca/pml/ob1/pml_ob1_recvfrag.c index f6043407e7..1924ee48a6 100644 --- a/ompi/mca/pml/ob1/pml_ob1_recvfrag.c +++ b/ompi/mca/pml/ob1/pml_ob1_recvfrag.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. @@ -244,6 +244,9 @@ void mca_pml_ob1_recv_frag_callback( mca_btl_base_module_t* btl, /* remove descriptor from posted specific ireceive list */ \ opal_list_remove_item(generic_receives, \ (opal_list_item_t *)generic_recv); \ + PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_REMOVE_FROM_POSTED_Q, \ + &(generic_recv->req_recv.req_base), \ + PERUSE_RECV); \ \ } \ } while(0) @@ -556,7 +559,13 @@ rematch: /* attempt to match actual request */ match = NULL; goto rematch; + } else { + if( (match->req_recv.req_base.req_type != MCA_PML_REQUEST_IPROBE) ) { + PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_MSG_MATCH_POSTED_REQ, + &(match->req_recv.req_base), PERUSE_RECV); + } } + } else { /* if no match found, place on unexpected queue */ diff --git a/ompi/mca/pml/ob1/pml_ob1_recvreq.c b/ompi/mca/pml/ob1/pml_ob1_recvreq.c index af8d07e70d..1092b577e8 100644 --- a/ompi/mca/pml/ob1/pml_ob1_recvreq.c +++ b/ompi/mca/pml/ob1/pml_ob1_recvreq.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. @@ -932,14 +932,17 @@ static mca_pml_ob1_recv_frag_t* mca_pml_ob1_recv_request_match_specific_proc( request->req_recv.req_base.req_proc = proc->ompi_proc; if( !((MCA_PML_REQUEST_IPROBE == request->req_recv.req_base.req_type) || (MCA_PML_REQUEST_PROBE == request->req_recv.req_base.req_type)) ) { + + PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_MATCH_UNEX, + &(request->req_recv.req_base), PERUSE_RECV ); + PERUSE_TRACE_MSG_EVENT( PERUSE_COMM_MSG_REMOVE_FROM_UNEX_Q, request->req_recv.req_base.req_comm, hdr->hdr_src, hdr->hdr_tag, PERUSE_RECV ); opal_list_remove_item(unexpected_frags, (opal_list_item_t*)frag); frag->request = request; - } - PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_MATCH_UNEX, - &(request->req_recv.req_base), PERUSE_RECV ); + } + return frag; } diff --git a/ompi/mca/pml/ob1/pml_ob1_recvreq.h b/ompi/mca/pml/ob1/pml_ob1_recvreq.h index 5fd6605c5f..a486a111cf 100644 --- a/ompi/mca/pml/ob1/pml_ob1_recvreq.h +++ b/ompi/mca/pml/ob1/pml_ob1_recvreq.h @@ -5,7 +5,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. @@ -245,9 +245,6 @@ do { (request)->req_recv.req_base.req_ompi.req_status.MPI_SOURCE = (hdr)->hdr_src; \ (request)->req_recv.req_base.req_ompi.req_status.MPI_TAG = (hdr)->hdr_tag; \ \ - PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_MSG_MATCH_POSTED_REQ, \ - &((request)->req_recv.req_base), PERUSE_RECV ); \ - \ if((request)->req_recv.req_bytes_packed > 0) { \ if( MPI_ANY_SOURCE == (request)->req_recv.req_base.req_peer ) { \ ompi_convertor_copy_and_prepare_for_recv( \