Rolf --

I didn't object to this RFC, but I didn't understand that you were going to *always* have a valid output stream for mca_btl_base_output (vs. being -1 when verbosity was not enabled).

Is this what you meant to do? It enabled some output from the openib btl (on the trunk) when running with no parameters because we were doing the following:

  opal_output(mca_btl_base_output, "foo");

with no conditionals; relying on mca_btl_base_output to be -1 if verbosity was not enabled.

Are we supposed to now be using BTL_DEBUG / BTL_VERBOSE for this kind of stuff now?


On Oct 15, 2007, at 9:10 AM, ro...@osl.iu.edu wrote:

Author: rolfv
Date: 2007-10-15 09:10:20 EDT (Mon, 15 Oct 2007)
New Revision: 16443
URL: https://svn.open-mpi.org/trac/ompi/changeset/16443

Log:
Remove the --mca btl_base_debug flag and clean up
the use of the --mca btl_base_verbose flag.  The
btl framework now matches all the other frameworks.
Slightly modify error messages for clarity.

Text files modified:
   trunk/ompi/mca/btl/base/btl_base_error.c  |     4 ++--
trunk/ompi/mca/btl/base/btl_base_error.h | 21 ++++ +---------------- trunk/ompi/mca/btl/base/btl_base_open.c | 27 +++++++++++ +---------------
   trunk/ompi/mca/btl/base/btl_base_select.c |    10 +++++++---
   trunk/ompi/mca/btl/tcp/btl_tcp_endpoint.c |     3 ++-
   5 files changed, 28 insertions(+), 37 deletions(-)

Modified: trunk/ompi/mca/btl/base/btl_base_error.c
====================================================================== ========
--- trunk/ompi/mca/btl/base/btl_base_error.c    (original)
+++ trunk/ompi/mca/btl/base/btl_base_error.c 2007-10-15 09:10:20 EDT (Mon, 15 Oct 2007)
@@ -9,7 +9,7 @@
* University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California.
  *                         All rights reserved.
- * Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2006-2007 Sun Microsystems, Inc. All rights reserved.
  * $COPYRIGHT$
  *
  * Additional copyrights may follow
@@ -28,7 +28,7 @@
 #include "orte/util/sys_info.h"
 #include "orte/mca/ns/ns_types.h"

