Building from source
This page is for licensees who have the source distribution. If you installed a binary package, Get started is the page you want.
Platform policy
Section titled “Platform policy”Linux with Intel oneAPI is the supported platform, and the only one whose results we stand behind.
- Linux — the release platform and the only one we validate scientific
results on. Intel oneAPI:
ifx/icx, oneMKL, Intel MPI. - Windows — use WSL and follow the Linux route. A native Windows preset exists as a development convenience and is not a supported configuration; not all of its I/O paths are verified.
- macOS — development only and CPU only. Useful for editing, examples and smoke checks. Do not use Intel compilers with oneMKL on macOS.
Toolchains
Section titled “Toolchains”| Platform | Compiler | Math backend | FFT backend | MPI |
|---|---|---|---|---|
| Linux | Intel ifx / icx / icpx | oneMKL | MKL FFT | Intel MPI or a compatible MPI |
| Windows (development) | Intel ifx / icx | oneMKL | MKL FFT | Intel MPI |
| macOS (development) | Homebrew gfortran with AppleClang for C/C++ | OpenBLAS | user-installed FFTW | Homebrew OpenMPI |
Configure and build
Section titled “Configure and build”One configure step from the repository root builds everything: the licence component, the library, and the SDK examples.
source /opt/intel/oneapi/setvars.sh
cmake --fresh --preset linux-intel-debugcmake --build --preset linux-intel-debugctest --preset linux-intel-debug --output-on-failurecmake --install out/build/linux-intel-debugcmake --build --preset linux-intel-debug --target packagebrew install cmake ninja gcc openblas fftw open-mpi
cmake --fresh --preset macos-arm64-debugcmake --build --preset macos-arm64-debugctest --preset macos-arm64-debug --output-on-failurecmake --install out/build/macos-arm64-debugRelease presets (linux-intel-release, macos-arm64-release) take the same
four commands.
Build options
Section titled “Build options”| Option | Default | Effect |
|---|---|---|
MUPRO_BUILD_TDGL | ON | Build the ferroelectric TDGL solver. |
MUPRO_BUILD_MAGNETIC | ON | Build the magnetic and micromagnetic solvers. |
MUPRO_ENABLE_HDF5 | OFF | Write fields as HDF5 in addition to the native format. Needs an HDF5 build first, and adds six test cases. |
To compile-check one solver without building the rest, configure into a separate directory and build just the library target:
cmake --fresh --preset linux-intel-debug -B out/build/linux-intel-debug-tdgl \ -DMUPRO_BUILD_TDGL=ONcmake --build out/build/linux-intel-debug-tdgl --target muproBuilding an example against an installed SDK
Section titled “Building an example against an installed SDK”examples/demo1 is a downstream project: it finds the SDK with
find_package(mupro) rather than being part of the build. After installing:
cmake -S examples/demo1 -B examples/demo1/build -G Ninja \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_PREFIX_PATH="$PWD/out/install/linux-intel-debug"
cmake --build examples/demo1/buildThe example enables C, C++ and Fortran, because the SDK exports MPI C dependencies and the static library contains C++ object code.
The C ABI example builds the same way:
cmake -S examples/c_api_tdgl -B examples/c_api_tdgl/build -G Ninja \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_PREFIX_PATH="$PWD/out/install/linux-intel-debug"
cmake --build examples/c_api_tdgl/build./examples/c_api_tdgl/build/c_api_tdglIt prints a structured MUPRO_STATUS_NOT_SETUP message: the C ABI is a
skeleton, and the TDGL solve backend is not connected to it yet. That message is
the expected output, not a failure.
ctest --preset linux-intel-debug --output-on-failureThe default configuration registers 127 test cases, and a Linux debug build
passes all of them. Enabling MUPRO_ENABLE_HDF5 adds six more.
A test counts as passing only if it exits zero and prints its own completion marker. A program that stops early, traps a floating-point exception, or fails an I/O operation therefore fails the test even when its exit status looks clean.
