Warning I generated 2048^3 ICs (subsampled from a 3072^3) with this IC code and those simulations were wrong. However, 1024^3 simulations generated with this were fine. Presumably, something is wrong with (at least) the subsample fraction logic - do not use the subsampling features in this code -- i.e., set both GlassTileFacSampleNumerator
and GlassTileFacSampleNumerator = 1
.
This repo contains 2LPT IC generation code from Roman Scoccimarro. Original code can be found here
- The code has been updated with lots of checks about INT overflow and 64 bit ID overflows.
- Dependency on Numerical Recipes in C has been replaced with
gsl
- This code can accept P(k) generated by CAMB (contribution from Greg Poole)
- Can generate consistent particle IDs across simulations of different resolutions (contribution from Greg Poole)
Note this version produces a header compatible with standard public Gadget2. In particular,
the number of particles in excess of INT_MAX (~2e9) is stored in npartTotalHighWord
in the header, rather than npartTotal[2]
.
- An MPI capable compiler
mpicc
- Double precision MPI FFTW2 libraries (
fftw2.1.5
) gsl
library
- Setup the
Makefile
options according to the simulation IC. Default options are matched to running a single-species dark matter only cosmological simulation. - Check the paths to
MPI
,FFTW
andGSL
libraries - Typing
make
should generate the executable
- Edit the parameter file. See example parameter file provided in example.params
- Launch the MPI process
mpirun -np Ncpus ./2LPTic simulation.param
(refer to your computing cluster documentation for submitting and running jobs)
Author is Roman Scoccimarro (I think based on N-GenIC developed by Volker Springel). Current repo contains contribution from Greg Poole for the CAMB P(k) handling and consistent particle IDs generation.
Maintained by Manodeep Sinha. Any new bugs are probably my fault.