Skip to content

Commit 810db73

Browse files
committed
Merge pull request #1640 from jsquyres/pr/mpir-cleanup
debuggers: remove some useless code
2 parents 6c9d65c + 83c2d04 commit 810db73

File tree

4 files changed

+6
-63
lines changed

4 files changed

+6
-63
lines changed

ompi/debuggers/debuggers.h

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2007-2011 Cisco Systems, Inc. All rights reserved.
12+
* Copyright (c) 2007-2016 Cisco Systems, Inc. All rights reserved.
1313
* $COPYRIGHT$
1414
*
1515
* Additional copyrights may follow
@@ -36,18 +36,6 @@ BEGIN_C_DECLS
3636
*/
3737
extern void ompi_debugger_setup_dlls(void);
3838

39-
/**
40-
* Notify a debugger that we're about to abort
41-
*/
42-
extern void ompi_debugger_notify_abort(char *string);
43-
44-
/**
45-
* Breakpoint function for parallel debuggers.
46-
* This function is also defined in orterun for the starter.
47-
* It should never conflict with this one
48-
*/
49-
OMPI_DECLSPEC void* MPIR_Breakpoint(void);
50-
5139
/**
5240
* Flag debugger will set when an application may proceed past
5341
* MPI_INIT. This needs to live in ompi_debuggers.c so that it's

ompi/debuggers/ompi_debuggers.c

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* University of Stuttgart. All rights reserved.
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
13-
* Copyright (c) 2007-2011 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2007-2016 Cisco Systems, Inc. All rights reserved.
1414
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
1515
* reserved.
1616
* $COPYRIGHT$
@@ -124,9 +124,6 @@ OMPI_DECLSPEC opal_datatype_t* opal_datatype_t_type_force_inclusion = NULL;
124124
OMPI_DECLSPEC ompi_datatype_t* ompi_datatype_t_type_force_inclusion = NULL;
125125

126126
OMPI_DECLSPEC volatile int MPIR_debug_gate = 0;
127-
OMPI_DECLSPEC volatile int MPIR_being_debugged = 0;
128-
OMPI_DECLSPEC volatile int MPIR_debug_state = 0;
129-
OMPI_DECLSPEC char *MPIR_debug_abort_string = "";
130127

131128
static char *ompi_debugger_dll_path = NULL;
132129

@@ -193,31 +190,3 @@ ompi_debugger_setup_dlls(void)
193190
mpimsgq_dll_locations = tmp1;
194191
mpidbg_dll_locations = tmp2;
195192
}
196-
197-
198-
/*
199-
* Tell the debugger that we are about to abort
200-
*/
201-
void ompi_debugger_notify_abort(char *reason)
202-
{
203-
MPIR_debug_state = MPIR_DEBUG_ABORTING;
204-
205-
if (NULL != reason && strlen(reason) > 0) {
206-
MPIR_debug_abort_string = reason;
207-
} else {
208-
MPIR_debug_abort_string = "Unknown";
209-
}
210-
211-
/* Now tell the debugger */
212-
MPIR_Breakpoint();
213-
}
214-
215-
/*
216-
* Breakpoint function for parallel debuggers. This function is also
217-
* defined in orterun for the starter. It should never conflict with
218-
* this
219-
*/
220-
void* MPIR_Breakpoint(void)
221-
{
222-
return NULL;
223-
}

ompi/debuggers/ompi_msgq_dll.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
3-
* Copyright (c) 2007-2008 Cisco Systems, Inc. All rights reserved.
3+
* Copyright (c) 2007-2016 Cisco Systems, Inc. All rights reserved.
44
* Copyright (c) 2004-2010 The University of Tennessee and The University
55
* of Tennessee Research Foundation. All rights
66
* reserved.
@@ -381,7 +381,7 @@ int mqs_image_has_queues (mqs_image *image, char **message)
381381
* that types have been read from there before we try to look them
382382
* up.
383383
*/
384-
mqs_find_function (image, "MPIR_Breakpoint", mqs_lang_c, NULL);
384+
mqs_find_function (image, "ompi_debugger_setup_dlls", mqs_lang_c, NULL);
385385

386386
/* Are we supposed to ignore this ? (e.g. it's really an HPF
387387
* runtime using the Open MPI process acquisition, but not wanting

ompi/runtime/ompi_mpi_abort.c

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* University of Stuttgart. All rights reserved.
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
13-
* Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
1414
* Copyright (c) 2010-2011 Oak Ridge National Labs. All rights reserved.
1515
* Copyright (c) 2014 Research Organization for Information Science
1616
* and Technology (RIST). All rights reserved.
@@ -119,7 +119,7 @@ int
119119
ompi_mpi_abort(struct ompi_communicator_t* comm,
120120
int errcode)
121121
{
122-
char *msg, *host, hostname[OPAL_MAXHOSTNAMELEN];
122+
char *host, hostname[OPAL_MAXHOSTNAMELEN];
123123
pid_t pid = 0;
124124

125125
/* Protection for recursive invocation */
@@ -159,20 +159,6 @@ ompi_mpi_abort(struct ompi_communicator_t* comm,
159159
}
160160
}
161161

162-
/* Notify the debugger that we're about to abort */
163-
164-
if (errcode < 0 ||
165-
asprintf(&msg, "[%s:%d] aborting with MPI error %s%s",
166-
host, (int) pid, ompi_mpi_errnum_get_string(errcode),
167-
opal_abort_print_stack ?
168-
" (stack trace available on stderr)" : "") < 0) {
169-
msg = NULL;
170-
}
171-
ompi_debugger_notify_abort(msg);
172-
if (NULL != msg) {
173-
free(msg);
174-
}
175-
176162
/* Should we wait for a while before aborting? */
177163

178164
if (0 != opal_abort_delay) {

0 commit comments

Comments
 (0)