idmtools_platform_slurm.platform_operations.suite_operations module#

Here we implement the SlurmPlatform suite operations.

Copyright 2021, Bill & Melinda Gates Foundation. All rights reserved.

class idmtools_platform_slurm.platform_operations.suite_operations.SlurmPlatformSuiteOperations(platform: SlurmPlatform, platform_type: ~typing.Type = <class 'idmtools_platform_slurm.platform_operations.utils.SlurmSuite'>)[source]#

Bases: IPlatformSuiteOperations

Provides Suite operation to the SlurmPlatform.

platform: SlurmPlatform#
platform_type#

alias of SlurmSuite

get(suite_id: str, **kwargs) Dict[source]#

Get a suite from the Slurm platform. :param suite_id: Suite id :param kwargs: keyword arguments used to expand functionality

Returns:

Slurm Suite object

platform_create(suite: Suite, **kwargs) Tuple[source]#

Create suite on Slurm Platform. :param suite: idmtools suite :param kwargs: keyword arguments used to expand functionality

Returns:

Slurm Suite object created

platform_run_item(suite: Suite, **kwargs)[source]#

Called during commissioning of an item. This should perform what is needed to commission job on platform. :param suite:

Returns:

None

get_parent(suite: SlurmSuite, **kwargs) Any[source]#

Fetches the parent of a suite. :param suite: Slurm suite :param kwargs: keyword arguments used to expand functionality

Returns:

None

get_children(suite: SlurmSuite, parent: Suite | None = None, raw=True, **kwargs) List[Any][source]#

Fetch Slurm suite’s children. :param suite: Slurm suite :param raw: True/False :param parent: the parent of the experiments :param kwargs: keyword arguments used to expand functionality

Returns:

List of Slurm experiments

to_entity(slurm_suite: SlurmSuite, children: bool = True, **kwargs) Suite[source]#

Convert a SlurmSuite object to idmtools Suite. :param slurm_suite: simulation to convert :param children: bool True/False :param kwargs: keyword arguments used to expand functionality

Returns:

Suite object

refresh_status(suite: Suite, **kwargs)[source]#

Refresh the status of a suite. On comps, this is done by refreshing all experiments. :param suite: idmtools suite :param kwargs: keyword arguments used to expand functionality

Returns:

None

create_sim_directory_map(suite_id: str) Dict[source]#

Build simulation working directory mapping. :param suite_id: suite id

Returns:

Dict of simulation id as key and working dir as value

platform_delete(suite_id: str) None[source]#

Delete platform suite. :param suite_id: platform suite id

Returns:

None

platform_cancel(suite_id: str, force: bool = False) None[source]#

Cancel platform suite’s slurm job. :param suite_id: suite id :param force: bool, True/False

Returns:

None

__init__(platform: SlurmPlatform, platform_type: ~typing.Type = <class 'idmtools_platform_slurm.platform_operations.utils.SlurmSuite'>) None#