The options **ENABLE\_PARTICLES=yes**, **ENABLE\_AMRDATA=yes**, and **ENABLE\_EB=yes** are required by MFiX-Exa. ``[other amrex options]`` in the snippet above refers to any other AMReX configuration option in addition to the required ones. Please refer to the `AMReX user guide <https://amrex-codes.github.io/amrex/docs_html/BuildingAMReX.html#building-with-cmake>`_ for more details on building AMReX with CMake.
The ``my-amrex-branch`` will then be used when building MFiX-Exa.
To revert to the default version of the AMReX submodule, run ``git submodule
update``:
Building MFiX-Exa
~~~~~~~~~~~~~~~~~
.. code:: shell
Clone and build MFiX-Exa:
> git submodule update
> git status
...
nothing to commit, working tree clean
You can edit, commit, pull, and push AMReX changes from ``subprojects/amrex``.
AMReX development is outside the scope of this document. Run ``git status`` in
the top-level MFix-Exa repo to see whether the AMReX submodule has new commits,
modified files, or untracked files.
To update the AMReX submodule reference by MFiX-Exa:
If no AMReX installation is found on the system, or if one is found but does not meet MFiX-Exa requirements, MFiX-Exa CMake falls back to **SUPERBUILD** mode.
When building in **SUPERBUILD** mode, the AMReX git repo is checked out via a git submodule before AMReX CMake build system is included into MFiX-Exa CMake infrastructure. Consequently, MFiX-Exa CMake inherents AMReX's CMake targets and configuration options, that is, MFiX-Exa and AMReX are configured and built as a single entity.
The default system default compilers can be overwritten as follows:
.. code:: shell
Assuming no valid AMReX installation is present on the target system, and ``AMReX_ROOT`` is not set in the environment, the following code will build MFiX-Exa in **SUPERBUILD** mode:
If ``ENABLE_MPI`` is set (the default), then ``CMAKE_CXX_COMPILER`` should
be a compiler wrapper such as ``mpic++``, or there will likely be build
errors. Likewise, ``CMAKE_Fortran_COMPILER`` should be set to ``mpifort``
(or whatever is your MPI Fortran wrapper).
``[amrex options]`` is a list of any of the AMReX configuration options listed in the `AMReX user guide <https://amrex-codes.github.io/amrex/docs_html/BuildingAMReX.html#building-with-cmake>`_
Specifying external AMReX
~~~~~~~~~~~~~~~~~~~~~~~~~
Few more notes on building MFiX-Exa
-----------------------------------
If building with :ref:`external_amrex`, specify the path to AMReX with
``-DAMREX_ROOT``:
The system defaults compilers can be overwritten as follows: