polaris.ModelStep.set_model_resources

ModelStep.set_model_resources(ntasks=None, min_tasks=None, openmp_threads=None, gpus=None, min_gpus=None, gpus_per_task=None, min_gpus_per_task=None, memory=None, min_memory=None)[source]

Update the resources for the step. This can be done within init, setup() or runtime_setup() for the step that this step belongs to, or init, configure() or run() for the task that this step belongs to.

Parameters:
  • ntasks (int, optional) – the number of tasks the step would ideally use. If too few cores are available on the system to accommodate the number of tasks and the number of cores per task, the step will run on fewer tasks as long as as this is not below min_tasks

  • min_tasks (int, optional) – the number of tasks the step requires. If the system has too few cores to accommodate the number of tasks and cores per task, the step will fail

  • openmp_threads (int, optional) – the number of OpenMP threads to use

  • gpus (int, optional) – the number of GPUs to use, as a total for the step rather than a count per task

  • min_gpus (int, optional) – the minimum number of GPUs required, again as a total

  • gpus_per_task (int, optional) –

    the number of GPUs per task to use

    Deprecated since version 1.1.0: Use gpus instead

  • min_gpus_per_task (int, optional) –

    the minimum number of GPUs per task required

    Deprecated since version 1.1.0: Use min_gpus instead

  • memory (int, optional) – the amount of memory in MB the step would ideally be given

  • min_memory (int, optional) – the amount of memory in MB the step needs in order to run at all