CONCEPT (COsmological N-body CodE in PyThon) is a free and open-source code for cosmological structure formation. The code should run on any Linux system, though it is primarily intended for massively parallel computer clusters with distributed memory. The code is written almost exclusively in Python, but achieves C-like performance thanks to Cython.
CONCEPT is capable of simultaneously evolving matter particles and fluids such as (massless or massive) neutrinos at different orders of non-linearity. Completely linear perturbations in all species and the metric itself are fully supported, allowing for simulations consistent with general relativity (GR). The CLASS code is fully integrated into CONCEPT, making generation of e.g. initial conditions and GR corrections easily available.
For academic papers produced using CONCEPT, see:
- Relativistic implementation of decaying dark matter
- (available as of release 0.3.0)
- Linear dark energy perturbations
- (available as of release 0.3.0)
- Linear photon, massive neutrino and GR corrections
- (available as of release 0.2.0)
- Non-linear massive neutrinos
- (available as of release 0.1.0)
As CONCEPT has a lot of dependencies, it comes with an
installation script which installs all of these
(and CONCEPT itself) into a single location.
The path to the CONCEPT installation directory may be given
as an argument. If not, the installer will prompt you for a directory.
You may further supply the --tests
option which enables tests for each
dependency and CONCEPT itself during the installation.
Without tests, the installation takes about an hour or two on modern hardware.
You can download and invoke the installer in one go by
concept_version=v0.3.0
bash <(wget -O- https://raw.githubusercontent.com/jmd-dk/concept/${concept_version}/installer) [/path/to/concept] [--tests]
where brackets indicate optional arguments. Note that the initial
"bash
" is required regardless of which shell you are using.
You may adjust the value of concept_version
to your liking. For the
absolute newest (and unstable!) version, use concept_version=master
.
Should the installation process end prematurely (e.g. due to network failure), simply rerun the installation commands and it will pick up from where it was.
Note that the above will install all dependencies into
/path/to/concept
, regardless of whether these are already installed
somewhere else on the system. One of these dependencies is an
MPI 3 library, which can be preferable not to include when installing
CONCEPT on a cluster, but instead make use of an already installed
MPI 3 library (any implementation should do). This is achieved by
setting the mpi_dir
variable, e.g.
concept_version=v0.3.0
mpi_dir=/path/to/mpi bash <(wget -O- https://raw.githubusercontent.com/jmd-dk/concept/${concept_version}/installer) [/path/to/concept] [--tests]
This trick may also be used should you wish to use some other pre-installed dependency.
For further help with the installation process,
run the installer with the --help
option.
To run a small sample simulation, navigate to the concept
directory
and invoke
./concept -p params/example_params -n 2 --local
This will run the simulation defined by the provided example_params
parameter file using 2 processes. If omitting --local
when on
a cluster, no simulation will be run. Instead, a matching job script
will be produced. For automatic submission of this job script to the
job scheduler of the cluster, supply the queue name using
the -q QUEUE
option.
For additional options, run
./concept -h
To learn about the many parameters which can be specified in a
parameter file, study the concept/params/example_params
parameter file.
It is much larger than typical parameter files because it contains
(almost) every possible parameter.
- For the physics and numerical methods implemented, you may consult my PhD thesis.
- No additional up-to-date documentation on how to actually use CONCEPT exists. A very out-of-date user's guide from back when CONCEPT was a pure particle code, as well as my master's thesis for which CONCEPT was originally written, are available.
Please direct any questions and issues to the author: dakin(at)phys.au.dk