polaris.Component.run_parallel_command

Component.run_parallel_command(args, cpus_per_task, ntasks, openmp_threads, logger, gpus=0, placement=None, memory_cap=None, gpus_per_task=None)[source]

Run a command using the active parallel system

Parameters:
  • args (list of str) – Command line arguments for the executable

  • cpus_per_task (int) – Number of CPUs per task

  • ntasks (int) – Number of parallel tasks

  • openmp_threads (int) – Number of OpenMP threads

  • logger (logging.Logger) – Logger to output command-line execution info

  • gpus (int, optional) – Number of GPUs this launch needs, as a total rather than a count per task

  • placement (mache.parallel.ResourcePlacement, optional) – The part of the allocation to confine this launch to. Passing none gives exactly the command Polaris has always built.

  • memory_cap (int, optional) – The most memory in MB this launch may use on each node, which some machines enforce and others ignore. Pass a step’s declared memory and never its memory_budget: a step that stated a number has made a claim and can fairly be held to it, while a step that said nothing is being guessed at by the framework and must not be killed for the framework’s guess.

  • gpus_per_task (int, optional) –

    Number of GPUs per task

    Deprecated since version 1.1.0: Use gpus instead

Raises:

RuntimeError – If the framework is not launching a step’s command. A step launches only through its command (args), never from run() or elsewhere.