diff --git a/doc/api/smartsim_api.rst b/doc/api/smartsim_api.rst index c5b923da2..1ce097bed 100644 --- a/doc/api/smartsim_api.rst +++ b/doc/api/smartsim_api.rst @@ -64,25 +64,26 @@ Types of Containers: Singularity -.. _rs-api: +.. _ls_api: -RunSettings +LaunchSettings ----------- When running SmartSim on laptops and single node workstations, -the base ``RunSettings`` object is used to parameterize jobs. -``RunSettings`` include a ``run_command`` parameter for local +the base ``LaunchSettings`` object is used to parameterize jobs. +``LaunchSettings`` include a ``run_command`` parameter for local launches that utilize a parallel launch binary like ``mpirun``, ``mpiexec``, and others. .. autosummary:: - RunSettings.add_exe_args + RunSettings.env_vars + RunSettings.launch_args RunSettings.update_env - -.. autoclass:: RunSettings + +.. autoclass:: LaunchSettings :inherited-members: :undoc-members: :members: diff --git a/doc/batch_settings.rst b/doc/batch_settings.rst index 07cef4c95..b54b73f19 100644 --- a/doc/batch_settings.rst +++ b/doc/batch_settings.rst @@ -13,11 +13,7 @@ launching capabilities tailored for specific workload managers (WLMs). Each Smar `launcher` interfaces with a ``BatchSettings`` subclass specific to a system's WLM: - The Slurm `launcher` supports: - - :ref:`SbatchSettings` -- The PBS Pro `launcher` supports: - - :ref:`QsubBatchSettings` -- The LSF `launcher` supports: - - :ref:`BsubBatchSettings` + - :ref:`LaunchSettings` .. note:: The local `launcher` does not support batch jobs. diff --git a/doc/experiment.rst b/doc/experiment.rst index 716df1228..b8c2b7484 100644 --- a/doc/experiment.rst +++ b/doc/experiment.rst @@ -27,8 +27,8 @@ Settings are given to ``Model`` and ``Ensemble`` objects to provide parameters f Once a workflow component is initialized (e.g. ``Orchestrator``, ``Model`` or ``Ensemble``), a user has access to the associated entity API which supports configuring and retrieving the entities' information: -* :ref:`Orchestrator API` -* :ref:`Model API` +* :ref:`FeatureStore API` +* :ref:`Application API` * :ref:`Ensemble API` There is no limit to the number of SmartSim entities a user can @@ -103,10 +103,10 @@ associated ``Experiment.create_...`` factory method shown below. - Return Type * - ``create_database`` - ``orch = exp.create_database([port, db_nodes, ...])`` - - :ref:`Orchestrator ` + - :ref:`FeatureStore ` * - ``create_model`` - ``model = exp.create_model(name, run_settings)`` - - :ref:`Model ` + - :ref:`Application ` * - ``create_ensemble`` - ``ensemble = exp.create_ensemble(name[, params, ...])`` - :ref:`Ensemble ` diff --git a/doc/run_settings.rst b/doc/run_settings.rst index ed12df8cb..842b85aa3 100644 --- a/doc/run_settings.rst +++ b/doc/run_settings.rst @@ -122,12 +122,12 @@ for each job scheduler. .. group-tab:: Slurm - The Slurm `launcher` supports the :ref:`SrunSettings API ` as well as the :ref:`MpirunSettings API `, - :ref:`MpiexecSettings API ` and :ref:`OrterunSettings API ` that each can be used to run executables - with launch binaries like `"srun"`, `"mpirun"`, `"mpiexec"` and `"orterun"`. Below we step through initializing a ``SrunSettings`` and ``MpirunSettings`` + The Slurm `launcher` supports the :ref:`LaunchSettings API ` that can be + used to run executables with launch binaries like `"srun"`, `"mpirun"`, `"mpiexec"` + and `"orterun"`. Below we step through initializing a ``LaunchSettings`` instance on a Slurm based machine using the associated `run_command`. - **SrunSettings** + **LaunchSettings** Run a job with the `srun` command on a Slurm based system. Any arguments passed in the `run_args` dict will be converted into `srun` arguments and prefixed with `"--"`. @@ -151,165 +151,6 @@ for each job scheduler. # Set the number of tasks for this job run_settings.set_tasks_per_node(25) - **MpirunSettings** - - Run a job with the `mpirun` command (MPI-standard) on a Slurm based system. Any - arguments passed in the `run_args` dict will be converted into `mpirun` arguments - and prefixed with `"--"`. Values of `None` can be provided for arguments that do - not have values. - - .. code-block:: python - - from smartsim import Experiment - - # Initialize the Experiment and provide launcher Slurm - exp = Experiment("name-of-experiment", launcher="slurm") - - # Initialize a MpirunSettings object - run_settings = exp.create_run_settings(exe="echo", exe_args="Hello World", run_command="mpirun") - # Set the number of cpus to use per task - run_settings.set_cpus_per_task(2) - # Set the number of tasks for this job - run_settings.set_tasks(100) - # Set the number of tasks for this job - run_settings.set_tasks_per_node(25) - - Users may replace `mpirun` with `mpiexec` or `orterun`. - - - .. note:: - SmartSim will look for an allocation by accessing the associated WLM job ID environment variable. If an allocation - is present, the entity will be launched on the reserved compute resources. A user may also specify the allocation ID - when initializing a run settings object via the `alloc` argument. If an allocation is specified, the entity receiving - these run parameters will launch on that allocation. - - .. group-tab:: PBS Pro - The PBS Pro `launcher` supports the :ref:`AprunSettings API ` as well as the :ref:`MpirunSettings API `, - :ref:`MpiexecSettings API ` and :ref:`OrterunSettings API ` that each can be used to run executables - with launch binaries like `"aprun"`, `"mpirun"`, `"mpiexec"` and `"orterun"`. Below we step through initializing a ``AprunSettings`` and ``MpirunSettings`` - instance on a PBS Pro based machine using the associated `run_command`. - - **AprunSettings** - - Run a job with `aprun` command on a PBS Pro based system. Any arguments passed in - the `run_args` dict will be converted into `aprun` arguments and prefixed with `--`. - Values of `None` can be provided for arguments that do not have values. - - .. code-block:: python - - from smartsim import Experiment - - # Initialize the experiment and provide launcher PBS Pro - exp = Experiment("name-of-experiment", launcher="pbs") - - # Initialize a AprunSettings object - run_settings = exp.create_run_settings(exe="echo", exe_args="Hello World", run_command="aprun") - # Set the number of cpus to use per task - run_settings.set_cpus_per_task(2) - # Set the number of tasks for this job - run_settings.set_tasks(100) - # Set the number of tasks for this job - run_settings.set_tasks_per_node(25) - - **MpirunSettings** - - Run a job with `mpirun` command on a PBS Pro based system. Any arguments passed - in the `run_args` dict will be converted into `mpirun` arguments and prefixed with `--`. - Values of `None` can be provided for arguments that do not have values. - - .. code-block:: python - - from smartsim import Experiment - - # Initialize the experiment and provide launcher PBS Pro - exp = Experiment("name-of-experiment", launcher="pbs") - - # Initialize a MpirunSettings object - run_settings = exp.create_run_settings(exe="echo", exe_args="Hello World", run_command="mpirun") - # Set the number of cpus to use per task - run_settings.set_cpus_per_task(2) - # Set the number of tasks for this job - run_settings.set_tasks(100) - # Set the number of tasks for this job - run_settings.set_tasks_per_node(25) - - Users may replace `mpirun` with `mpiexec` or `orterun`. - - .. group-tab:: PALS - The PALS `launcher` supports the :ref:`MpiexecSettings API ` that can be used to run executables - with the `mpiexec` launch binary. Below we step through initializing a ``MpiexecSettings`` instance on a PALS - based machine using the associated `run_command`. - - **MpiexecSettings** - - Run a job with `mpiexec` command on a PALS based system. Any arguments passed in the `run_args` dict will be converted into `mpiexec` arguments and prefixed with `--`. - Values of `None` can be provided for arguments that do not have values. - - .. code-block:: python - - from smartsim import Experiment - - # Initialize the experiment and provide launcher PALS - exp = Experiment("name-of-experiment", launcher="pals") - - # Initialize a MpiexecSettings object - run_settings = exp.create_run_settings(exe="echo", exe_args="Hello World", run_command="mpiexec") - # Set the number of tasks for this job - run_settings.set_tasks(100) - # Set the number of tasks for this job - run_settings.set_tasks_per_node(25) - - .. group-tab:: LSF - The LSF `launcher` supports the :ref:`JsrunSettings API ` as well as the :ref:`MpirunSettings API `, - :ref:`MpiexecSettings API ` and :ref:`OrterunSettings API ` that each can be used to run executables - with launch binaries like `"jsrun"`, `"mpirun"`, `"mpiexec"` and `"orterun"`. Below we step through initializing a ``JsrunSettings`` and ``MpirunSettings`` - instance on a LSF based machine using the associated `run_command`. - - **JsrunSettings** - - Run a job with `jsrun` command on a LSF based system. Any arguments passed in the - `run_args` dict will be converted into `jsrun` arguments and prefixed with `--`. - Values of `None` can be provided for arguments that do not have values. - - .. code-block:: python - - from smartsim import Experiment - - # Initialize the experiment and provide launcher LSF - exp = Experiment("name-of-experiment", launcher="lsf") - - # Initialize a JsrunSettings object - run_settings = exp.create_run_settings(exe="echo", exe_args="Hello World", run_command="jsrun") - # Set the number of cpus to use per task - run_settings.set_cpus_per_task(2) - # Set the number of tasks for this job - run_settings.set_tasks(100) - # Set the number of tasks for this job - run_settings.set_tasks_per_node(25) - - **MpirunSettings** - - Run a job with `mpirun` command on a LSF based system. Any arguments passed in the - `run_args` dict will be converted into `mpirun` arguments and prefixed with `--`. - Values of `None` can be provided for arguments that do not have values. - - .. code-block:: python - - from smartsim import Experiment - - # Initialize the experiment and provide launcher LSF - exp = Experiment("name-of-experiment", launcher="lsf") - - # Initialize a MpirunSettings object - run_settings = exp.create_run_settings(exe="echo", exe_args="Hello World", run_command="mpirun") - # Set the number of cpus to use per task - run_settings.set_cpus_per_task(2) - # Set the number of tasks for this job - run_settings.set_tasks(100) - # Set the number of tasks for this job - run_settings.set_tasks_per_node(25) - - Users may replace `mpirun` with `mpiexec` or `orterun`. .. group-tab:: Dragon The Dragon `launcher` does not need any launch binary. Below we step through initializing a ``DragonRunSettings`` instance on a Slurm-