Skip to content

energy-berkeley/nbodykit

 
 

Repository files navigation

nbodykit

Software kit for N-body simulations. From particle mesh simulation to analysis.

The software is built on top of existing tools. Please refer to their documentations:

  • pfft : massively parallel fast fourier transform, pencil domains
  • pfft-python : python binding of pfft
  • pypm : particle mesh framework in Python
  • kdcount : pair-counting and friend-of-friend clustering with KD-Tree
  • MP-sort : massively parallel sorting
  • sharedmem : in-node parallelism with fork and copy-on-write.

Build

The software is used in tree. First clone with

git clone http://github.com/bccp/nbodykit
cd nbodykit

Then build with

./build.sh

It may take a while to build fftw and pfft.

Attention

Mac Notes

autotools are needed on a Mac

sudo port install autoconf automake libtool

On Mac, the LDSHARED environment variable must be explicitly set. In bash, the command is

export LDSHARED="mpicc -bundle -undefined dynamic_lookup"; ./build.sh

On recent versions of MacPorts, we also need to tell mpicc to use gcc rather than the default clang compiler, which doesn't compile fftw correctly due to lack of openmp support.

export OMPI_CC=gcc

Attention

Edison Notes

On Edison, remember to unload darshan

module unload darshan

and preferentially, load PrgEnv-gnu

module unload PrgEnv-intel
module unload PrgEnv-gray
module load PrgEnv-gnu

then load python

module load python
module load cython
module load numpy
module load mpi4py

Packages are ready to use after importing the nbodykit namespace.

import nbodykit

print(nbodykit)

Note that actual packages are still under their own namespaces, for example

import kdcount

import pypm

This is to maintain the relative independence of the packages; but up to debate may be changed.

Top Level Executables

We provide two top level executables, fof.py and power.py. They need to be documented. For now, run them with '-h' to see the inline help.

power.py is a Power Spectrum calculator.

fof.py is a friend of friend finder.

About

Nobody Simulation and Analysis Kit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.9%
  • Shell 0.1%