This is the Python implementation of the FastPM numerical scheme for quasi-nbody simulations.
CI status / master
DOI of fastpm-python.
The best result is obtained by using anaconda.
Python 3 is the current development environment.
First set up the basic requirements,
conda install cython numpy scipy mpi4py nose conda install -c bccp nbodykit # update nbodykit to latest pip install -U --no-deps https://github.com/bccp/nbodykit/archive/master.zip
Finally, we can install fastpm, either from PYPI (the latest release)
pip install fastpm
or from the git clone :
pip install .
There is a simple command line interface, which expects a config.py in the first command line argument.
python -m fastpm.main examples/run
or with MPI
mpirun -n 4 python -m fastpm.main examples/run
The arguments are listed in fastpm/main.py
To run the tests with MPI
python runtests.py
Run with a single rank and enable debugging
python runtests.py --single --pdb --capture=no
To run a single test (e.g. test_fastpm.py:test_name) :
python runtests.py fastpm/tests/test_fastpm:test_name
python -m cProfile -o profile.stats run.py run gprof2dot profile.stats -f pstats | dot -Tpng > profile.png
We can't use -m fastpm.main directory because there is no nested -m support.