Fork 0
mirror of https://github.com/cosmo-sims/MUSIC.git synced 2024-07-24 01:12:37 +02:00
Multi-scale initial conditions for cosmological simulations
Go to file
2024-07-11 10:38:30 +02:00
.github/workflows Update cmake-multi-platform.yml 2024-04-20 15:34:22 +02:00
data Updated example config file, added EAGLE powerspectrum and Auriga 6 config file 2024-04-20 21:14:27 +02:00
ext used tagged class branch 2023-10-06 17:20:52 +02:00
src re-fixed 32bit integer overflow in panphasia plugin (original fix by F.Glatter) 2024-03-12 22:28:42 +01:00
tools WIP commit, transition to monofonic logger and config_file 2023-02-14 10:34:58 -08:00
.gitignore removed old gnu makefile, added cmake_config.hh to gitignore 2023-02-14 19:58:57 -08:00
CITATION.bib Create CITATION.bib 2024-07-09 21:45:19 +02:00
CMakeLists.txt fixed linking problems on recent MacOS versions 2024-02-21 09:50:52 +01:00
FindFFTW3.cmake WIP refactoring. Got rid of FFTW2, some of the old single/double precision templating,... 2023-02-14 17:12:19 -08:00
FindTIRPC.cmake updated RPC/XDR routines to compile against TIRPC library since RPC is missing from modern glibc 2021-11-30 22:47:40 +01:00
ics_example.conf updated example config file to new names of cosmological parameters 2024-04-21 21:26:55 +02:00
LICENSE Update LICENSE 2024-04-20 15:48:13 +02:00
README.md Update README.md 2024-07-11 10:38:30 +02:00
version.cmake added rudimentary CMake support 2020-02-13 14:06:30 +01:00

CMake on multiple platforms

MUSIC v2 - multi-scale cosmological initial conditions

MUSIC is a computer program to generate nested grid initial conditions for high-resolution "zoom" cosmological simulations. A detailed description of some of the algorithms can be found in Hahn & Abel (2011), but version 2.0 is much improved and has a much lower memory footprint.

Be aware that v1 and v2 do not produce entirely consistent zooms, due to the changes in the way the noise hierarchy is composed. So do not upgrade if you need to exactly reproduce a zoom run generated with v1, there is currently no backwards compatibility mode.

To learn how to use MUSIC, please read the Wiki.

Current MUSIC key features include:

  • Supports output for RAMSES, ENZO, Arepo, Swift, Gadget-2/3, ART, Pkdgrav/Gasoline and NyX via plugins. New codes can be added.
  • Support for first (1LPT) and second order (2LPT) Lagrangian perturbation theory.
  • Full integration of the PANPHASIA hierarchical Gaussian random fields
  • Pluggable transfer functions, currently CAMB, Eisenstein&Hu, BBKS, Warm Dark Matter variants. Distinct baryon+CDM fields.
  • Minimum bounding ellipsoid and convex hull shaped high-res regions supported with most codes, supports refinement mask generation for RAMSES.
  • Parallelized with OpenMP
  • Requires FFTW3, GSL (and HDF5 for output for some codes)

Building MUSIC

While we still supply the old Makefile, using CMake is now the preferred way of building. CMake use out-of-source build, i.e. you create a build directory, and then configure the code using CMake. Inside the music directory, do

  mkdir build
  cd build
  ccmake ..
  make -j

to configure the code (you will se a menu), and then start a parallel compilation. If CMake has trouble finding your FFTW or HDF5 installation, you can add hints as follows

  FFTW3_ROOT=<path> HDF5_ROOT=<path> ccmake ..

If you want to build on macOS, then it is strongly recommended to use GNU (or Intel) compilers instead of Apple's Clang. Install them e.g. via homebrew and then configure cmake to use them instead of the macOS default compiler via

  CC=gcc-13 CXX=g++-13 ccmake ..

This is necessary since Apple's compilers haven't supported OpenMP for years.


There is an example parameter file 'example.conf' in the main directory. Possible options are explained in it, it can be run as a simple argument, e.g. from within the build directory:

  ./MUSIC ../ics_example.conf


This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. By downloading and using MUSIC, you agree to the LICENSE, distributed with the source code in a text file of the same name.