-
Notifications
You must be signed in to change notification settings - Fork 507
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
Compatibility with MPI #193
Comments
Hello, I attached the simple case described here: simple_debug.tar.gz. Basically, a minimal "hello world", compiled on Linux using
On the first two tabs that appear under Firefox, I have the following message:
The last tab works normally. As a reminder, my system is: Arch Linux, Python 3.6, Firefox 60.0. gdbgui was installed using pip in a Python virtualenv. I'll be happy to run any additional tests you need. |
I was able to run this without issue. I am wondering if the browser was open before you ran the commands to launch gdbgui. If that is the case, refreshing the respective tabs should fix the issue. |
I tested both with browser opened and closed, and have the same issue. I also tested with Chromium instead of Firefox, with the same behavior. Thanks for the tip, refreshing tabs does work (I was previously trying to restart the program, not refreshing the whole tab) I also tried using the "-r" option for gdbserver mode. In this case, I needed to load the tabs manually, but had no other issue. So this seems like a race condition on the browser/tab side, but can be worked around, although the behavior is surprising. Looks like I'm almost ready to have a working alternative to ddd, allowing to mix command line and GUI, and without the obsolete display library issues of ddd ! Thanks ! PS. I upgraded to 0.12.0 for my latest tests. |
@YvanFournier Hello. Were you able to debug mpi processes and if so how exactly? I assume that it is possible to add an infinite loop or very long sleep at the beginning of my program so that I could attach to all processes manually, but this seems rather clumsy. Best Regards, |
Hello, For example,
seems to work, but:
with the attached Python-based wrapper fails. The wrapper function I use is built to automatically handle more complex cases (such as finding a free port for gdbgui, attaching gdb to valgrind gdb servers, ... and passing command-line arguments in a consistent manner. In this case I obtain:
The issue might be in my wrapper or its use of "subprocess" or child process behavior (or possibly shell/no shell option), as I have already observed different behavior of the Valgrind gdb server using MPICH when launched from this wrapper (fails) or run manually (works). |
Describe the issue
I would be interested in using gdbgui to debug multiple processes started with MPI.
This is similar to closed issue #183, to which I added the same comment but might not be visible.
Steps to replicate
In a terminal:
mpiexec -n <# processes> gdbgui <executable_name> -e gdb -x <gdb_commands_file>
or:
mpiexec -n <# processes> <wrapper> <arguments>
In which the wrapper can optionnaly run gdbgui with a different (random) free port.
Describe your environment
gdbgui -v
): 0.11.3.1gdb -v
): 8.1pip freeze
): Python 3.6 + virtualenvDescription of the desired feauture
MPI usually launches multiple processes, either on a single host or multiple ones, and usually provides slightly different environment variable values to each process so they can determine their own rank. Also, it must be mentioned that when restarting processes, the whole set of processes must be relaunched together (usually using an "mpiexec" or similar command), so processes cannot be restarted independently within a debugger).
I tried launching different gdbgui instances with different port numbers (before reading this issue), but it seems when 2 gdbgui instances are launched, the second is killed even when not using the same port number.
So using multiple tabs is intersesting, but in this case how can I connect to the correct process ? The issue is not the simply possibility os doing so (using gdb attach), but the possibility of automating it (so as to run and attach multiple processes frow a wrapper script).
For additional information, the case I am interested in is mainly debugging on localhost (for HPC environments with massive parallelism, having many windows or tabs become unworkable, so more specialized debuggers such as DDT or TotalView become necessary, though attaching to a few select processes remains very useful).
The text was updated successfully, but these errors were encountered: