Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
TomMelt committed Jan 15, 2024
1 parent 6915d6c commit b5e0be0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mdb/mdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

@click.group()
def main() -> None:
"""``mdb`` is comprised of two sub-commands ``attach`` and ``launch``.
"""mdb is comprised of two sub-commands [attach] and [launch].
They both need to be run in order to start a debug session.
* Firstly, use the ``launch`` command to start the ``gdb`` debug processes.
* Then, use ``attach`` to connect ``mdb`` to the debug processes.
* Firstly, use the launch command to start the mdb debug processes.
* Then, use attach to connect mdb to the debug processes.
See documentation of the respective subcommands for more information.
"""
Expand Down
6 changes: 6 additions & 0 deletions mdb/mdb_attach.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ def attach(
exec_script: click.File,
plot_lib: str,
) -> None:
"""Attach to mdb debug server.
Example:
$ mdb attach -n 8
"""
# debug all ranks if "select" is not set
if select is None:
select = f"0-{ranks - 1}"
Expand Down
6 changes: 6 additions & 0 deletions mdb/mdb_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ def launch(
auto_restart: bool,
args: tuple[str] | list[str],
) -> None:
"""Launch mdb debug server.
Example:
$ mdb launch -n 8 --auto-restart ./simple-mpi.exe
"""
args = list(args)

# debug all ranks if "select" is not set
Expand Down

0 comments on commit b5e0be0

Please sign in to comment.