Skip to content

Commit

Permalink
IMPROVE: list #procs/machine in verdi computer show (#4945)
Browse files Browse the repository at this point in the history
The command `verdi computer show` will now also show the default value for
the number of processors per machine that were configured while setting up
the computer.

Also improved the structure / formatting of the list building.
  • Loading branch information
dev-zero authored May 17, 2021
1 parent 403f7e7 commit 773e944
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions aiida/cmdline/commands/cmd_computer.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,19 +365,21 @@ def computer_list(all_entries, raw):
@with_dbenv()
def computer_show(computer):
"""Show detailed information for a computer."""
table = []
table.append(['Label', computer.label])
table.append(['PK', computer.pk])
table.append(['UUID', computer.uuid])
table.append(['Description', computer.description])
table.append(['Hostname', computer.hostname])
table.append(['Transport type', computer.transport_type])
table.append(['Scheduler type', computer.scheduler_type])
table.append(['Work directory', computer.get_workdir()])
table.append(['Shebang', computer.get_shebang()])
table.append(['Mpirun command', ' '.join(computer.get_mpirun_command())])
table.append(['Prepend text', computer.get_prepend_text()])
table.append(['Append text', computer.get_append_text()])
table = [
['Label', computer.label],
['PK', computer.pk],
['UUID', computer.uuid],
['Description', computer.description],
['Hostname', computer.hostname],
['Transport type', computer.transport_type],
['Scheduler type', computer.scheduler_type],
['Work directory', computer.get_workdir()],
['Shebang', computer.get_shebang()],
['Mpirun command', ' '.join(computer.get_mpirun_command())],
['Default #procs/machine', computer.get_default_mpiprocs_per_machine()],
['Prepend text', computer.get_prepend_text()],
['Append text', computer.get_append_text()],
]
echo.echo(tabulate.tabulate(table))


Expand Down

0 comments on commit 773e944

Please sign in to comment.