The code used to run BlueTides simulation. The latest MP-Gadget is on https://github.com/rainwoodman/MP-Gadget
C Other
Switch branches/tags
Nothing to show
Clone or download
rainwoodman do not crash if power spectrum file could not be written.
It is not that an important file -- in very big runs.
Latest commit d2da21e Feb 19, 2017
Permalink
Failed to load latest commit information.
depends update bigfile. Nov 21, 2016
examples Replace the last HDF5 with bigfile. Nov 18, 2016
test Add simple test for powerspectrum routines Dec 19, 2016
.gitignore Do not ignore depends/Makefile Mar 6, 2016
.gitmodules Do not use pfft-python which doesn't include threads. May 16, 2016
.travis.yml Update travis. Nov 18, 2016
LICENSE GPLv3. Jul 27, 2016
MakePrimordialCoolingTable.c Write the cooling table. MakePrimordialCoolingTable is no longer used. Mar 14, 2014
Makefile Remove Makefile.defaults in favour of a default Options.mk for icc. Aug 14, 2016
Makefile.rules Use $(CURDIR) instead of $(PWD). CURDIR is guaranteed to be always se… Dec 19, 2016
Options.mk.BlueTides Remove SOFTEREQS - as implemented it is not really sensible. It belon… Nov 19, 2016
Options.mk.example Remove SOFTEREQS - as implemented it is not really sensible. It belon… Nov 19, 2016
Options.mk.example.coma Small cleanups Nov 28, 2016
Options.mk.example.icc Remove SOFTEREQS - as implemented it is not really sensible. It belon… Nov 19, 2016
Options.mk.travis Remove SOFTEREQS - as implemented it is not really sensible. It belon… Nov 19, 2016
README.rst Replace the last HDF5 with bigfile. Nov 18, 2016
accel.c Add flag to disable tree gravity Nov 19, 2016
allocate.c Evaluator -> TreeWalk Jul 27, 2016
allvars.c remove FdTimings. Aug 2, 2016
allvars.h Remove now useless parameter DomainReportSpeedfac. Dec 4, 2016
auxiliary_functions.c Remove the COOLING compile flag. Jul 25, 2016
begrun.c remove FdTimings. Aug 2, 2016
blackhole.c Fix some more gcc warnings Nov 19, 2016
bootstrap.sh Add bootstrap script. Jun 5, 2016
config-migrate.h Replace the last HDF5 with bigfile. Nov 18, 2016
cooling.c Print redshift range for ionisation table for debugging purposes Feb 9, 2017
cooling.h Compute the mean gas temperature. Jun 7, 2016
cosmology.c remove ptrdiff_t from cosmology.c Jul 25, 2016
cosmology.h Split out most of the cosmology parameter to Cosmology object. Jul 22, 2016
cppexample.cpp Add an cppexample file. Mar 9, 2016
density.c Small cleanups Nov 28, 2016
densitykernel.c Properly share petapm between GENIC and main code. Jun 15, 2016
densitykernel.h convert density kernel to Enum; May 5, 2016
domain.c Clean up some code in domain to do with printing memory balance. Dec 4, 2016
domain.h Clean up some code in domain to do with printing memory balance. Dec 4, 2016
driftfac.c Remove various uncalled functions, found by the callcatcher tool from Mar 5, 2016
endrun.c remove breakpoint and print timestamps. Aug 28, 2016
endrun.h Add a message() function for outputing message. Jul 22, 2016
fof.c Remove unused variables Nov 19, 2016
fof.h Remove -DFOF and replace it with a runtime config option: FOFOn Aug 7, 2016
fofpetaio.c add minid to output. Aug 16, 2016
forcetree.c Remove unused variables Aug 2, 2016
forcetree.h add a few comments about node type. Aug 2, 2016
gdbtools.c more useful GDB_xxx tool functions. Nov 26, 2014
genic-allvars.c remove nested source code. Jul 22, 2016
genic-allvars.h position uses double, others uses single. Aug 3, 2016
genic-main.c remove nested source code. Jul 22, 2016
genic-params.c do not dump parameter on all. Jul 23, 2016
genic-power.c remove nested source code. Jul 22, 2016
genic-proto.h remove nested source code. Jul 22, 2016
genic-save.c Call the header block 'Header' for compatibility with P-Gadget3 HDF5 … Aug 2, 2016
genic-zeldovich.c remove nested source code. Jul 22, 2016
global.c Fix some unused variable warnings Jul 22, 2016
gravpm.c Split power spectrum routines into separate file for testing Dec 19, 2016
gravtree.c Add flag to disable tree gravity Nov 19, 2016
hydra.c Add flag to disable hydro force Sep 1, 2016
init.c Remove now useless global variables All.Cadj_Cpu and All.Cadj_Cost Dec 3, 2016
interp.c Convert the INTERP_TEST code in interp.c to a unit test Nov 19, 2016
interp.h Remove various uncalled functions, found by the callcatcher tool from Mar 5, 2016
io.c Rename FOFOn to SnapshotWithFOF Aug 14, 2016
lightcone.c Properly share petapm between GENIC and main code. Jun 15, 2016
longrange.c remove NOGRAVITY from longrange. Jul 27, 2016
main.c Remove -DFOF and replace it with a runtime config option: FOFOn Aug 7, 2016
makeconfig.sh Use MPICC and MPICXX in Options.mk Aug 16, 2016
mymalloc.c Properly share petapm between GENIC and main code. Jun 15, 2016
mymalloc.h Properly share petapm between GENIC and main code. Jun 15, 2016
openmpsort.c Fix build with gcc 6. May 17, 2016
openmpsort.h Fix gcc implicit function warnings Mar 1, 2016
param.c Remove now useless parameter DomainReportSpeedfac. Dec 4, 2016
param.h Refactor parameter parser. Jul 21, 2016
paramset.c bad enum printing. missing h2 in sfrcriterion. Aug 4, 2016
paramset.h Refactor parameter parser. Jul 21, 2016
peano.c fix peano reordering of non-sph particles. Aug 2, 2016
peano.h Remove global peanodata variable that was only used in one place Aug 1, 2016
petaio.c Do not write empty files in snapshots Feb 12, 2017
petaio.h Remove the COOLING compile flag. Jul 25, 2016
petapm.c Merge branch 'master' into treewalk Aug 6, 2016
petapm.h endrun takes printf arguments. May 6, 2016
powerspectrum.c do not crash if power spectrum file could not be written. Feb 19, 2017
powerspectrum.h Split power spectrum routines into separate file for testing Dec 19, 2016
predict.c move BH to NgbIter. Aug 1, 2016
proto.h clean up blackhole.c's function names. Aug 2, 2016
publish.sh add a comment so I don't forget what it does. Jul 18, 2016
run.c Remove now useless global variables All.Cadj_Cpu and All.Cadj_Cost Dec 3, 2016
sfr_eff.c Fix some more gcc warnings Nov 19, 2016
system.c Merge branch 'master' into treewalk Aug 6, 2016
timestep.c Fix MAKE_GLASS_FILE and move it to a runtime configuration Nov 19, 2016
treewalk.c Remove unused variables Aug 25, 2016
treewalk.h move density to postprocess. Aug 2, 2016
utils-string.c Check return value of fread Nov 19, 2016
utils-string.h Missing utils functions. Jul 23, 2016
walltime.c Fix a large number of gcc warnings with -Wall, mostly defined unused Mar 1, 2016
walltime.h Remove inline qualifiers on declarations for functions defined elsewh… Mar 1, 2016

