idmtools_platform_slurm.slurm_operations.local_operations module

Here we implement the SlurmPlatform local operations.

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

class idmtools_platform_slurm.slurm_operations.local_operations.LocalSlurmOperations(platform: 'SlurmPlatform', platform_type: Type = None)

Bases: SlurmOperations

get_directory(item: Union[Suite, Experiment, Simulation]) Path

Get item’s path. :param item: Suite, Experiment, Simulation

Returns:

item file directory

get_directory_by_id(item_id: str, item_type: ItemType) Path

Get item’s path. :param item_id: entity id (Suite, Experiment, Simulation) :param item_type: the type of items (Suite, Experiment, Simulation)

Returns:

item file directory

mk_directory(item: Optional[Union[Suite, Experiment, Simulation]] = None, dest: Optional[Union[Path, str]] = None, exist_ok: bool = True) None

Make a new directory. :param item: Suite/Experiment/Simulation :param dest: the folder path :param exist_ok: True/False

Returns:

None

Link files. :param target: the source file path :param link: the file path

Returns:

None

Link directory/files. :param target: the source folder path. :param link: the folder path

Returns:

None

static update_script_mode(script_path: Union[Path, str], mode: int = 511) None

Change file mode. :param script_path: script path :param mode: permission mode

Returns:

None

make_command_executable(simulation: Simulation) None

Make simulation command executable :param simulation: idmtools Simulation

Returns:

None

create_batch_file(item: Union[Experiment, Simulation], **kwargs) None

Create batch file. :param item: the item to build batch file for :param kwargs: keyword arguments used to expand functionality.

Returns:

None

submit_job(item: Union[Experiment, Simulation], **kwargs) Any

Submit a Slurm job. :param item: idmtools Experiment or Simulation :param kwargs: keyword arguments used to expand functionality

Returns:

Any

get_simulation_status(sim_id: Union[UUID, str], **kwargs) EntityStatus

Retrieve simulation status. :param sim_id: Simulation ID :param kwargs: keyword arguments used to expand functionality

Returns:

EntityStatus

__init__(platform: SlurmPlatform, platform_type: Type = None) None
platform: SlurmPlatform