Skip to main content

No project description provided

Project description

mdb

tests style readthedocs

An MPI-aware frontend for serial debuggers, such as gdb and lldb.

Documentation

For help with installation, a quick-start tutorial (with example debug session) and an API reference please check out mdb's documentation.

Purpose

mdb is a debugger aimed at parallel programs using the MPI programming paradigm. mdb acts as a MPI-aware frontend for different backend debuggers, such as gdb and lldb. As such, it supports the following languages:

  • C
  • C++
  • Fortran

Technically gdb supports other languages as well, but this is the intersection of languages that MPI is implemented in. For lldb your mileage may vary when debugging Fortran.

Usage

Please see the quick start guide in the documentation for a walk-through of a simple debug session. The guide covers basic debug commands and information on how to launch the debugger.

Installation

These instructions are for normal use of mdb. Please see below for a developer install.

  1. Clone the repository.

    git clone https://github.com/TomMelt/mdb.git
    
  2. (optional - but recommended) Create a conda environment or venv.

    conda create -n mdb python
    conda activate mdb
    
  3. Install mdb.

    cd mdb/
    pip install .
    

More information can be found in the installation guide.

Please Note mdb doesn't currently support Windows (see here for more info).

Dependencies

Non-Python Dependencies

  • Either gdb or lldb (depending on your preference)

mdb does not package gdb or lldb. You will need these installed on your system in order to run mdb. Please visit the debugger's respective sites for installation instructions e.g., gdb and lldb.

Python Dependencies

The main python dependencies are listed in the pyproject.toml file, e.g.,

  • click
  • matplotlib
  • numpy
  • pexpect

These will all be installed as part of the default pip installation. See installing mdb in the documentation for more information.

  • termgraph (optional - fancy Unicode plots straight to your terminal)

termgraph is optional but can be installed alongside mbd. See installing mdb in the documentation for more information.

Supported MPI implementations

Currently I am building and testing for open MPI only. In principle it really won't take much work to expand to other implementations but I just haven't done it yet.

  • Open MPI mpirun and mpiexec
  • Intel MPI mpirun and mpiexec
  • Slurm srun (should work but still needs testing)
  • others...

TODO

  • rewrite launcher to add more functionality (e.g., auto-restart if MPI job fails)
  • intercept stdin to run commands on another process (or processes) inside of an interactive session
  • track MPI communication dependencies (holistic metric)
  • print aggregated backtrace (holistic metric)
  • record asciinema demo? / youtube video?

Contributing

If you would like to be involved in the development, feel free to submit a PR. A word of caution though... the code is currently in a highly volatile state and a plan major changes to the interface and layout. I will update this section when I reach a more stable part of the development. Either way changes are welcome at anytime.

Please see CONTRIBUTING.md for more details on how best to contribute.

Developers

For development it is best to install mdb with some additional dependencies. These can be installed following the installing mdb for developers guide.

Acknowledgements

This project was inspired by @mystery-e204's mpidb tool and @Azrael3000's tmpi tmux interface.

Similar Projects

I have recently come across @robertu94's mpigdb. It seems to offer similar functionality and it has a closer integration with gdb using gdb's inbuilt inferiors to handle multiple processes at the same time (see gdb manual sec. 4.9 for more info). The main difference from my perspective is that I can plot variables across MPI processes using mdb and AFAIK mpigdb cannot. If you like mdb you may want to check out mpigdb as well.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mdb_debugger-1.0.3.tar.gz (224.8 kB view details)

Uploaded Source

Built Distribution

mdb_debugger-1.0.3-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file mdb_debugger-1.0.3.tar.gz.

File metadata

  • Download URL: mdb_debugger-1.0.3.tar.gz
  • Upload date:
  • Size: 224.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for mdb_debugger-1.0.3.tar.gz
Algorithm Hash digest
SHA256 c45cffb320a51274519753b950b7b72cd91a8a5804941556120ed41bb8b491d8
MD5 3f7dbcfdae460320d82c3284a07053e7
BLAKE2b-256 4a1285559ffd951ab52012efe25fcad8d8dc31f785f5cee6bed9e63992f09601

See more details on using hashes here.

File details

Details for the file mdb_debugger-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: mdb_debugger-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 23.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for mdb_debugger-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9696dee92c6e33ce81a814fbc2c257fa16fce3ee524385ede243aad325ea8016
MD5 597e0f70cd1ff7b2873082cb9d643230
BLAKE2b-256 806a59784dfb0873ce9529d4ffbd74c447be90f0fd719c641e9c498d74de81d0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page