Skip to content

Commit 9aefc70

Browse files
authored
Merge pull request #8572 from awlauria/mpir_v3.1.x
v3.1.x: Fix case where debuggers cannot read the MPIR proctable.
2 parents b161e78 + 81a2e4b commit 9aefc70

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

orte/orted/orted-mpir/orted_mpir.h

+21
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,27 @@ BEGIN_C_DECLS
1818
#define MPIR_MAX_PATH_LENGTH 512
1919
#define MPIR_MAX_ARG_LENGTH 1024
2020

21+
22+
/* Note to future MPIR maintainers:
23+
*
24+
* This struct MUST (along with all other MPIR_* symbols) be declared
25+
* and defined in this file. Otherwise they may be compiled *without* -g
26+
* and *with* optimizations in production. In the case where they are
27+
* not here, the debugger won't have the complete definition of the proctable.
28+
* This will prevent the debugger from reading it properly.
29+
*
30+
* It also needs to be seen by multiple files (orted_submih.c and
31+
* orted_mpir_breakpoint.c), so this is a better place for it anyway.
32+
*
33+
* For more info/discussion on this, see the following github issue:
34+
* https://github.com/open-mpi/ompi/issues/8563
35+
*/
36+
struct MPIR_PROCDESC {
37+
char *host_name; /* something that can be passed to inet_addr */
38+
char *executable_name; /* name of binary */
39+
int pid; /* process pid */
40+
};
41+
2142
extern struct MPIR_PROCDESC *MPIR_proctable;
2243
extern int MPIR_proctable_size;
2344
extern volatile int MPIR_being_debugged;

orte/orted/orted_submit.c

-7
Original file line numberDiff line numberDiff line change
@@ -2207,13 +2207,6 @@ static void complete_recv(int status, orte_process_name_t* sender,
22072207
#define DUMP_INT(X) fprintf(stderr, " %s = %d\n", # X, X);
22082208
#define FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)
22092209

2210-
struct MPIR_PROCDESC {
2211-
char *host_name; /* something that can be passed to inet_addr */
2212-
char *executable_name; /* name of binary */
2213-
int pid; /* process pid */
2214-
};
2215-
2216-
22172210
/**
22182211
* Initialization of data structures for running under a debugger
22192212
* using the MPICH/TotalView parallel debugger interface. Before the

0 commit comments

Comments
 (0)