Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions ompi/debuggers/debuggers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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-2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007-2016 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand All @@ -36,18 +36,6 @@ BEGIN_C_DECLS
*/
extern void ompi_debugger_setup_dlls(void);

/**
* Notify a debugger that we're about to abort
*/
extern void ompi_debugger_notify_abort(char *string);

/**
* Breakpoint function for parallel debuggers.
* This function is also defined in orterun for the starter.
* It should never conflict with this one
*/
OMPI_DECLSPEC void* MPIR_Breakpoint(void);

/**
* Flag debugger will set when an application may proceed past
* MPI_INIT. This needs to live in ompi_debuggers.c so that it's
Expand Down
33 changes: 1 addition & 32 deletions ompi/debuggers/ompi_debuggers.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007-2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007-2016 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
Expand Down Expand Up @@ -124,9 +124,6 @@ OMPI_DECLSPEC opal_datatype_t* opal_datatype_t_type_force_inclusion = NULL;
OMPI_DECLSPEC ompi_datatype_t* ompi_datatype_t_type_force_inclusion = NULL;

OMPI_DECLSPEC volatile int MPIR_debug_gate = 0;
OMPI_DECLSPEC volatile int MPIR_being_debugged = 0;
OMPI_DECLSPEC volatile int MPIR_debug_state = 0;
OMPI_DECLSPEC char *MPIR_debug_abort_string = "";

static char *ompi_debugger_dll_path = NULL;

Expand Down Expand Up @@ -193,31 +190,3 @@ ompi_debugger_setup_dlls(void)
mpimsgq_dll_locations = tmp1;
mpidbg_dll_locations = tmp2;
}


/*
* Tell the debugger that we are about to abort
*/
void ompi_debugger_notify_abort(char *reason)
{
MPIR_debug_state = MPIR_DEBUG_ABORTING;

if (NULL != reason && strlen(reason) > 0) {
MPIR_debug_abort_string = reason;
} else {
MPIR_debug_abort_string = "Unknown";
}

/* Now tell the debugger */
MPIR_Breakpoint();
}

/*
* Breakpoint function for parallel debuggers. This function is also
* defined in orterun for the starter. It should never conflict with
* this
*/
void* MPIR_Breakpoint(void)
{
return NULL;
}
4 changes: 2 additions & 2 deletions ompi/debuggers/ompi_msgq_dll.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2007-2008 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007-2016 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2004-2010 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
Expand Down Expand Up @@ -380,7 +380,7 @@ int mqs_image_has_queues (mqs_image *image, char **message)
* that types have been read from there before we try to look them
* up.
*/
mqs_find_function (image, "MPIR_Breakpoint", mqs_lang_c, NULL);
mqs_find_function (image, "ompi_debugger_setup_dlls", mqs_lang_c, NULL);

/* Are we supposed to ignore this ? (e.g. it's really an HPF
* runtime using the Open MPI process acquisition, but not wanting
Expand Down
18 changes: 2 additions & 16 deletions ompi/runtime/ompi_mpi_abort.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2010-2011 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2014 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
Expand Down Expand Up @@ -119,7 +119,7 @@ int
ompi_mpi_abort(struct ompi_communicator_t* comm,
int errcode)
{
char *msg, *host, hostname[OPAL_MAXHOSTNAMELEN];
char *host, hostname[OPAL_MAXHOSTNAMELEN];
pid_t pid = 0;

/* Protection for recursive invocation */
Expand Down Expand Up @@ -159,20 +159,6 @@ ompi_mpi_abort(struct ompi_communicator_t* comm,
}
}

/* Notify the debugger that we're about to abort */

if (errcode < 0 ||
asprintf(&msg, "[%s:%d] aborting with MPI error %s%s",
host, (int) pid, ompi_mpi_errnum_get_string(errcode),
opal_abort_print_stack ?
" (stack trace available on stderr)" : "") < 0) {
msg = NULL;
}
ompi_debugger_notify_abort(msg);
if (NULL != msg) {
free(msg);
}

/* Should we wait for a while before aborting? */

if (0 != opal_abort_delay) {
Expand Down