Required
name| Type: | str |
| Description: | Name of the site using the executor. |
class BaseExecutor(
salvus.flow.executors.remote_io_executor.RemoteIOExecutor, abc.ABC
):
def __init__(
self,
name: str,
configuration: dict,
db: typing.Any,
verbosity: int = 1,
skip_version_number_check: bool = False,
): ...| Type: | str |
| Description: | Name of the site using the executor. |
| Type: | dict |
| Description: | Configuration for the site. |
| Type: | typing.Any |
| Description: | Connection to the internal database. |
| Type: | int |
| Default value: | 1 |
| Description: | Verbosity level. |
| Type: | bool |
| Default value: | False |
| Description: | Skip the version number check of the local Python version vs the remote site. Useful for initializing and updating sites. |
type[pathlib.PurePosixPath | pathlib.PureWindowsPath])-Returns the type of file paths for the given site.pathlib.PurePosixPath | pathlib.PureWindowsPath)-The home directory.bool)-True if the site has been synchronized/initialized with the remote
site.OSType)-Returns the type of the operating system.
Subclasses can overwrite this.float)-A site's recommended update interval in seconds.bool)-True if a site requires SSH.bool)-True if a site requires a wall time.paramiko.sftp_client.SFTPClient | LocalSFTPClient)-Get the sftp client instance.
Will be initialized upon the first access.dict | None)-Site specific configuration.str)-A site's type.paramiko.client.SSHClient | LocalSSHClient)-Get the ssh client instance.
Will be initialized upon the first access.float)-A site's actual update interval.bool)-True if a site uses license tokens.float)-True if a site uses license tokens.def cancel_job(self, job_dir: str) -> None: ...| Type: | str |
| Description: | The job directory. |
def execute_command(
self,
command: str,
assert_ok: bool = True,
environment: dict[str, str] | None = None,
) -> tuple[int, list[str], list[str]]: ...| Type: | str |
| Description: | The command to run as a string. |
| Type: | bool |
| Default value: | True |
| Description: | Raise if the command does not exist with a code of 0. |
| Type: | dict[str, str] | None |
| Default value: | None |
| Description: | Environment variables to be set for this command. |
def get_job_status(self, job_dir: str) -> JobStatus | list[JobStatus]: ...| Type: | str |
| Description: | The job directory. |
def is_folder_writeable(self, path: _RemotePathInputType) -> bool: ...| Type: | _RemotePathInputType |
| Description: | Path on the remote machine. |
def launch_many_mpi_jobs(
self,
job_commands: dict[int, typing.Any],
working_dir: str,
stdout_path: str,
stderr_path: str,
wall_time_in_seconds_per_job: int | None,
license_tokens: list[str] | None = None,
) -> list[JobStatus]: ...| Type: | dict[int, typing.Any] |
| Description: | Dictionary of a list of commands, one per list per job. |
| Type: | str |
| Description: | The remote working directory for the execution. |
| Type: | str |
| Description: | Path to pipe stdout to. |
| Type: | str |
| Description: | Path to pipe stderr to. |
| Type: | int | None |
| Description: | Wall-time in seconds per job. Might be None, depending on the site. |
| Type: | list[str] | None |
| Default value: | None |
| Description: | If the job array uses license tokens for the license enforcement they are passed here. |
def launch_mpi_job(
self,
commands: list[executor_utils.RemoteCommand],
job_dir: str,
working_dir: str,
stdout_path: str,
stderr_path: str,
wall_time_in_seconds: int | None,
is_debug_job: bool = False,
) -> JobStatus: ...| Type: | list[executor_utils.RemoteCommand] |
| Description: | List of commands. One will be run after the other, but all will be submitted at the same time. |
| Type: | str |
| Description: | The remote directory where all the job files are stored. |
| Type: | str |
| Description: | The remote working directory for the execution. |
| Type: | str |
| Description: | Path to pipe stdout to. |
| Type: | str |
| Description: | Path to pipe stderr to. |
| Type: | int | None |
| Description: | Wall-time in seconds. Might be None, depending on the site. |
| Type: | bool |
| Default value: | False |
| Description: | True if this is supposed to be a debug job. Some job management systems have debug or other "fast" queues. Use these special queues if this is set to true. |
def pretty_print(self) -> None: ...def remote_exists(self, path: _RemotePathInputType) -> bool: ...| Type: | _RemotePathInputType |
| Description: | Path to check. |
def remote_get(
self,
remotepath: _RemotePathInputType,
localpath: io.BytesIO | pathlib.Path,
show_progressbar: bool = False,
) -> None: ...| Type: | _RemotePathInputType |
| Description: | Remote file to get. |
| Type: | io.BytesIO | pathlib.Path |
| Description: | Local path to save to Can be a file or a file like object. |
| Type: | bool |
| Default value: | False |
| Description: | Show a progressbar or not. |
def remote_listdir(self, path: _RemotePathInputType) -> list[str]: ...| Type: | _RemotePathInputType |
| Description: | Remote path whose contents to list. |
def remote_mkdir(
self, path: _RemotePathInputType, mode: int = 511
) -> None: ...| Type: | _RemotePathInputType |
| Description: | Directory to create. |
| Type: | int |
| Default value: | 511 |
| Description: | Permissions for the new directory. |
def remote_put(
self,
localpath: io.BytesIO | pathlib.Path,
remotepath: _RemotePathInputType,
show_progressbar: bool = False,
) -> None: ...| Type: | io.BytesIO | pathlib.Path |
| Description: | Local file to copy. Can be a file like object. |
| Type: | _RemotePathInputType |
| Description: | Where to copy to. |
| Type: | bool |
| Default value: | False |
| Description: | Show a progressbar or not. |
def remote_rmdir(
self, path: _RemotePathInputType, verbosity: int = 1
) -> None: ...| Type: | _RemotePathInputType |
| Description: | Remote path to delete. |
| Type: | int |
| Default value: | 1 |
| Description: | Verbosity level. |
def safe_remote_rmdir(
self, path: _RemotePathInputType, allow_failure: bool, verbosity: int = 1
) -> None: ...| Type: | _RemotePathInputType |
| Description: | Remote path to delete. |
| Type: | bool |
| Description: | Whether to allow failure or not. |
| Type: | int |
| Default value: | 1 |
| Description: | Verbosity level. |