diff --git a/aiida_hyperqueue/cli.py b/aiida_hyperqueue/cli.py index b5980c4..d2a04de 100644 --- a/aiida_hyperqueue/cli.py +++ b/aiida_hyperqueue/cli.py @@ -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', @@ -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( diff --git a/docs/source/get_started.md b/docs/source/get_started.md index 192578e..00954bc 100644 --- a/docs/source/get_started.md +++ b/docs/source/get_started.md @@ -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`: