[feature request] very basic support for MPI debugging multiple processes at the same time
It would be good to have a very basic support of debugging MPI programs. Outside of VSCode I can attach a debugger to each terminal via ``` mpirun -np 2 xterm -e lldb -f my_exec ``` and then do the standard serial debugging in each terminal window. Alternative is to hack-in into the source a piece of code which prints process ID and waits so that a user can attach a debugger to some/all processes, see https://www.open-mpi.org/faq/?category=debugging#serial-debuggers . With `vscode-cpptools` one can already adopt the latter via `launch.json` and its `"processId": "${command:pickProcess}"` option. It would be great, if `vscode-cpptools` **goes one step further** by extending the launch config with ``` { "num_mpi_processes" : "4", "mpi_exec": "<path-to-mpirun>" }, ``` and in the background simply attach `gdb/lldb` debugger for each MPI process and perhaps append a number to the `"name": "(lldb) Attach",` so that one can use the available GUI. One would, of course, need to manually switch between debuggers for each process in the GUI but this should be fine for up to 4-8 processes, which is often enough to find bugs in MPI programs. p.s. AFAIK the only other non-commerical project with MPI debugger is [Eclipse PTP](https://www.eclipse.org/ptp/), but last time I checked it was limited to Linux.
Posted by davydden on Mar 22, 2018, 12:10 PM
Tags
Related issues
Raise real-world problems, find people facing the same issue, and discuss solutions.4,000 issues0 comments
support (EdTech)
proposal: all: add bare metal support
AMD hardware support for training and Inference
Android Version
[Feature Request] Music / Audio support
Implement PlatformView support on Linux
[feature request] very basic support for MPI debugging multiple processes at the same time
[feature request] very basic support for MPI debugging multiple processes at the same time
It would be good to have a very basic support of debugging MPI programs. Outside of VSCode I can attach a debugger to each terminal via ``` mpirun -np 2 xterm -e lldb -f my_exec ``` and then do the standard serial debugging in each terminal window. Alternative is to hack-in into the source a piece of code which prints process ID and waits so that a user can attach a debugger to some/all processes, see https://www.open-mpi.org/faq/?category=debugging#serial-debuggers . With `vscode-cpptools` one can already adopt the latter via `launch.json` and its `"processId": "${command:pickProcess}"` option. It would be great, if `vscode-cpptools` **goes one step further** by extending the launch config with ``` { "num_mpi_processes" : "4", "mpi_exec": "<path-to-mpirun>" }, ``` and in the background simply attach `gdb/lldb` debugger for each MPI process and perhaps append a number to the `"name": "(lldb) Attach",` so that one can use the available GUI. One would, of course, need to manually switch between debuggers for each process in the GUI but this should be fine for up to 4-8 processes, which is often enough to find bugs in MPI programs. p.s. AFAIK the only other non-commerical project with MPI debugger is [Eclipse PTP](https://www.eclipse.org/ptp/), but last time I checked it was limited to Linux.
Comments (0)
No comments yet. Start the discussion.