Skip to content

Commit ab70ca6

Browse files
committed
Revert "oshmem: Add new mca variables oshmem_abort_delay and oshmem_abort_print_stack"
This commit is replaced with more suitable. This reverts commit f288cd7.
1 parent 0482a02 commit ab70ca6

File tree

3 files changed

+4
-58
lines changed

3 files changed

+4
-58
lines changed

oshmem/runtime/oshmem_shmem_abort.c

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ int oshmem_shmem_abort(int errcode)
7171

7272
/* Should we print a stack trace? Not aggregated because they
7373
might be different on all processes. */
74-
if (oshmem_shmem_abort_print_stack) {
74+
if (ompi_mpi_abort_print_stack) {
7575
char **messages;
7676
int len, i;
7777

78-
if (OPAL_SUCCESS == opal_backtrace_buffer(&messages, &len)) {
78+
if (OSHMEM_SUCCESS == opal_backtrace_buffer(&messages, &len)) {
7979
for (i = 0; i < len; ++i) {
8080
fprintf(stderr,
8181
"[%s:%d] [%d] func:%s\n",
@@ -94,24 +94,6 @@ int oshmem_shmem_abort(int errcode)
9494
}
9595
}
9696

97-
/* Should we wait for a while before aborting? */
98-
if (0 != oshmem_shmem_abort_delay) {
99-
if (oshmem_shmem_abort_delay < 0) {
100-
fprintf(stderr ,"[%s:%d] Looping forever (MCA parameter mpi_abort_delay is < 0)\n",
101-
host, (int) pid);
102-
fflush(stderr);
103-
while (1) {
104-
sleep(5);
105-
}
106-
} else {
107-
fprintf(stderr, "[%s:%d] Delaying for %d seconds before aborting\n",
108-
host, (int) pid, oshmem_shmem_abort_delay);
109-
do {
110-
sleep(1);
111-
} while (--oshmem_shmem_abort_delay > 0);
112-
}
113-
}
114-
11597
if (!orte_initialized || !oshmem_shmem_initialized) {
11698
if (orte_show_help_is_available()) {
11799
/* TODO help message from SHMEM not from MPI is needed*/

oshmem/runtime/oshmem_shmem_params.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,12 @@
1313
#include "oshmem/constants.h"
1414

1515

16-
bool oshmem_shmem_abort_print_stack = false;
17-
int oshmem_shmem_abort_delay = 0;
1816
int oshmem_shmem_lock_recursive = 0;
1917
int oshmem_shmem_api_verbose = 0;
2018
int oshmem_preconnect_all = 0;
2119

2220
int oshmem_shmem_register_params(void)
2321
{
24-
oshmem_shmem_abort_delay = 0;
25-
(void) mca_base_var_register("oshmem",
26-
"oshmem",
27-
NULL,
28-
"abort_delay",
29-
"If nonzero, print out an identifying message when abort is invoked (hostname, PID of the process that called abort operation) and delay for that many seconds before exiting (a negative delay value means to never abort). This allows attaching of a debugger before quitting the job.",
30-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
31-
OPAL_INFO_LVL_9,
32-
MCA_BASE_VAR_SCOPE_READONLY,
33-
&oshmem_shmem_abort_delay);
34-
35-
oshmem_shmem_abort_print_stack = false;
36-
(void) mca_base_var_register("oshmem",
37-
"oshmem",
38-
NULL,
39-
"abort_print_stack",
40-
"If nonzero, print out a stack trace when abort is invoked",
41-
MCA_BASE_VAR_TYPE_BOOL, NULL, 0,
42-
0,
43-
OPAL_INFO_LVL_9,
44-
MCA_BASE_VAR_SCOPE_READONLY,
45-
&oshmem_shmem_abort_print_stack);
46-
4722
(void) mca_base_var_register("oshmem",
4823
"oshmem",
4924
NULL,

oshmem/runtime/params.h

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,9 @@ BEGIN_C_DECLS
2020
*/
2121

2222
/**
23-
* Whether an abort should print out a stack trace or not.
23+
* Whether an MPI_ABORT should print out a stack trace or not.
2424
*/
25-
OSHMEM_DECLSPEC extern bool oshmem_shmem_abort_print_stack;
26-
27-
/**
28-
* Whether abort should print out an identifying message
29-
* (e.g., hostname and PID) and loop waiting for a debugger to
30-
* attach. The value of the integer is how many seconds to wait:
31-
*
32-
* 0 = do not print the message and do not loop
33-
* negative value = print the message and loop forever
34-
* positive value = print the message and delay for that many seconds
35-
*/
36-
OSHMEM_DECLSPEC extern int oshmem_shmem_abort_delay;
25+
OSHMEM_DECLSPEC extern bool ompi_mpi_abort_print_stack;
3726

3827
/**
3928
* Whether or not the lock routines are recursive

0 commit comments

Comments
 (0)