1
1

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.

This commit was SVN r20831.
Этот коммит содержится в:
No Author 2009-03-20 01:05:30 +00:00
родитель 696416057d
Коммит 4711d6111f
3 изменённых файлов: 48 добавлений и 3 удалений

Просмотреть файл

@ -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

25
opal/util/help-opal-util.txt Обычный файл
Просмотреть файл

@ -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

Просмотреть файл

@ -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 @@ void opal_stackframe_output(int stream)
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 @@ int opal_util_register_stackhandlers (void)
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__) */