Class AMSDomainJob

Inheritance Relationships

Base Type

Class Documentation

ams_jobs.AMSDomainJob : public ams_jobs.AMSJob
The ``AMSDomainJob`` represents a job executing the original physics code that should be linked in with ``AMSlib``.
``AMSDomainJob`` modifies the environment of the executing job just before submission using the ``precede_deploy`` hook.

Public Functions

__init__(self, domain_names, stage_dir, *args, **kwargs)
Attaches a callable that will be called when the future finishes.

:param name: An arbitary name for every job. This can be an arbitary string.
:param executable: A string pointing to the executable to be executed
:param environ: The environment to be used  when scheduling the job.
:param resources: The resources dedicated to this job.
:param stdout File to redirect the stdout.
:param stderr File to redirect the stderr.
:param ams_log: A boolean value to enable the logging of AMS printouts
:param is_mpi: Whether the job is an mpi job.
:param cli_args: positional arguments of the cli command
:param cli_kwargs: key-word arguments of the cli command
:return: ``self``
db_dir(self)
The db_dir property.
db_dir(self, value)
domain_names(self)
The domain_names property.
domain_names(self, value)
from_descr(cls, descr, stage_dir=None)
precede_deploy(self, store, rmq=None)
Generates a ``AMS_OBJECTS`` json file and adding the appropriate 'database', ml_models and domain_models fields required by the application
and if requested also adds the AMS verbosity level to the environment

:param store: The AMSDataStore that contains all the files and directories of the AMS database.
:param rmq: The AMSRMQConfiguration containing all required information to connect to the RMQ server

:return: A dictionary with the correct structure
flux_job_id(self)
The flux_job_id property.
flux_job_id(self, value)
ams_id(self)
The ams_id property.
ams_id(self, value)

Public Members

db_dir
domain_names
stage_dir

Protected Functions

_generate_ams_objects_store(self, store, rmq)
Generates the dictionary requirements of the ``AMSlib`` database description.

:param store: The AMSDataStore that contains all the files and directories of the AMS database.
:param rmq: The AMSRMQConfiguration containing all required information to connect to the RMQ server

:return: A dictionary with the correct structure
_generate_ams_object(self, AMSDataStore store, Optional[AMSRMQConfiguration] rmq=None)
Generates a ``AMS_OBJECTS`` dictionary and adding the appropriate 'database', ml_models and domain_models fields required by the application.

:param store: The AMSDataStore that contains all the files and directories of the AMS database.
:param rmq: The AMSRMQConfiguration containing all required information to connect to the RMQ server

:return: A dictionary with the correct structure

Protected Attributes

_domain_names
_ams_object
_ams_object_fn
_lock
_flux_job_id
_ams_id
_db_dir