Autosubmit tricks ----------------- Preview your scripts ~~~~~~~~~~~~~~~~~~~~~ ``autosubmit inspect $expid`` With this command, Autosubmit will generate the ``.cmd`` files that will be submitted when you perform ``autosubmit run $expid``. You can check them in ``$expid/tmp``. `+ info `__ See the defined variables ~~~~~~~~~~~~~~~~~~~~~~~~~~ ``autosubmit report $expid -all`` With this command Autosubmit will generate a list of all the variables loaded. You can check this list in ``$expid/tmp`` `+ info `__ Check the graph/status of your experiment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``autosubmit monitor $expid`` This command will open a ``pdf`` file with the current status of the workflow. You will be able to visually check which processes are running, completed, waiting… `+ info `__ Run your long workflow ~~~~~~~~~~~~~~~~~~~~~~~ If you are planning to launch a long workflow, you can launch it with the ``nohup`` option. .. code-block:: bash nohup autosubmit run $expid In this way, you can safely close your terminal and Autosubmit will continue managing your jobs. If you want to check the regular output, check ``$expid/tmp/ASLOGS/$date_$command``. If you want to stop Autosubmit, .. code-block:: bash ps ax | grep autosubmit will show you the running jobs. Look for yours and kill it: .. code-block:: bash kill $jobid .. note:: Notice that this won’t stop the jobs that are already running in the HPC. In order to kill them, in the HPC, look for your job and cancel it. `+ info `__ Resubmit your ``FAILED`` jobs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: bash autosubmit setstatus EXPID -fs FAILED -t WAITING -s Skip chunks that you already run ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It might happen that you want to restart from a previous run. You are probably willing to skip some of the chunks. In order to do so, you can take advantage of ``autosubmit setstatus`` command. An example, in order to begin from chunk 8, would be: .. code-block:: bash autosubmit setstatus $expid -fl "a03s_19500101_fc0_INI a03s_19500101_fc0_1_SIM a03s_19500101_fc0_2_SIM a03s_19500101_fc0_3_SIM a03s_19500101_fc0_4_SIM a03s_19500101_fc0_5_SIM a03s_19500101_fc0_6_SIM a03s_19500101_fc0_7_SIM" -t COMPLETED -s Autosubmit must be stopped in order to do this. `+ info `__. Synchronize your HPC experiment directory with the one in the VM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is useful, for example, after a workflow update. - Run ``autosubmit refresh`` or ``git pull`` inside the ``proj/git_project`` directory. - Make sure that your experiment is stopped. - Run the following commands .. code-block:: bash # Will make the SYNC step to ready to run autosubmit setstatus $EXPID -fl "$EXPID_SYNCHRONIZE" -t READY -s # Change a0cp_19900101_fc0_1_SIM for the next chunk that you want to run. AS won't run this chunk. autosubmit setstatus $EXPID -fl "a0cp_19900101_fc0_1_SIM" -t SUSPENDED -s # Run the experiment (it will just run the SYNC step) autosubmit run $EXPID # Set the suspended job to ready to run. autosubmit setstatus $EXPID -fs SUSPENDED -t READY -s # Continue your experiment autosubmit run $EXPID Add applicaitons that are run in an already existing workflow ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In order to add applications to the workflow, it is not enough to add another element to the APP.NAMES key in main. Here the steps to follow: - Edit ``conf/main.yml`` with the applications that you want to add. - Source the githook to modify the workflow structure. ``cd proj/git_project/`` & ``source .githooks/post-checkout`` After this you will see a message saying: ``App jobs created successfully``. After this you can double check that it is what you want by using the GUI or monitoring the exmperiment. After you see what you expected, you are free to create and run the experiment as usual.