From cba37088933657bd762302ccc5b73a2efbc37e85 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Mon, 30 Mar 2009 17:09:32 +0000 Subject: [PATCH] Cleanup debugging output, remove an unnecessary re-compute of the checksum This commit was SVN r20895. --- ompi/datatype/datatype_checksum.h | 20 +++++--------------- ompi/mca/pml/csum/pml_csum.c | 4 ---- ompi/mca/pml/csum/pml_csum_component.c | 2 -- ompi/mca/pml/csum/pml_csum_recvfrag.c | 9 +++++---- ompi/mca/pml/csum/pml_csum_sendreq.c | 9 +++++---- 5 files changed, 15 insertions(+), 29 deletions(-) diff --git a/ompi/datatype/datatype_checksum.h b/ompi/datatype/datatype_checksum.h index 46b0b781b1..9f0a174b3e 100644 --- a/ompi/datatype/datatype_checksum.h +++ b/ompi/datatype/datatype_checksum.h @@ -27,38 +27,28 @@ #if defined (OMPI_CSUM_DST) #define MEMCPY_CSUM( DST, SRC, BLENGTH, CONVERTOR ) \ do { \ - volatile uint32_t __csum; \ - volatile uint32_t __ui1, __ui2; \ - __csum = (CONVERTOR)->checksum; \ - __ui1 = (CONVERTOR)->csum_ui1; \ - __ui2 = (CONVERTOR)->csum_ui2; \ (CONVERTOR)->checksum += OPAL_CSUM_BCOPY_PARTIAL( (SRC), (DST), (BLENGTH), (BLENGTH), &(CONVERTOR)->csum_ui1, &(CONVERTOR)->csum_ui2 ); \ - (CONVERTOR)->csum_ui1 = __ui1; \ - (CONVERTOR)->csum_ui2 = __ui2; \ - __csum += OPAL_CSUM_PARTIAL( (DST), (BLENGTH), &(CONVERTOR)->csum_ui1, &(CONVERTOR)->csum_ui2); \ - if (__csum != (CONVERTOR)->checksum) { \ - opal_output(0, "%s:%d:csum2: Invalid \'MEMCPY_CSUM check\' - dst csum:0x%04x != src csum:0x%04x\n", __FILE__, __LINE__, __csum, (CONVERTOR)->checksum); \ - } \ } while (0) -#else +#else /* if OMPI_CSUM_DST */ + #define MEMCPY_CSUM( DST, SRC, BLENGTH, CONVERTOR ) \ do { \ (CONVERTOR)->checksum += OPAL_CSUM_BCOPY_PARTIAL( (SRC), (DST), (BLENGTH), (BLENGTH), &(CONVERTOR)->csum_ui1, &(CONVERTOR)->csum_ui2 ); \ } while (0) -#endif +#endif /* if OMPI_CSUM_DST */ #define COMPUTE_CSUM( SRC, BLENGTH, CONVERTOR ) \ do { \ (CONVERTOR)->checksum += OPAL_CSUM_PARTIAL( (SRC), (BLENGTH), &(CONVERTOR)->csum_ui1, &(CONVERTOR)->csum_ui2 ); \ } while (0) -#else +#else /* if CHECKSUM */ #define MEMCPY_CSUM( DST, SRC, BLENGTH, CONVERTOR ) \ MEMCPY( (DST), (SRC), (BLENGTH) ) #define COMPUTE_CSUM( SRC, BLENGTH, CONVERTOR ) -#endif +#endif /* if CHECKSUM */ #endif /* DATATYPE_CHECKSUM_H_HAS_BEEN_INCLUDED */ diff --git a/ompi/mca/pml/csum/pml_csum.c b/ompi/mca/pml/csum/pml_csum.c index 325b9d82f2..25a9f7d4d2 100644 --- a/ompi/mca/pml/csum/pml_csum.c +++ b/ompi/mca/pml/csum/pml_csum.c @@ -376,10 +376,6 @@ int mca_pml_csum_add_procs(ompi_proc_t** procs, size_t nprocs) cleanup_and_return: OBJ_DESTRUCT(&reachable); - for (i=0; i < nprocs; i++) { - opal_output(0, "procs[%lu]->cflags = %04x", (unsigned long) i, - procs[i]->proc_convertor->flags); - } return rc; } diff --git a/ompi/mca/pml/csum/pml_csum_component.c b/ompi/mca/pml/csum/pml_csum_component.c index ff41a7a6a0..e871d63d8a 100644 --- a/ompi/mca/pml/csum/pml_csum_component.c +++ b/ompi/mca/pml/csum/pml_csum_component.c @@ -168,8 +168,6 @@ mca_pml_csum_component_init( int* priority, { opal_output_verbose( 10, 0, "in csum, my priority is 0\n"); -opal_output(0, "hdr size %d", (int)sizeof(mca_pml_csum_match_hdr_t)); - /* select us only if we are specified */ if((*priority) > 0) { *priority = 0; diff --git a/ompi/mca/pml/csum/pml_csum_recvfrag.c b/ompi/mca/pml/csum/pml_csum_recvfrag.c index 846891b919..b8acd926b2 100644 --- a/ompi/mca/pml/csum/pml_csum_recvfrag.c +++ b/ompi/mca/pml/csum/pml_csum_recvfrag.c @@ -132,10 +132,11 @@ void mca_pml_csum_recv_frag_callback_match(mca_btl_base_module_t* btl, csum = opal_csum16(hdr, sizeof(mca_pml_csum_match_hdr_t)); hdr->hdr_common.hdr_csum = csum_received; - opal_output(0, "%s:%s:%d common_hdr: %02x:%02x:%04x match_hdr: %04x:%04x:%08x:%08x:%08x", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), __FILE__, __LINE__, - hdr->hdr_common.hdr_type, hdr->hdr_common.hdr_flags, hdr->hdr_common.hdr_csum, - hdr->hdr_ctx, hdr->hdr_seq, hdr->hdr_src, hdr->hdr_tag, hdr->hdr_csum); + OPAL_OUTPUT_VERBOSE((5, mca_pml_base_output, + "%s:%s:%d common_hdr: %02x:%02x:%04x match_hdr: %04x:%04x:%08x:%08x:%08x", + ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), __FILE__, __LINE__, + hdr->hdr_common.hdr_type, hdr->hdr_common.hdr_flags, hdr->hdr_common.hdr_csum, + hdr->hdr_ctx, hdr->hdr_seq, hdr->hdr_src, hdr->hdr_tag, hdr->hdr_csum)); if (csum_received != csum) { opal_output(0, "%s:%s:%d: Invalid \'match header\' - received csum:0x%04x != computed csum:0x%04x\n", diff --git a/ompi/mca/pml/csum/pml_csum_sendreq.c b/ompi/mca/pml/csum/pml_csum_sendreq.c index e5d4856458..c01fbca4d7 100644 --- a/ompi/mca/pml/csum/pml_csum_sendreq.c +++ b/ompi/mca/pml/csum/pml_csum_sendreq.c @@ -578,10 +578,11 @@ int mca_pml_csum_send_request_start_copy( mca_pml_csum_send_request_t* sendreq, sendreq->req_send.req_base.req_convertor.checksum : OPAL_CSUM_ZERO); hdr->hdr_common.hdr_csum = opal_csum16(hdr, sizeof(mca_pml_csum_match_hdr_t)); - opal_output(0, "%s:%s:%d common_hdr: %02x:%02x:%04x match_hdr: %04x:%04x:%08x:%08x:%08x", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), __FILE__, __LINE__, - hdr->hdr_common.hdr_type, hdr->hdr_common.hdr_flags, hdr->hdr_common.hdr_csum, - hdr->hdr_match.hdr_ctx, hdr->hdr_match.hdr_seq, hdr->hdr_match.hdr_src, hdr->hdr_match.hdr_tag, hdr->hdr_match.hdr_csum); + OPAL_OUTPUT_VERBOSE((5, mca_pml_base_output, + "%s:%s:%d common_hdr: %02x:%02x:%04x match_hdr: %04x:%04x:%08x:%08x:%08x", + ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), __FILE__, __LINE__, + hdr->hdr_common.hdr_type, hdr->hdr_common.hdr_flags, hdr->hdr_common.hdr_csum, + hdr->hdr_match.hdr_ctx, hdr->hdr_match.hdr_seq, hdr->hdr_match.hdr_src, hdr->hdr_match.hdr_tag, hdr->hdr_match.hdr_csum)); OPAL_OUTPUT_VERBOSE((1, mca_pml_base_output, "%s:%s:%d Sending \'match\' with data csum:0x%x, header csum:0x%x, size:%lu \n",