Skip to content
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

Use same option for switch hyper threading for worker as hq #17

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions aiida_hyperqueue/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ def alloc_group():
'recognised by HyperQueue, e.g. 30m, 2h, ... For the full list, see https://tinyurl.com/hq-duration.'
))
@click.option(
'-H',
'--enable-hyperthreading',
'--hyper-threading/--no-hyper-threading',
default=True,
type=click.BOOL,
is_flag=True,
help=(
'Allow HyperQueue to consider hyperthreads when assigning resources.'))
'Allow HyperQueue to consider hyperthreads when assigning resources.'),
)
@click.option(
'-b',
'--backlog',
Expand All @@ -99,11 +99,11 @@ def alloc_group():
help=('Option to allow pooled jobs to launch on multiple nodes.')
)
@decorators.with_dbenv()
def add_cmd(slurm_options, computer, time_limit, enable_hyperthreading,
def add_cmd(slurm_options, computer, time_limit, hyper_threading,
backlog, workers_per_alloc):
"""Add a new allocation to the HQ server."""

hyper = '' if enable_hyperthreading else '--no-hyper-threading'
hyper = '' if hyper_threading else '--no-hyper-threading'

with computer.get_transport() as transport:
retval, _, stderr = transport.exec_command_wait(
Expand Down
1 change: 1 addition & 0 deletions docs/source/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ verdi data hyperqueue alloc add -Y eiger-hq -t 30m -- -A mr0 -C mc -p debug
:::

Both the `-Y / --computer` option and `-t / --time-limit` options are required.
Use the `--hyper-threading` or `--no-hyper-threading` options to enable or disable hyper-threading for the worker allocation.
After the double hyphen `--`, you can place additional Slurm options to e.g. specify your project account (`-A`), constraints (`-C`) and the partition you want to run on (`-p`).
Once one or more allocations have been configured, you can check the list of allocations with `verdi data hyperqueue alloc list`:

Expand Down
Loading