Required
name| Type: | str |
| Description: | Name of the job group. |
def add_job_group(
name: str, description: str, info: dict | None = None
) -> None: ...| Type: | str |
| Description: | Name of the job group. |
| Type: | str |
| Description: | Description of the job group. |
| Type: | dict | None |
| Default value: | None |
| Description: | Optional info dictionary. |
def cancel_all_running_jobs(site_name: str, verbosity: int = 1) -> None: ...| Type: | str |
| Description: | Name of the site which's jobs to cancel. |
| Type: | int |
| Default value: | 1 |
| Description: | Verbosity level. |
def get_all_job_groups(
include_job_count: bool = False,
) -> list[db.JobGroup]: ...| Type: | bool |
| Default value: | False |
| Description: | Count the jobs for each group. Potentially somewhat slow. |
list[db.JobGroup]SalvusJob object by querying the database.def get_job(site_name: str, job_name: str) -> SalvusJob: ...| Type: | str |
| Description: | The site this job is on. |
| Type: | str |
| Description: | The name of the job. |
SalvusJobArray object.def get_job_array(site_name: str, job_array_name: str) -> SalvusJobArray: ...| Type: | str |
| Description: | The site this job array is on. |
| Type: | str |
| Description: | The name of the job array. |
SalvusJobArray objects.def get_job_arrays(
limit: salvus._core.types.int_ = 100,
site_name: str | None = None,
job_array_status: list[JobStatus | str] | None = None,
order_by: Iterable[str] = ("last_updated", "desc"),
update_job_arrays: bool = False,
) -> list[SalvusJobArray]: ...| Type: | salvus._core.types.int_ |
| Default value: | 100 |
| Description: | Maximum number of returned job arrays. |
| Type: | str | None |
| Default value: | None |
| Description: | Only return job arrays from this site. |
| Type: | list[JobStatus | str] | None |
| Default value: | None |
| Description: | Limit returned jobs to job arrays with these statuses. Will return any job if not given. |
| Type: | Iterable[str] |
| Default value: | ('last_updated', 'desc') |
| Description: | Choose how to order by (database column, direction). Available database columns are "last_updated", "job_array_start_time", "job_array_end_time", and "status". |
| Type: | bool |
| Default value: | False |
| Description: | Update pending/running job arrays. |
SalvusJob objects.def get_jobs(
limit: salvus._core.types.int_ = 100,
site_name: str | None = None,
job_status: list[JobStatus | str] | JobStatus | None = None,
order_by: Iterable[str] = ("last_updated", "desc"),
update_jobs: bool = False,
skip_jobs_from_job_arrays: bool = True,
) -> list[SalvusJob]: ...| Type: | salvus._core.types.int_ |
| Default value: | 100 |
| Description: | Maximum number of returned jobs. |
| Type: | str | None |
| Default value: | None |
| Description: | Only return jobs from this site. |
| Type: | Iterable[str] |
| Default value: | ('last_updated', 'desc') |
| Description: | Choose how to order by (database column, direction). Available database columns are "last_updated", "job_start_time", "job_end_time", and "status". |
| Type: | bool |
| Default value: | False |
| Description: | Update pending/running jobs. |
| Type: | bool |
| Default value: | True |
| Description: | Don't return jobs that are part of a job array. |
def get_site(
site_name: str,
verbosity: salvus._core.types.int_ = 1,
skip_version_number_check: bool = False,
) -> executors.BaseExecutor: ...| Type: | str |
| Description: | Name of the remote executor. |
| Type: | salvus._core.types.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. |
executors.BaseExecutorTaskChain object by querying the database.def get_task_chain(site_name: str, job_name: str) -> TaskChain: ...| Type: | str |
| Description: | The site this job is on. |
| Type: | str |
| Description: | The name of the job of the task chain. |
def initialize_site(
site_name: str,
verbosity: int = 1,
wait_for_initial_run_in_seconds: salvus._core.types.float_ = 3.0,
) -> executors.BaseExecutor: ...| Type: | str |
| Description: | The name of the site. |
| Type: | int |
| Default value: | 1 |
| Description: | Verbosity level. |
| Type: | salvus._core.types.float_ |
| Default value: | 3.0 |
| Description: | How long to wait for the job to finish before querying for the first time. 3 seconds is a good number for most cases, for testing this can be shortened. |
executors.BaseExecutordef run(
site_name: str,
input_file: str | pathlib.Path | dict | _DeepSetter,
output_folder: str | pathlib.Path,
ranks: salvus._core.types.int_ | None = None,
wall_time_in_seconds: salvus._core.types.float_ | None = None,
ping_interval_in_seconds: salvus._core.types.float_ | None = None,
job_groups: list[str] | None = None,
job_name: str | None = None,
get_all: bool = False,
overwrite: bool = False,
delete_remote_files: bool = True,
raise_on_deletion_failure: bool = False,
verbosity: int = 1,
) -> SalvusJob: ...| Type: | str |
| Description: | The remote executor to use. |
| Type: | str | pathlib.Path | dict | _DeepSetter |
| Description: | The input file or simulation object for the run. |
| Type: | str | pathlib.Path |
| Description: | Output files will be copied here. |
| Type: | salvus._core.types.int_ | None |
| Default value: | None |
| Description: | The number of ranks to run with. Defaults to the site's configuration value. |
| Type: | salvus._core.types.float_ | None |
| Default value: | None |
| Description: | The wall time in seconds if the site requires one. |
| Type: | salvus._core.types.float_ | None |
| Default value: | None |
| Description: | How often to query the remote site about the job status. Defaults to the site's configuration value. |
| Type: | list[str] | None |
| Default value: | None |
| Description: | Job groups to attach to the job in the database. |
| Type: | str | None |
| Default value: | None |
| Description: | Custom job name. Be careful with this. |
| Type: | bool |
| Default value: | False |
| Description: | Get all output files. Wavefield outputs are omitted by default. |
| Type: | bool |
| Default value: | False |
| Description: | Delete the output folder before running if it already exists. |
| Type: | bool |
| Default value: | True |
| Description: | Delete remote files after the run has finished. |
| Type: | bool |
| Default value: | False |
| Description: | If True this function will raise if, after everything ran, there is an error in the cleanup stage. This can happen for example on networked file systems. |
| Type: | int |
| Default value: | 1 |
| Description: | The verbosity level. |
overwrite is False.SalvusJobsalvus.flow.executors.salvus_job.SalvusJob object representing the job.def run_async(
site_name: str,
input_file: str | pathlib.Path | dict | _DeepSetter,
ranks: salvus._core.types.int_ | None = None,
wall_time_in_seconds: salvus._core.types.float_ | None = None,
job_groups: list[str] | None = None,
job_name: str | None = None,
verbosity: salvus._core.types.int_ = 1,
) -> SalvusJob: ...| Type: | str |
| Description: | Name of the remote executor. |
| Type: | str | pathlib.Path | dict | _DeepSetter |
| Description: | The input file or simulation object for the run. |
| Type: | salvus._core.types.int_ | None |
| Default value: | None |
| Description: | The number of ranks to run with. Defaults to the site's configuration value. |
| Type: | salvus._core.types.float_ | None |
| Default value: | None |
| Description: | The wall time in seconds if the site requires one. |
| Type: | list[str] | None |
| Default value: | None |
| Description: | Job groups to attach to the job in the database. |
| Type: | str | None |
| Default value: | None |
| Description: | Custom job name. Be careful with this. |
| Type: | salvus._core.types.int_ |
| Default value: | 1 |
| Description: | The verbosity level. |
SalvusJobsalvus.flow.executors.salvus_job.SalvusJob object representing the just submitted job.def run_many(
site_name: str,
input_files: Iterable[str | pathlib.Path | dict | _DeepSetter],
output_folder: str | pathlib.Path,
ranks_per_job: salvus._core.types.int_ | None = None,
wall_time_in_seconds_per_job: salvus._core.types.float_ | None = None,
ping_interval_in_seconds: salvus._core.types.float_ | None = None,
get_all: bool = False,
overwrite: bool = False,
copy_partial_results: bool = True,
delete_remote_files: bool = True,
raise_on_deletion_failure: bool = False,
verbosity: int = 1,
) -> SalvusJobArray: ...| Type: | str |
| Description: | The remote executor to use. |
| Type: | Iterable[str | pathlib.Path | dict | _DeepSetter] |
| Description: | A list of input files or simulation objects to be run. |
| Type: | str | pathlib.Path |
| Description: | Output files will be copied here. |
| Type: | salvus._core.types.int_ | None |
| Default value: | None |
| Description: | The number of ranks to run each job with. Defaults to the site's configuration value. |
| Type: | salvus._core.types.float_ | None |
| Default value: | None |
| Description: | The wall time in seconds per job if the site requires one. |
| Type: | salvus._core.types.float_ | None |
| Default value: | None |
| Description: | How often to query the remote site about the jobs' status. Defaults to the site's configuration value. |
| Type: | bool |
| Default value: | False |
| Description: | Get all output files. Wavefield outputs are omitted by default. |
| Type: | bool |
| Default value: | False |
| Description: | Delete the output folder before running if it already exists. |
| Type: | bool |
| Default value: | True |
| Description: | If this is True (the default) partial results will be copied over. This means that as long as a few jobs in the job array succeeded, these will be copied over. The function will still raise an exception but the data will be copied. Otherwise it will just raise. |
| Type: | bool |
| Default value: | True |
| Description: | Delete remote files after the run has finished. |
| Type: | bool |
| Default value: | False |
| Description: | If True this function will raise if, after everything ran, there is an error in the cleanup stage. This can happen for example on networked file systems. |
| Type: | int |
| Default value: | 1 |
| Description: | The verbosity level. |
SalvusJobArraydef run_many_async(
site_name: str,
input_files: Iterable[str | pathlib.Path | dict | _DeepSetter],
ranks_per_job: salvus._core.types.int_ | None = None,
wall_time_in_seconds_per_job: salvus._core.types.float_ | None = None,
job_groups: list[str] | None = None,
verbosity: salvus._core.types.int_ = 1,
) -> SalvusJobArray: ...| Type: | str |
| Description: | The remote executor to use. |
| Type: | Iterable[str | pathlib.Path | dict | _DeepSetter] |
| Description: | A list of input files or simulation objects to be run. |
| Type: | salvus._core.types.int_ | None |
| Default value: | None |
| Description: | The number of ranks to run each job with. Defaults to the site's configuration value. |
| Type: | salvus._core.types.float_ | None |
| Default value: | None |
| Description: | The wall time in seconds per job if the site requires one. |
| Type: | list[str] | None |
| Default value: | None |
| Description: | Job groups to attach to the job in the database. |
| Type: | salvus._core.types.int_ |
| Default value: | 1 |
| Description: | The verbosity level. |
SalvusJobArraySalvusJobArray object representing the just submitted job array.def run_task_chain(
site_name: str,
tasks: list[_DeepSetter | typing.Callable],
ranks: salvus._core.types.int_,
wall_time_in_seconds: salvus._core.types.float_ | None = None,
data_files_to_upload: list[pathlib.Path | str] | None = None,
ping_interval_in_seconds: salvus._core.types.float_ | None = None,
job_name: str | None = None,
verbosity: int = 1,
interactive_tty: bool = False,
) -> TaskChain: ...| Type: | str |
| Description: | The remote executor to use. |
| Type: | list[_DeepSetter | typing.Callable] |
| Description: | A list of tasks. Each task can either be a Salvus simulation or a Python function. |
| Type: | salvus._core.types.int_ |
| Description: | The number of ranks to run with. Will only affect the Salvus runs. |
| Type: | salvus._core.types.float_ | None |
| Default value: | None |
| Description: | The wall time in seconds if the site requires one. |
| Type: | list[pathlib.Path | str] | None |
| Default value: | None |
| Description: | List of optional data files to upload to the task chain directory. |
| Type: | salvus._core.types.float_ | None |
| Default value: | None |
| Description: | How often to query the remote site about the job status. Defaults to the site's configuration value. |
| Type: | str | None |
| Default value: | None |
| Description: | Name of the task chain job. |
| Type: | int |
| Default value: | 1 |
| Description: | The verbosity level. |
| Type: | bool |
| Default value: | False |
| Description: | Flag for interactive tty. |
TaskChaindef run_task_chain_async(
site_name: str,
tasks: list[_DeepSetter | typing.Callable],
ranks: salvus._core.types.int_,
wall_time_in_seconds: salvus._core.types.float_ | None = None,
data_files_to_upload: None | list[pathlib.Path | str] = None,
job_name: str | None = None,
verbosity: int = 1,
interactive_tty: bool = False,
) -> TaskChain: ...| Type: | str |
| Description: | The remote executor to use. |
| Type: | list[_DeepSetter | typing.Callable] |
| Description: | A list of tasks. Each task can either be a Salvus simulation or a Python function. |
| Type: | salvus._core.types.int_ |
| Description: | The number of ranks to run with. Will only affect the Salvus runs. |
| Type: | salvus._core.types.float_ | None |
| Default value: | None |
| Description: | The wall time in seconds if the site requires one. |
| Type: | None | list[pathlib.Path | str] |
| Default value: | None |
| Description: | List of optional data files to upload to the task chain directory. |
| Type: | str | None |
| Default value: | None |
| Description: | Name of the task chain job. |
| Type: | int |
| Default value: | 1 |
| Description: | The verbosity level. |
| Type: | bool |
| Default value: | False |
| Description: | Flag for interactive tty. |
TaskChaindef set_config(site_settings: pathlib.Path | dict, db_path: str) -> None: ...| Type: | pathlib.Path | dict |
| Description: | Filename or existing dictionary with the site settings. |
| Type: | str |
| Description: | Path to the sqlite database used to internally keep track of things. |
def set_default_config() -> None: ...def temporary_salvus_config() -> typing.Generator[None, None, None]: ...typing.Generator[None, None, None]salvus-cli add-site and salvus-flow init-site. This function
will not test the configuration but just assume that it works. The
new site/executor will be immediately available for use.class add_new_executor(builtins.object):
def __init__(
self,
site_name: str,
executor_type: str,
salvus_binary: pathlib.Path | str,
salvus_floating_point_size: typing.Literal[32, 64] = 32,
run_directory: pathlib.Path | str,
tmp_directory: pathlib.Path | str,
use_cuda_capable_gpus: bool,
default_ranks: int,
max_ranks: int,
ssh_settings: dict[str, str] | None = None,
environment_variables: dict[str, str] | None = None,
site_specific: dict[str, typing.Any] | None = None,
verbosity: int = 1,
overwrite: bool = False,
): ...| Type: | str |
| Description: | The name of the site. |
| Type: | str |
| Description: | The type of executor. Can be "local", "ssh", or one of the other supported types. |
| Type: | pathlib.Path | str |
| Description: | Path to the Salvus binary. |
| Type: | typing.Literal[32, 64] |
| Default value: | 32 |
| Description: | The floating point size of the Salvus binary in bit. Either 32 or 64. No check if performed if this is correct. |
| Type: | pathlib.Path | str |
| Description: | The run directory of Salvus. |
| Type: | pathlib.Path | str |
| Description: | The temp directory of Salvus. |
| Type: | bool |
| Description: | Whether to use GPUs or not. |
| Type: | int |
| Description: | The default number of ranks to use. |
| Type: | int |
| Description: | The maximum number of ranks to use. |
| Type: | dict[str, str] | None |
| Default value: | None |
| Description: | SSH settings if the executor requires communication over SSH. |
| Type: | dict[str, str] | None |
| Default value: | None |
| Description: | Environment variables for the new executor. |
| Type: | dict[str, typing.Any] | None |
| Default value: | None |
| Description: | Site specific settings. |
| Type: | int |
| Default value: | 1 |
| Description: | The verbosity level. |
| Type: | bool |
| Default value: | False |
| Description: | Overwrite the site if it already exists. |