:orphan: .. _install: .. jinja:: first_ctx ############ Installation ############ There are two ways of using {{ app_name }}: * The {{ app_name }} command-line interface (CLI) * The {{ app_name }} Python package Both of these options allow workflows to be designed and executed. The {{ app_name }} CLI is recommended for beginners and strongly recommended if you want to run {{ app_name }} on a cluster. The Python package allows workflows to be designed and explored via the Python API and is recommended for users comfortable working with Python. If you are interested in contributing to the development of {{ app_name }}, the Python package is the place to start. The CLI and the Python package can be used simultaneously. Using pip ********* The recommended way to install MatFlow is to use pip to install the Python package from PyPI:: pip install {{ dist_name }} This installs the python package, which also gives the CLI version of MatFlow. Release notes ============== Release notes for this version ({{app_version}}) are `available on GitHub `_. Use the version switcher in the top-right corner of the page to download/install other versions. Alternative installation methods ******************************** Although *not currently recommended*, advanced users may wish to use one of the :ref:`alternative installation methods `. Configuration ************* MatFlow uses a config file to control details of how it executes workflows. A :ref:`default config file ` will be created the first time you submit a workflow. This will work without modification on a personal machine, however if you are using MatFlow on HPC you will likely need to make some modifications to describe the job scheduler, settings for multiple cores, and to point to your MatFlow environments file. `Some examples `_ are given for the University of Manchester's CSF. If there is a suitable config file for your HPC system, you can pull the relevant file using the following syntax (example shown for Manchester's CSF3):: matflow config import github://hpcflow:matflow-configs@main/manchester-CSF3.yaml After pulling a config file using the above command, you still need to edit it to set the path to your :ref:`MatFlow environments` file. The path to your config file can be found using ``matflow manage get-config-path``, or to open the config file directly, use ``matflow open config``. .. _matflow-environments: Environments ************ Matflow has the concept of environments, similar to python virtual environments. These are required so that tasks can run using the specific software they require. Your MatFlow environments must be defined in your environments (YAML) file before MatFlow can run workflows, and this environment file must be pointed to in the config file via the ``environment_sources`` key. Once this has been done, your environment file can be be opened using ``matflow open env-source``. A template environments file is given below. It is recommended to use this as a starting point, making modifications for your own computer/HPC system, in particular the ``setup`` sections for each environment. Note that currently MatFlow works with DAMASK version ``3.0.0a7.post0`` but `not the latest versions `_. As such the MatFlow ``damask_parse`` environment should use ``pip install damask==3.0.0a7.post0``. Linux/macOS ============ .. literalinclude:: environments_template_linux.yaml :language: YAML Windows ======= .. literalinclude:: environments_template_windows.yaml :language: YAML Tips for SLURM ************** hpcFlow (which MatFlow uses) currently has a fault such that it doesn't select a SLURM partition based on the resources requested in your workflow file. As such, users must manually define this in their workflow files e.g. .. code-block:: yaml resources: any: scheduler_args: directives: --time: 00:30:00 --partition: serial Note also that for many SLURM schedulers, a time limit must also be specified as shown above. A `default time limit and partition `_ can be set in the config file, which will be used for tasks which don't have this set explicitly in a ``resources`` block like the example above.