2.3. Linux Installation

MFiX has been developed and tested on the following linux distributions:

  • Ubuntu 18.10

  • CentOS 7

Other recent releases of Linux are likely to work. If you have an issue running MFiX works your distro, ask for help at Support Forum.

2.3.1. Install Anaconda

Download the 64-bit, Python 3, Linux version of Anaconda (~500 MB download) or Miniconda (~50 MB download).

For instance, with the Anaconda installer:

  1. Open a terminal

  2. cd to the directory of the downloaded installer (for example ~/Downloads)

  3. Run the downloaded installer (At the time of this writing, sh Anaconda3-2021.05-Linux-x86_64.sh⏎.

  4. You will be asked to review the License, hit enter

  5. Hit the space bar until you get to the end of the license agreement.

  6. Agree to the license by typing yes and hitting enter

  7. When prompted for an installation location, hit enter to use the default.

  8. When prompted to add the conda bin directory to PATH, enter yes and hit enter.

Anaconda is now installed. In order for the changes to take effect, close the terminal and open a new one. Verify that your PATH was updated by running conda in the new terminal.

2.3.2. Install MFiX

After installing Anaconda, install MFiX with the following steps:

  1. Open the Terminal application for your Linux desktop

  2. Browse to MFiX Download (requires registration and login)

  3. Copy the conda command.

  4. Paste it in the Terminal.

Note

If you already installed MFiX, you may see the following message. Select y to confirm.

WARNING: A conda environment already exists
Remove existing environment (y/[n])? y

MFiX will be installed in a new conda environment. The process will take a few minutes to complete.

2.3.3. Install Solver Build Dependencies (optional)

Build dependencies are needed for building a custom interactive solver. If you only use the default solver, you can skip this step.

Building the MFiX solver requires:

  • Fortran 2003 compiler (GFortran 4.8 or later)

  • GNU Make

  • CMake

  • For DMP support, an MPI implementation (such as OpenMPI)

For building with other compilers, or for building with DMP, see Building Custom Interactive Solver.

Installing GCC and Make through your system package manager (such as apt or yum) is recommended.

2.3.4. Install DMP/MPI Solver Build Dependencies

To build and run MFiX with DMP, you will need an MPI implementation installed, such as OpenMPI.

To install OpenMPI on Ubuntu/Debian derived distributions:

$ sudo apt install openmpi-bin libopenmpi-dev

To install OpenMPI on Fedora/RHEL/Centos derived distributions:

$ sudo yum install openmpi-devel
$ module load mpi

2.3.5. Run MFiX in Conda Environment

To run MFiX:

  1. Open a terminal

  2. Run conda activate mfix-22.1

  3. Run mfix⏎ to start MFiX

Your prompt should look something like this:

> conda env create -n mfix-22.1 mfix/mfix-22.1-linux64

> conda env list
# conda environments:
#
base        *  /home/user/anaconda3
mfix-22.1      /home/user/anaconda3/envs/mfix-22.1

> conda activate mfix-22.1
(mfix-22.1) > conda env list
# conda environments:
#
base           /home/user/anaconda3
mfix-22.1   *  /home/user/anaconda3/envs/mfix-22.1

(mfix-22.1) > mfix

You are now ready to proceed to the First Tutorial and Tutorials.

Note

Activating a conda environment sets certain environment variables such as PATH in the current shell. It does not create a new shell session.

You will need to activate the environment every time before running MFiX.

2.3.6. Deactivate Conda Environment

After using MFiX you can just exit to leave the terminal session. However, if you need to deactivate the mfix-22.1 conda environment, you can do so with:

(mfix-22.1)> deactivate
>

This returns to the base conda environment.

2.3.7. Uninstall MFiX

To uninstall MFiX from a conda environment:

(mfix-22.1)> conda uninstall mfix

To remove the conda environment (if you have the environment activated, deactivate it first):

(mfix-22.1)> conda deactivate
> conda env remove -n mfix-22.1

To uninstall Anaconda entirely, remove the Anaconda directory. By default, ~/anaconda3 in your home directory. From the terminal:

> cd ~
> rm -rf anaconda3/

Note

To learn more about managing conda environments, visit the conda documentation .