Plus
More versatile and extensible GPU-accelerated micromagnetic simulator
Install / Use
/learn @mumax/PlusREADME
mumax⁺
A versatile and extensible GPU-accelerated micromagnetic simulator written in C++ and CUDA with a Python interface. This project is in development alongside mumax³. If you have any questions, feel free to use the mumax⁺ GitHub Discussions.
Documentation, tutorials and examples can be found on the mumax⁺ website.
Paper
mumax⁺ is described in the following paper:
mumax+: extensible GPU-accelerated micromagnetics and beyond
https://www.nature.com/articles/s41524-025-01893-y
Please cite this paper if you would like to cite mumax⁺. All demonstrations in the paper were simulated using version v1.1.0 of the code. The scripts used to generate the data can be found in the paper2025 directory under the paper2025 tag.
Installation
Dependencies
mumax⁺ should work on any NVIDIA GPU. To get started you should install the following tools yourself. Take care to avoid version conflicts between these different types of software and your hardware: click the arrows for more details.
<details><summary>CUDA Toolkit</summary>To see which CUDA Toolkit works for your GPU's Compute Capability, check this Stack Overflow post.
- Windows: Download an installer from the CUDA website.
- Linux: Use
sudo apt-get install nvidia-cuda-toolkit, or download an installer.
⚠️ Make especially sure that everything CUDA-related (like
nvcc) can be found inside your PATH. On Linux, for instance, this can be done by editing your~/.bashrcfile and adding the following lines:# add CUDA export PATH="/usr/local/cuda/bin:$PATH" export LD_LIBRARY_PATH="/usr/local/cuda/> lib64:$LD_LIBRARY_PATH"The paths may differ if the CUDA Toolkit was installed in a different location.
👉 Check CUDA installation with: nvcc --version
- Linux:
sudo apt-get install gcc- ⚠️ Each CUDA version has a maximum supported
gccversion, as listed in this StackOverflow answer. If necessary, usesudo apt-get install gcc-<min_version>instead, with the appropriate<min_version>.
- ⚠️ Each CUDA version has a maximum supported
- Windows: Microsoft Visual C++ (MSVC) must be used, since CUDA does not support
gccon Windows.- ⚠️ Make sure you install a version of MSVC that is compatible with your installed CUDA toolkit, as listed in this table (e.g., MSVC 2026 does not yet seem to be supported by CUDA as of January 2026).
- During installation, check the box to include the "Desktop development with C++" workload.
- After installing, check if the path to
cl.exewas added to yourPATHenvironment variable (i.e., check whetherwhere cl.exereturns an appropriate path likeC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64). If not, add it manually.
👉 Check C installation with: gcc --version on Linux and where.exe cl.exe on Windows.
- Windows: Download and install.
- Linux:
sudo apt install git
👉 Check Git installation with: git --version
All these Python-related tools should be included in a standard installation of Anaconda or Miniconda.
👉 Check installation with python --version, pip --version and conda --version.
Building mumax⁺
First, clone the mumax⁺ Git repository. The --recursive flag is used in the following command to get the pybind11 submodule, which is needed to build mumax⁺.
git clone --recursive https://github.com/mumax/plus.git mumaxplus
cd mumaxplus
We recommend to install mumax⁺ in a clean conda environment as follows. You could also skip this step and use your own conda environment instead if preferred.
<details><summary>Click to show tools automatically installed in the conda environment</summary>- cmake 4.0.0
- Python 3.13
- pybind11 v2.13.6
- NumPy
- matplotlib
- SciPy
- Sphinx
conda env create -f environment.yml
conda activate mumaxplus
Finally, build and install mumax⁺ using pip.
pip install .
[!TIP] If changes are made to the code, then
pip install -v .can be used to rebuild mumax⁺, with the-vflag enabling verbose debug information.If you want to change only the Python code, without needing to reinstall after each change,
pip install -ve .can also be used.
Check the compilation
To check if you successfully compiled mumax⁺, we recommend you to run some examples from the examples/ directory
or to run the tests in the test/ directory.
-
(Windows) If you encounter the error
No CUDA toolset found, try copying the files inNVIDIA GPU Computing Toolkit/CUDA/<version>/extras/visual_studio_integration/MSBuildExtensionstoMicrosoft Visual Studio/<year>/<edition>/MSBuild/Microsoft/VC/<version>/BuildCustomizations. See these instructions for more details. -
(Windows) If you encounter errors related to interactions between CMake, MSVC and CUDA, like
-- Detecting CUDA compiler ABI info - failed, you may try the following methods to activate an appropriate set of environment variables. One option is to run the compilation commands in the "Developer Powershell for VS 20XX" that should have been automatically installed alongside MSVC. For CUDA ≤12.9, another option is to call one of the.batscripts in the folder& C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build, such asvcvars64.bat, before you runpip install.
Floating-point precision
mumax⁺ can use either single or double floating-point precision.
This can be controlled by the command-line argument --mumaxplus-fp-precision and/or the environment variable MUMAXPLUS_FP_PRECISION.
See this tutorial page or example notebook for more details.
Documentation
Documentation for mumax⁺ can be found at http://mumax.github.io/plus.
It follows the NumPy style guide and is generated using Sphinx. You can build it yourself by running the following command in the docs/ directory:
make html
The documentation can then be found at docs/_build/html/index.html.
Examples
Lots of example codes are located in the examples/ directory. They are either simple Python scripts, which can be executed inside said directory like any Python script
python standardproblem4.py
or they are interactive notebooks (.ipynb files), which can be run using Jupyter.
Testing
Several automated tests are located inside the test/ directory. Type pytest inside the terminal to run them. Some are marked as slow, such as test_mumax3_standardproblem5.py. You can deselect those by running pytest -m "not slow". Tests inside the test/mumax3/ directory require external installation of mumax³. They are marked by mumax3 and can be deselected in the same way.
Contributing
Contributions are gratefully accepted. To contribute code, fork our repo on GitHub and send a pull request.
Related Skills
node-connect
351.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
110.9kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
110.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
351.8kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
