Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Intel's MPI debugging #102

Open
lsmenicucci opened this issue Oct 11, 2023 · 2 comments
Open

Support for Intel's MPI debugging #102

lsmenicucci opened this issue Oct 11, 2023 · 2 comments

Comments

@lsmenicucci
Copy link

When starting gdb from intel's mpirun using:

mpirun -gdb -gdb-args --interpreter=mi3 -n 2 ./my-prog 

output has an leading indicator of which processes are being debugged, for example:

[0,1] (mpigdb) run

which breaks the output parsing. By proxying the gdbmiparser.parse_response I can easily restore the structured output:

mpigdb_prefix = re.compile(r"^\s*(\(mpigdb\))?\s*\[[0-9,]+\]\s")
parse = gdbmiparser.parse_response 

def new_parse(a0, *args, **kwargs):
    newa0 = mpigdb_prefix.sub("", a0) 
    return parse(newa0, *args, **kwargs)

gdbmiparser.parse_response = new_parse

But the mpi rank information is lost. It would be nice if such information could be included in the parsed output.

@barisione
Copy link
Collaborator

I'm not familiar with mpirun, but its behaviour is a bit annoying as that's not valid MI 😞

@lsmenicucci
Copy link
Author

Yes, although it seems that the only difference is the prepended (0,1) (mpigdb) I haven't found any mpich/intel mpi documentation pointing that out. I've also had some random errors while parsing because there is an apparent race condition between the processes output and the MI output.

What really solved these issues was redirecting the gdb output to a file by enabling logging, like:

set pagination off
set logging file gdb.log 
set logging overwrite on

And then parse the gdb.log content with pygdbmi.gdbmiparser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants