polaris.ModelStep.set_model_resources

ModelStep.set_model_resources(ntasks=None, min_tasks=None, openmp_threads=None, max_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

  • max_memory (int, optional) – the amount of memory that the step is allowed to use in MB. This is currently just a placeholder for later use with task parallelism