README.rst

MP-Gadget

Massively Parallel Cosmological SPH Simulation Software - MP-Gadget.

Description

This version of Gadget is derived from main P-Gadget / Gadget-2. It is the source code used to run the BlueTides simulation (http://bluetides-project.org).

The infrastructure is heavily reworked. As a summary:

  • A better PM solver for long range force with Pencil FFT.
  • A better Tree solver with faster threading and less redundant code.
  • A better Domain decomposition that scales to half a million cores.
  • A easier to use IO module with a Python binding.
  • A more intuitive parameter file parser with schema and docstrings.
  • A cleaner code base with less conditional compilation flags.

Physics models:

  • Pressure Entropy SPH and Density Entropy SPH
  • Radiation background in the expansion
  • Generic tracer particle seeding
  • Various wind feedback and blackhole feedback models
  • Various star formation criteria (need a License from Phil Hopkins before enabling)
  • Primordial and metal cooling
  • Fluctuating UV background

Installation

First time users:

git clone https://github.com/bluetides-project/MP-Gadget
# or git clone https://github.com/rainwoodman/MP-Gadget-private
cd MP-Gadget

bash bootstrap.sh

We will need gsl. On HPC systems with the modules command, usually it can be loaded with

module load gsl

env | grep GSL  # check if GSL path is reasonable

On a common PC/Linux system, refer to your package vendor how to install gsl and gsl-devel.

Copy Options.mk.example to Options.mk

cp Options.mk.example Options.mk

Edit Options.mk

  1. Set GSL flags according to the environment variables. On coma, use Options.mk.example.coma.
  2. Tweak the compilation options for 'features'. We are in the process of cleaning this up. Most options are tricky and undocumented, as Gadget. The defaults shall work for most cases; it enables Pressure-Entropy SPH and Blackhole, Cooling and SFR. To run a N-Body sim, use IC files with no gas particles.
  3. For off-tree build, set DESTDIR in Options.mk; the default target is in build/

Now we are ready to build

make -j 8

It takes some time to build pfft, one of the bundled dependencies. Other libraries are bigfile and mp-sort, which are written by me and quick to build.

In the end, we will have 2 binaries:

ls build/MP-Gadget build/MP-GenIC
  1. MP-Gadget is the main simulation program.
  2. MP-GenIC is the initial condition generator.

Usage

Find examples in examples/.

  • dm-only : Dark Matter only
  • lya : Lyman Alpha only (needs special compilcation flags)
  • hydro : hydro
  • small : hydro with low resolution

OpenMP Complication

When OpenMP is switched from on to off or off to on, all of the dependencies needs to be recompiled. This can be achived by removing all files in depends/lib.

Otherwise symbols related to OpenMP in PFFT may be missing.

Always enable OpenMP.

IO Format

The snapshot is in bigfile format. For data analysis in Python, use

pip install bigfile

Refer to https://github.com/rainwoodman/bigfile for usage.

Otherwise directly open the blocks with Fortran or C, noting the data-type information and attributes in header and attrs files (in plain text)

Contributors

Gadget-2 was authored by Volker Springel. The original P-GADGET3 was maintained by Volker Springel

MP-Gadget is maintained by Yu Feng.

Contributors to MP-Gadget include:

Simeon Bird, Nicholas Battaglia, Nishikanta Khandai

Citation

Please cite 'Feng et al 2016 in prep'. A short paper will be written soon.

We need to obtain a DOI for direct citation of the software.

Licence Issue

Most files are licensed under GPLv2+.

Except two files of questionable licences: sfr_eff.c and cooling.c.

Please refer to the source files for details.

The source code is put in public domain for reference. To enable features in sfr_eff.c and cooling.c for scientific runs, consent from the original authors of these files shall be obtained.

Status

The public branch is

https://travis-ci.org/bluetides-project/MP-Gadget.svg?branch=public