|
Multi Resolution Molecular Dynamics 0.4.0
Multi Resolution Molecular Dynamics
|
This page covers building MRMD, the options you are likely to need, and running your first simulation.
The repository README.md carries the same instructions in a shorter form.
MRMD needs only a compiler and CMake; every other mandatory dependency is fetched and built automatically during configuration.
Fetched automatically, at the pinned versions:
| Dependency | Purpose |
|---|---|
| Kokkos | performance portability, backend selection |
| Cabana | AoSoA particle containers and neighbor lists |
| CLI11 | command line parsing in the examples |
| yaml-cpp | configuration files |
| googletest | unit tests |
Found on the system rather than fetched, and therefore optional:
Then run the first example:
Every example accepts --help and takes its parameters from the command line, so you can shorten a run with --nsteps 10 while trying things out.
MRMD specific options:
| Option | Default | Description |
|---|---|---|
| MRMD_BUILD_DOCS | OFF | Build this documentation (target docs) |
| MRMD_ENABLE_COVERAGE | OFF | Enable code coverage (clang only) |
| MRMD_ENABLE_HDF5 | OFF | Enable HDF5 / H5MD support |
| MRMD_ENABLE_TESTING | ON | Build tests and register them with ctest |
| MRMD_USE_SHARED_SPACE | OFF | Use Kokkos shared space |
| MRMD_VERBOSE_ASSERTS | OFF | Verbose asserts (CPU only) |
| MRMD_WERROR | OFF | Treat compiler warnings as errors |
| MRMD_VECTOR_LENGTH | 1 | Vector length of the AoSoA particle containers |
In addition to the standard CMake build types, MRMD defines DebugOptimized, which combines the debug flags with -O3. It is useful together with MRMD_VERBOSE_ASSERTS and the Kokkos debug options when a simulation misbehaves but a plain Debug build is too slow to reach the problem.
The target architecture and the execution backend are selected through Kokkos, not through MRMD. Enable one or more backends with Kokkos_ENABLE_* and name the architecture with Kokkos_ARCH_*.
For a CPU build using all cores of the build machine:
For an Nvidia GPU:
Each example prints the execution space it was compiled for on startup, which is the quickest way to confirm the backend you intended is the one in use.
The examples are part of the test suite: each is registered as Example.<name> and executed with a small step count, so a passing ctest run also means every tutorial on this site still compiles and runs.
Downstream CMake projects locate it with find_package and link the mrmd::mrmd target:
Point CMake at the install location with -DCMAKE_PREFIX_PATH=/path/to/install when configuring the downstream project.
The HTML output is written to mrmd-build/docs/html/index.html. The published copy lives at https://xzzx.github.io/mrmd/.
Work through the Tutorials in order. They start from a minimal ideal gas and build up to a full multi-resolution production workflow, and each one is a complete, runnable program.