.. _install-mfix-osx: MFiX Installation on Mac ------------------------ As of this release, MFiX has been tested on the latest version of MacOS at the time of this release, 10.14 (Mojave). Earlier of MacOS are likely to work. If you have an issue running MFiX on your Mac, ask for help at :ref:`support-forum`. Install Anaconda """""""""""""""" **Download** the Python 3, Mac version of `Anaconda `__ (~500 MB download) or `Miniconda `__ (~50 MB download). Either the Graphical Installer or Command Line Installer would work. For instance, with the Anaconda Graphical Installer: #. Open up Finder and navigate to the Download directory. #. Double-click the downloaded file. (At the time of this writing, ``Anaconda3-2020.11-MacOSX-x86_64.pkg`` for Graphical Installer). #. Follow the installation guide, using the default settings. Install MFiX """""""""""" After installing Anaconda, install MFiX: #. Open a Terminal (Type "⌘-Spacebar", type "terminal") #. Browse to `MFiX Download `__ (requires registration and login) #. Copy the conda command #. Paste it in the Terminal. .. note:: If you already installed MFiX, you may see the following message. Select ``y`` to confirm. .. code-block:: batch 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. .. _install-build-dependencies-osx: Install Solver Build Dependencies """""""""""""""""""""""""""""""""""""""""""" Build dependencies are needed for building a :ref:`Custom Solver `. Building the MFiX solver requires: - Fortran 2003 compiler (GFortran 4.8 or later) - CMake - For DMP support, an MPI implementation (such as OpenMPI) For building with other compilers, or for building with DMP, see :ref:`build-custom`. Homebrew is the recommended way to install MFiX build dependencies. Go to `the Homebrew website `__ and follow the installation instructions. Once Homebrew is installed, install the build dependencies: #. Open a Terminal (Type "⌘-Spacebar", type "terminal") #. Run ``brew install gcc cmake open-mpi`` .. _create-environment-osx: Run MFiX """""""" Open Terminal (if not open already), and run the following commands: #. Run |conda_act_inline| #. Run ``mfix⏎`` .. note:: If you are using a shell different from bash, switch to ``bash`` before running ``conda activate`` Your prompt should look something like this: .. code-block:: bash :substitutions: > conda env list # conda environments: # base * /Users/user/anaconda3 mfix-|version| /Users/user/anaconda3/envs/mfix-|version| > conda activate mfix-|version| (mfix-|version|) > conda env list # conda environments: # base /Users/user/anaconda3 mfix-|version| * /Users/user/anaconda3/envs/mfix-|version| (mfix-|version|) > mfix You are now ready to proceed to the :ref:`user-guide` and :ref:`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. Deactivate Conda Environment """""""""""""""""""""""""""" After using MFiX you can just ``exit`` to leave the Terminal session. However, if you need to deactivate the |conda_env_inline| conda environment, you can do so with: .. code-block:: bash :substitutions: (mfix-|version|)> deactivate > This returns to the base conda environment. Uninstall MFiX """""""""""""" To uninstall MFiX from a conda environment: .. code-block:: bash :substitutions: (mfix-|version|)> conda uninstall mfix To remove the conda environment (if you have the environment activated, deactivate it first): .. code-block:: bash :substitutions: (mfix-|version|)> conda deactivate > conda env remove -n mfix-|version| To uninstall Anaconda entirely, remove the Anaconda directory. By default, ``~/anaconda3`` in your home directory. From the Terminal: .. code-block:: bash > cd ~ > rm -rf anaconda3/ .. note:: To learn more about managing conda environments, visit the `conda documentation `__ .