-int mca_btl_base_debug;
+int mca_btl_base_verbose;

 int mca_btl_base_err(const char* fmt, ...)
 {

Modified: trunk/ompi/mca/btl/base/btl_base_error.h
====================================================================== ========
--- trunk/ompi/mca/btl/base/btl_base_error.h    (original)
+++ trunk/ompi/mca/btl/base/btl_base_error.h 2007-10-15 09:10:20 EDT (Mon, 15 Oct 2007)
@@ -10,6 +10,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
  *                         All rights reserved.
  * Copyright (c) 2007      Cisco Systems, Inc.  All rights reserved.
+ * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
  * $COPYRIGHT$
  *
  * Additional copyrights may follow
@@ -29,7 +30,7 @@
 #include "orte/util/sys_info.h"
 #include "orte/mca/ns/ns_types.h"

-OMPI_DECLSPEC extern int mca_btl_base_debug;
+OMPI_DECLSPEC extern int mca_btl_base_verbose;

 OMPI_DECLSPEC extern int mca_btl_base_err(const char*, ...);
 extern int mca_btl_base_out(const char*, ...);
@@ -70,30 +71,18 @@


 #if OMPI_ENABLE_DEBUG
-#define BTL_DEBUG(args)                                      \
-do {                                                         \
-   if(mca_btl_base_debug) {                                  \
-        mca_btl_base_err("[%s]%s[%s:%d:%s] ",     \
-                orte_system_info.nodename,                   \
-                ORTE_NAME_PRINT(orte_process_info.my_name),   \
-                __FILE__, __LINE__, __func__);               \
-        mca_btl_base_err args;                               \
-        mca_btl_base_err("\n");                              \
-   }                                                         \
-} while(0);
 #define BTL_VERBOSE(args)                                    \
 do {                                                         \
-   if(mca_btl_base_debug > 1) {                              \
-        mca_btl_base_err("[%s]%s[%s:%d:%s] ",     \
+   if(mca_btl_base_verbose > 0) {                            \
+        mca_btl_base_err("[%s]%s[%s:%d:%s] ",                \
                 orte_system_info.nodename,                   \
-                ORTE_NAME_PRINT(orte_process_info.my_name),   \
+                ORTE_NAME_PRINT(orte_process_info.my_name),  \
                 __FILE__, __LINE__, __func__);               \
         mca_btl_base_err args;                               \
         mca_btl_base_err("\n");                              \
    }                                                         \
 } while(0);
 #else
-#define BTL_DEBUG(args)
 #define BTL_VERBOSE(args)
 #endif


Modified: trunk/ompi/mca/btl/base/btl_base_open.c
====================================================================== ========
--- trunk/ompi/mca/btl/base/btl_base_open.c     (original)
+++ trunk/ompi/mca/btl/base/btl_base_open.c 2007-10-15 09:10:20 EDT (Mon, 15 Oct 2007)
@@ -9,7 +9,7 @@
* University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California.
  *                         All rights reserved.
- * Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2006-2007 Sun Microsystems, Inc. All rights reserved.
  * $COPYRIGHT$
  *
  * Additional copyrights may follow
@@ -84,24 +84,21 @@
 {
     if( ++already_opened > 1 ) return OMPI_SUCCESS;

-    mca_base_param_reg_int_name( "btl",
-                                 "base_debug",
- "If btl_base_debug is 1 standard debug is output, if > 1 verbose debug is output",
-                                 false, false,
-                                 0,
-                                 &mca_btl_base_debug );
-
-    if( mca_btl_base_debug > 0 ) {
-        mca_btl_base_output = opal_output_open(NULL);
- opal_output_set_verbosity(mca_btl_base_output, mca_btl_base_debug);
-    } else {
-        mca_btl_base_output = -1;
-    }
+    /* Verbose output */
+    mca_base_param_reg_int_name("btl",
+                                "base_verbose",
+ "Verbosity level of the BTL framework",
+                                false, false,
+                                0,
+                                &mca_btl_base_verbose);
+
+    mca_btl_base_output = opal_output_open(NULL);
+ opal_output_set_verbosity(mca_btl_base_output, mca_btl_base_verbose);

   /* Open up all available components */

   if (OMPI_SUCCESS !=
- mca_base_components_open("btl", 0, mca_btl_base_static_components, + mca_base_components_open("btl", mca_btl_base_output, mca_btl_base_static_components, &mca_btl_base_components_opened, true)) {
     return OMPI_ERROR;
   }

Modified: trunk/ompi/mca/btl/base/btl_base_select.c
====================================================================== ========
--- trunk/ompi/mca/btl/base/btl_base_select.c   (original)
+++ trunk/ompi/mca/btl/base/btl_base_select.c 2007-10-15 09:10:20 EDT (Mon, 15 Oct 2007)
@@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California.
  *                         All rights reserved.
+ * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
  * $COPYRIGHT$
  *
  * Additional copyrights may follow
@@ -104,7 +105,8 @@
component- >btl_version.mca_component_name);
         if (NULL == component->btl_init) {
             opal_output_verbose(10, mca_btl_base_output,
- "select: no init function; ignoring component"); + "select: no init function; ignoring component %s", + component- >btl_version.mca_component_name);
         } else {
modules = component->btl_init(&num_btls, enable_progress_threads,
                                           enable_mpi_threads);
@@ -114,7 +116,8 @@

             if (NULL == modules) {
                 opal_output_verbose(10, mca_btl_base_output,
-                                    "select: init returned failure");
+ "select: init of component %s returned failure", + component- >btl_version.mca_component_name);
                 opal_output_verbose(10, mca_btl_base_output,
                                     "select: module %s unloaded",
component- >btl_version.mca_component_name);
@@ -127,7 +130,8 @@

             else {
                 opal_output_verbose(10, mca_btl_base_output,
-                                    "select: init returned success");
+ "select: init of component %s returned success", + component- >btl_version.mca_component_name);

                 for (i = 0; i < num_btls; ++i) {
                     sm = OBJ_NEW(mca_btl_base_selected_module_t);

Modified: trunk/ompi/mca/btl/tcp/btl_tcp_endpoint.c
====================================================================== ========
--- trunk/ompi/mca/btl/tcp/btl_tcp_endpoint.c   (original)
+++ trunk/ompi/mca/btl/tcp/btl_tcp_endpoint.c 2007-10-15 09:10:20 EDT (Mon, 15 Oct 2007)
@@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California.
  *                         All rights reserved.
+ * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
  * $COPYRIGHT$
  *
  * Additional copyrights may follow
@@ -194,7 +195,7 @@
     nodelay = 0;
 #endif

- BTL_DEBUG(("%s: %s - %s nodelay %d sndbuf %d rcvbuf %d flags % 08x", + BTL_VERBOSE(("%s: %s - %s nodelay %d sndbuf %d rcvbuf %d flags %08x",
         msg, src, dst, nodelay, sndbuf, rcvbuf, flags));
 }
 #endif
_______________________________________________
svn-full mailing list
svn-f...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/svn-full


--
Jeff Squyres
Cisco Systems

Reply via email to