diff --git a/opal/datatype/opal_convertor_internal.h b/opal/datatype/opal_convertor_internal.h index 6ec26a233e..b219c5f2c9 100644 --- a/opal/datatype/opal_convertor_internal.h +++ b/opal/datatype/opal_convertor_internal.h @@ -54,9 +54,7 @@ void opal_convertor_destroy_masters( void ); #if OPAL_ENABLE_DEBUG extern bool opal_pack_debug; -#define DO_DEBUG(INST) if( opal_pack_debug ) { INST } -#else -#define DO_DEBUG(INST) +extern bool opal_unpack_debug; #endif /* OPAL_ENABLE_DEBUG */ END_C_DECLS diff --git a/opal/datatype/opal_convertor_raw.c b/opal/datatype/opal_convertor_raw.c index 290d6a71e7..9b75fc8149 100644 --- a/opal/datatype/opal_convertor_raw.c +++ b/opal/datatype/opal_convertor_raw.c @@ -22,6 +22,10 @@ #if OPAL_ENABLE_DEBUG #include "opal/util/output.h" + +#define DO_DEBUG(INST) if( opal_pack_debug ) { INST } +#else +#define DO_DEBUG(INST) #endif /* OPAL_ENABLE_DEBUG */ /** diff --git a/opal/datatype/opal_datatype_copy.c b/opal/datatype/opal_datatype_copy.c index 79a2f63fdf..f41233a794 100644 --- a/opal/datatype/opal_datatype_copy.c +++ b/opal/datatype/opal_datatype_copy.c @@ -12,6 +12,7 @@ * All rights reserved. * Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2011 NVIDIA Corporation. All rights reserved. + * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -36,7 +37,6 @@ #if OPAL_ENABLE_DEBUG -extern bool opal_copy_debug; #define DO_DEBUG(INST) if( opal_copy_debug ) { INST } #else #define DO_DEBUG(INST) diff --git a/opal/datatype/opal_datatype_internal.h b/opal/datatype/opal_datatype_internal.h index 5589cc7859..6891bbef38 100644 --- a/opal/datatype/opal_datatype_internal.h +++ b/opal/datatype/opal_datatype_internal.h @@ -13,6 +13,7 @@ * Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -476,5 +477,10 @@ OPAL_DECLSPEC int opal_datatype_contain_basic_datatypes( const struct opal_datat OPAL_DECLSPEC int opal_datatype_dump_data_flags( unsigned short usflags, char* ptr, size_t length ); OPAL_DECLSPEC int opal_datatype_dump_data_desc( union dt_elem_desc* pDesc, int nbElems, char* ptr, size_t length ); +#if OPAL_ENABLE_DEBUG +extern bool opal_position_debug; +extern bool opal_copy_debug; +#endif /* OPAL_ENABLE_DEBUG */ + END_C_DECLS #endif /* OPAL_DATATYPE_INTERNAL_H_HAS_BEEN_INCLUDED */ diff --git a/opal/datatype/opal_datatype_pack.c b/opal/datatype/opal_datatype_pack.c index c252586b27..f74bd7eb45 100644 --- a/opal/datatype/opal_datatype_pack.c +++ b/opal/datatype/opal_datatype_pack.c @@ -28,6 +28,10 @@ #if OPAL_ENABLE_DEBUG #include "opal/util/output.h" + +#define DO_DEBUG(INST) if( opal_pack_debug ) { INST } +#else +#define DO_DEBUG(INST) #endif /* OPAL_ENABLE_DEBUG */ #include "opal/datatype/opal_datatype_checksum.h" diff --git a/opal/datatype/opal_datatype_position.c b/opal/datatype/opal_datatype_position.c index 9fb3765d2c..dc0edc5983 100644 --- a/opal/datatype/opal_datatype_position.c +++ b/opal/datatype/opal_datatype_position.c @@ -11,6 +11,7 @@ * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. * Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. + * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -34,7 +35,6 @@ #if OPAL_ENABLE_DEBUG #include "opal/util/output.h" -extern bool opal_position_debug; #define DO_DEBUG(INST) if( opal_position_debug ) { INST } #else #define DO_DEBUG(INST) diff --git a/opal/datatype/opal_datatype_unpack.c b/opal/datatype/opal_datatype_unpack.c index adcd9a64f3..a8f2f7e21f 100644 --- a/opal/datatype/opal_datatype_unpack.c +++ b/opal/datatype/opal_datatype_unpack.c @@ -30,6 +30,10 @@ #if OPAL_ENABLE_DEBUG #include "opal/util/output.h" + +#define DO_DEBUG(INST) if( opal_unpack_debug ) { INST } +#else +#define DO_DEBUG(INST) #endif /* OPAL_ENABLE_DEBUG */ #include "opal/datatype/opal_datatype_checksum.h"