=============== Getting started =============== This tutorial is a starter's guide to run a dummy experiment with Autosubmit. Dummy experiments run workflows with inexpensive empty tasks and therefore are ideal for teaching and testing purposes. Real experiments instead run workflows with complex tasks. To read information about how to develop parameterizable tasks for Autosubmit workflows, refer to :ref:`develproject`. .. _Local Platform: Set up password-less SSH ======================== Autosubmit needs to establish **password-less SSH connections** in order to run and monitor workflows on remote platforms. Ensure that you have a **password-less** connection to all platforms you want to use in your experiment. If you are unsure how to do this, please follow these instructions: - Open a terminal and run ``ssh-keygen -t rsa -b 4096 -C "email@email.com" -m PEM``. - Copy the resulting key to your platform of choice, via ``scp`` or ``ssh-copy-id``. .. code-block:: bash # Generate a key pair for password-less ssh, PEM format is recommended as others can cause problems ssh-keygen -t rsa -b 4096 -C "email@email.com" -m PEM # Copy the public key to the remote machine ssh-copy-id -i ~/.ssh/id_rsa.pub user@remotehost # Add your key to ssh agent (if encrypted) # If not initialized, initialize it eval `ssh-agent -s` # Add the key ssh-add ~/.ssh/id_rsa # Where ~/.ssh/id_rsa is the path to your private key .. seealso:: For host keys, proxies and shared setups, see :doc:`Configuration details, setup and sharing `. Create a new experiment ======================= Example:: autosubmit expid -dm -H "local" -d "Tutorial" - ``-dm``: Generates a dummy experiment. - ``-H``: Sets the principal experiment platform. - ``-d``: Sets a short description for the experiment. The output of the command will show the ```` of the experiment and generate the following directory structure: .. list-table:: :header-rows: 1 :widths: 20 80 * - Experiment folder - Contains * - ``conf`` - Experiment configuration files. * - ``pkl`` - Workflow pkl files. * - ``plot`` - Visualization output files. * - ``tmp`` - Logs, templates and misc files. * - ``proj`` - User scripts and project code. (empty) Then, execute ``autosubmit create `` and Autosubmit will generate the workflow graph. .. runcmd:: autosubmit create a000 -plt -o png --hide :silent-output: 1 :prompt: .. seealso:: For every ``expid`` option, and for how experiment IDs are allocated, see :doc:`Create an experiment ` and :doc:`Experiment IDs `. Run and monitor the experiment ============================== To run an experiment, use ``autosubmit run ``. Autosubmit runs experiments performing the following operations: - First, it **checks the experiment configuration**. If it is wrong, it won't proceed further. - Second, it **runs the experiment while retrieving all logs** from completed or failed tasks as they run. - Third, it manages all the **workflow steps by following the dependencies defined by the user** until all jobs are in ``COMPLETED`` or ``FAILED`` status. There can be jobs left in ``WAITING`` status if their dependencies are in ``FAILED`` status. While the experiment is running, it can be visualized via ``autosubmit monitor ``. .. autosubmitfigure:: :command: create :args: -plt :expid: a000 :type: png :figure: dummy.png :name: dummy :width: 100% :align: center :alt: dummy It illustrates the output of ``autosubmit monitor``. It describes all workflow jobs' possible status and actual status. Concurrently, the ``/tmp`` gets filled with the cmd scripts generated by Autosubmit to run the local and remote tasks (in this case, they are sent and submitted to the remote platform(s)). Autosubmit keeps logs at ``ASLOGS`` and ``LOG_`` folders, which are filled up with Autosubmit's command logs and job logs. .. seealso:: This tutorial only covers a plain run. For the full set of run options, and for restarting a workflow that stopped part-way, see :doc:`Running experiments ` and :doc:`Restart an experiment `. The monitoring output and the job statuses are covered in :doc:`/userguide/monitor_and_check/index`. Accessing the logs ================== The ``autosubmit`` commands such as ``expid``, ``run``, ``monitor``, all may produce log files on the user's file system. To save the user from having to navigate to the log file, or to memorize the location of these files, Autosubmit provides the ``autosubmit cat-log`` command. .. TODO: add a link to complete docs of ``cat-log`` (we must have similar page(s) for each AS sub-command). .. runcmd:: autosubmit cat-log a000 .. note:: The ``-f`` (``--file``) option is for the file type, not the file path. See the complete help and syntax with ``autosubmit cat-log --help`` for a list of supported types, depending on whether you choose a workflow log or a job log file. Note too that there is a ``-i`` (``--inspect``) flag in the command to tell Autosubmit you want job files generated by ``autosubmit inspect``, instead of job files generated by ``autosubmit run``. .. seealso:: For log retrieval, retention and the complete ``cat-log`` syntax, see :doc:`Log operations `. Inspect the experiment ====================== Once an experiment exists on disk, two commands help you understand what it contains. ``autosubmit describe `` displays information about the experiment: its owner, location on disk, creation time, project model and branch, HPC platform, and description. .. runcmd:: autosubmit describe a000 ``autosubmit report `` extracts the experiment variables. It has two modes that can be used together: * ``-all`` writes every available parameter to ``_parameter_list_.txt``. * ``-t