Skip to content

Commit

Permalink
Fix MPIR regression with extern MPIR_proctable.
Browse files Browse the repository at this point in the history
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 <awlauria@us.ibm.com>
(cherry picked from commit 8ecaf9d)
  • Loading branch information
awlauria committed Mar 10, 2021
1 parent b161e78 commit 10bb425
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 6 additions & 1 deletion orte/orted/orted-mpir/orted_mpir.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 1 addition & 7 deletions orte/orted/orted_submit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 10bb425

Please sign in to comment.