.. _`chapter:installation`: .. toctree:: PATO & PATO-dev Installation on Linux (Ubuntu 24.04) ==================================================== This tutorial explains how to install **PATO** and **PATO-dev** on Ubuntu 24.04. .. note:: For **PATO-dev** installation, you must first request access by following the instructions on the PATO-dev section at http://pato.ac/. Prerequisites ------------- * A GitLab account * Miniconda (installer available online) Step 1. Install Miniconda ------------------------- 1. Download the Miniconda installer (``.sh`` file). 2. Right-click on the installer and open it in a terminal. 3. Run the installer: .. code-block:: bash bash Miniconda3-latest-Linux-x86_64.sh 4. Accept all defaults (answer ``yes`` to prompts). Step 2. Configure SSH Access to GitLab -------------------------------------- 1. Generate an SSH key: .. code-block:: bash ssh-keygen Press ``Enter`` at all prompts. 2. Navigate to your SSH folder: ``~/.ssh`` (use ``Ctrl+H`` in your file explorer to view hidden files). 3. Open ``id_ed25519.pub`` or ``id_rsa.pub`` (depending on your key type) and copy its contents (without the machine name at the end). 4. In GitLab: - Click on your profile picture → *Preferences* → *SSH Keys*. - Add a new SSH key and **do not** set an expiration date. 5. In ``~/.ssh`` create a file named ``config`` and add the following: .. code-block:: text Host gitlab.com HostName gitlab.com PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa Replace ``id_rsa`` with the name of your key file if different. 6. Test the connection: .. code-block:: bash ssh -T git@gitlab.com Step 3. Configure Conda Channels -------------------------------- .. code-block:: bash conda config --add channels conda-forge conda config --add channels pato.devel conda config --set channel_priority strict Step 4. Install PATO and PATO-dev --------------------------------- * To install **PATO**: .. code-block:: bash conda create -y --name pato -c conda-forge -c pato.devel pato * To install **PATO-dev**: .. code-block:: bash conda create -y --name pato-dev -c conda-forge -c pato.devel pato=dev Step 5. Compile PATO-dev ------------------------ 1. Edit the compiler configuration: .. code-block:: text ~/miniconda3/envs/pato-dev/src/volume_openfoam_for_pato/OpenFOAM/OpenFOAM-7/wmake/rules/linux64Gcc On line 9, change ``c++11`` to ``c++17``. 2. Navigate to the PATO-dev source: .. code-block:: bash cd ~/miniconda3/envs/pato-dev/src/volume_pato/PATO-dev 3. Compile PATO-dev: .. code-block:: bash conda activate pato-dev ./Allwclean ./Allwmake .. note:: Compilation may take some time. Step 6. Test the Installation ----------------------------- * Run a tutorial case to verify PATO or PATO-dev. * Install ParaView (for visualization): .. code-block:: bash sudo apt-get install paraview * After running the tutorial, open the generated ``case.foam`` file in ParaView: .. code-block:: bash paraview Then load the ``case.foam`` file.