From 10bb425ccfd36a31bc6c0566e9dc773737af9741 Mon Sep 17 00:00:00 2001 From: Austen Lauria Date: Mon, 8 Mar 2021 13:09:40 -0500 Subject: [PATCH] Fix MPIR regression with extern MPIR_proctable. The proctable was no longer queriable via gdb because it was declared as extern in a header. Shuffle some code around to fix this. Signed-off-by: Austen Lauria (cherry picked from commit 8ecaf9d4e6be4994d6e34ee7037665148c1f36c9) --- orte/orted/orted-mpir/orted_mpir.h | 7 ++++++- orte/orted/orted_submit.c | 8 +------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/orte/orted/orted-mpir/orted_mpir.h b/orte/orted/orted-mpir/orted_mpir.h index a4ed7d08620..afc5122117f 100644 --- a/orte/orted/orted-mpir/orted_mpir.h +++ b/orte/orted/orted-mpir/orted_mpir.h @@ -18,7 +18,12 @@ BEGIN_C_DECLS #define MPIR_MAX_PATH_LENGTH 512 #define MPIR_MAX_ARG_LENGTH 1024 -extern struct MPIR_PROCDESC *MPIR_proctable; +struct MPIR_PROCDESC { + char *host_name; /* something that can be passed to inet_addr */ + char *executable_name; /* name of binary */ + int pid; /* process pid */ +}; + extern int MPIR_proctable_size; extern volatile int MPIR_being_debugged; extern volatile int MPIR_debug_state; diff --git a/orte/orted/orted_submit.c b/orte/orted/orted_submit.c index 4118d11c064..4859616b5be 100644 --- a/orte/orted/orted_submit.c +++ b/orte/orted/orted_submit.c @@ -123,6 +123,7 @@ static opal_pointer_array_t tool_jobs; static int timeout_seconds; static orte_timer_t *orte_memprofile_timeout; +extern struct MPIR_PROCDESC *MPIR_proctable; int orte_debugger_attach_fd = -1; bool orte_debugger_fifo_active=false; opal_event_t *orte_debugger_attach=NULL; @@ -2207,13 +2208,6 @@ static void complete_recv(int status, orte_process_name_t* sender, #define DUMP_INT(X) fprintf(stderr, " %s = %d\n", # X, X); #define FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) -struct MPIR_PROCDESC { - char *host_name; /* something that can be passed to inet_addr */ - char *executable_name; /* name of binary */ - int pid; /* process pid */ -}; - - /** * Initialization of data structures for running under a debugger * using the MPICH/TotalView parallel debugger interface. Before the