In the above snippet, ``[options]`` indicates one or more options for the
customization of the build, as described later in this section.
If the option ``CMAKE_BUILD_TYPE`` is omitted,
``CMAKE_BUILD_TYPE=Release`` is assumed.
There are two modes to build MFiX-Exa with cmake:
o **SUPERBUILD (recommended):** AMReX is downloaded and built as part
of the MFiX-Exa build process. This method is strongly encouraged as it
ensures configure options for MFiX-Exa and AMReX are consistent.
ensures that the configuration options for MFiX-Exa and AMReX are consistent.
o **Using an existing AMReX Library:** MFiX-Exa is linked to an existing
o **STANDALONE:** MFiX-Exa source code is built separately and linked to an existing
AMReX installation. This is ideal for continuous integration severs (CI)
and regression testing applications. AMReX library version must meet
MFiX-Exa requirements.
and regression testing applications. AMReX library version and configuration options
must meet MFiX-Exa requirements.
.. note::
**MFiX-Exa requires CMake 3.14 or higher.**
SUPERBUILD Instructions (recommended)
-------------------------------------
When building in **SUPERBUILD** mode, MFiX-Exa build system will take
care of downloading, configuring and installing AMReX as part of the
MFiX-Exa build. The following commands build MFiX-Exa and AMReX in a
single step.
By default MFiX-Exa CMake looks for an existing AMReX installation on the system. If none is found, it falls back to **SUPERBUILD** mode.
In this mode, MFiX-Exa CMake inherents AMReX CMake targets and configuration options, that is, MFiX-Exa and AMReX are configured and built as a single entity
Assuming no valid AMReX installation is present on the target system, and ``AMReX_ROOT`` is not set (see :ref:`sec:build:standalone`), the following code will build MFiX-Exa in **SUPERBUILD** mode:
AMReX is built the first time the ``make`` command is issued. No
external installation of AMReX is needed. However, internet access to
the AMReX github repository is required. The optional string
``CONFIG_OPTIONS`` allows to customize the build of both AMReX and
MFiX-Exa. ``CONFIG_OPTIONS`` is a list of one or more configuration
options given in the form **-D**\ *OPTION=VALUE*\ \`.
``[amrex options]`` in the snippet above 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>`_
The table below lists configuration options, possible values, and their
effect on the build. Options prefixed by ``AMREX_`` are specific to the
Here,\ ``AMREX_CONFIG_OPTIONS`` are optional configure options for AMReX. Please
refer to the AMReX user guide for a list of all the possible configuration
options. The only options required are **-DENABLE\_PARTICLES=1**,
**-DENABLE\_AMRDATA=1**, **-DENABLE\_EB=1**, and **-DENABLE_3D_NODAL_MLMG=1**.
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.