There was a glitch in the SVN server this evening; you can tell that this r number is far lower than it should be.

IU is fixing it right now.  This commit will occur again with a new, higher SVN r number shortly...


Begin forwarded message:

From: <jsquyres@osl.iu.edu>
Date: March 19, 2009 8:41:21 PM EDT
To: <svn-full@open-mpi.org>
Subject: [OMPI svn-full] svn:open-mpi r20759
Reply-To: <devel@open-mpi.org>

Author: jsquyres
Date: 2009-03-19 20:41:21 EDT (Thu, 19 Mar 2009)
New Revision: 20759
URL: https://svn.open-mpi.org/trac/ompi/changeset/20759

Log:
Per a comment on the users list, don't try to install our own signal
handlers if there are already non-default handlers installed.  Print a
warning if that situation arises.

'''NOTE:''' This is a definite target for OPAL_SOS conversion -- as it
is right now, this message will be displayed for ''every'' MPI
process.  We want this to be OPAL_SOS'ed when that becomes available
so that the error message can be aggregated nicely.

Added:
   trunk/opal/util/help-opal-util.txt
Text files modified:
   trunk/opal/util/Makefile.am  |     4 +++-                                   
   trunk/opal/util/stacktrace.c |    22 ++++++++++++++++++++--                 
   2 files changed, 23 insertions(+), 3 deletions(-)

Modified: trunk/opal/util/Makefile.am
==============================================================================
--- trunk/opal/util/Makefile.am (original)
+++ trunk/opal/util/Makefile.am 2009-03-19 20:41:21 EDT (Thu, 19 Mar 2009)
@@ -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) 2007      Cisco Systems, Inc.  All rights reserved.
+# Copyright (c) 2007-2009 Cisco Systems, Inc.  All rights reserved.
 # $COPYRIGHT$
 #
 # Additional copyrights may follow
@@ -19,6 +19,8 @@

 SUBDIRS = keyval

+dist_pkgdata_DATA = help-opal-util.txt
+
 AM_LFLAGS = -Popal_show_help_yy
 LEX_OUTPUT_ROOT = lex.opal_show_help_yy


Added: trunk/opal/util/help-opal-util.txt
==============================================================================
--- (empty file)
+++ trunk/opal/util/help-opal-util.txt  2009-03-19 20:41:21 EDT (Thu, 19 Mar 2009)
@@ -0,0 +1,25 @@
+# -*- text -*-
+#
+# Copyright (c) 2009 Cisco Systems, Inc.  All rights reserved.
+# $COPYRIGHT$
+#
+# Additional copyrights may follow
+#
+# $HEADER$
+#
+# This is the US/English general help file for Open MPI.
+#
+[stacktrace signal override]
+Open MPI was insertting a signal handler for signal %d but noticed
+that there is already a non-default handler installer.  Open MPI's
+handler was therefore not installed; your job will continue.  This
+warning message will only be displayed once, even if Open MPI
+encounters this situation again.
+
+To avoid displaying this warning message, you can either not install
+the error handler for signal %d or you can have Open MPI not try to
+install its own signal handler for this signal by setting the
+"opal_signals" MCA parameter.
+
+  Signal: %d
+  Current opal_signals value: %s

Modified: trunk/opal/util/stacktrace.c
==============================================================================
--- trunk/opal/util/stacktrace.c        (original)
+++ trunk/opal/util/stacktrace.c        2009-03-19 20:41:21 EDT (Thu, 19 Mar 2009)
@@ -38,6 +38,7 @@
 #include "opal/mca/backtrace/backtrace.h"
 #include "opal/constants.h"
 #include "opal/util/output.h"
+#include "opal/util/show_help.h"

 #ifndef _NSIG
 #define _NSIG 32
@@ -410,11 +411,12 @@
 int opal_util_register_stackhandlers (void)
 {
 #if OMPI_WANT_PRETTY_PRINT_STACKTRACE && ! defined(__WINDOWS__)
-    struct sigaction act;
+    struct sigaction act, old;
     char * string_value;
     char * tmp;
     char * next;
     int param, i;
+    bool showed_help = false;

     gethostname(stacktrace_hostname, sizeof(stacktrace_hostname));
     stacktrace_hostname[sizeof(stacktrace_hostname) - 1] = '\0';
@@ -459,10 +461,26 @@
         return OPAL_ERR_BAD_PARAM;
       }

-      ret = sigaction (sig, &act, NULL);
+      ret = sigaction (sig, &act, &old);
       if (ret != 0) {
         return OPAL_ERR_IN_ERRNO;
       }
+      if (SIG_IGN != old.sa_handler && SIG_DFL != old.sa_handler) {
+          if (!showed_help) {
+              /* JMS This is icky; there is no error message
+                 aggregation here so this message may be repeated for
+                 every single MPI process...  This should be replaced
+                 with OPAL_SOS when that is done so that it can be
+                 properly aggregated. */
+              opal_show_help("help-opal-util.txt",
+                             "stacktrace signal override",
+                             true, sig, sig, sig, string_value);
+              showed_help = true;
+          }
+          if (0 != sigaction(sig, &old, NULL)) {
+              return OPAL_ERR_IN_ERRNO;
+          }
+      }
     }
     free(string_value);
 #endif /* OMPI_WANT_PRETTY_PRINT_STACKTRACE && ! defined(__WINDOWS__) */
_______________________________________________
svn-full mailing list
svn-full@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/svn-full



-- 
Jeff Squyres
Cisco Systems