Mondaic
This API reference is not for the latest stable Salvus version.

salvus.flow.executors.executor_utils

Shared functionality for some of the sites.

Classes

RemoteCommand

class RemoteCommand(builtins.object):
    def __init__(
        self, command: str, execute_with_mpi: bool, ranks: Optional[int] = None
    ) -> None: ...

Represents a remote command.

Ranks should of course only be set if execute_with_mpi is True.

Parameters
  • command str — The command to be executed.,
  • execute_with_mpi bool — True if it should be run with MPI.
  • ranks Optional[int] — How many ranks to execute with, if run with MPI.

SiteConfig

class SiteConfig(salvus.flow.utils.serialization_helpers.SerializationMixin):
    def __init__(
        self,
        site_name: str,
        ranks_per_job: Optional[int, numpy.int32, numpy.int64] = None,
        wall_time_in_seconds_per_job: Optional[
            int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
        ] = None,
        memory_per_rank_in_MB: Optional[
            int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64
        ] = None,
        max_events_per_job_submission: Union[
            int, numpy.int32, numpy.int64
        ] = 0,
        verbosity: int = 0,
        skip_validation: bool = False,
    ): ...

Utility class to store job parameter for a run

Parameters
  • site_name str — The site to run on.
  • ranks_per_job Optional[int, numpy.int32, numpy.int64] — The number of ranks to run with. Defaults to the site’s configuration value.
  • wall_time_in_seconds_per_job Optional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — The wall time in seconds if the site requires one.
  • memory_per_rank_in_MB Optional[int, numpy.int32, numpy.int64, float, numpy.float32, numpy.float64] — Optional memory settings for the site.
  • max_events_per_job_submission Union[int, numpy.int32, numpy.int64] — Optional chunkwise job submission. If set to a positive number, simulations will be launched in chunks.
  • verbosity int — The verbosity level.
  • skip_validation bool — Skip validation of the site.
Attributes
ranks_per_job int

The number of ranks per job

Methods
from_json()
def from_json(d: Dict) -> SiteConfig: ...

Construct object from a JSON-serializable dictionary.

Parameters
  • d Dict — JSON dictionary of the inverse problem.
Returns SiteConfig
to_json()
def to_json(self, skip_validation: Optional[bool] = None) -> Dict: ...

Serialize the object to dictionary that can be written to JSON. Optionally overwrite the validation strategy.

Parameters
  • skip_validation Optional[bool] — Skip object validation prior to writing.
Returns Dict