- SuperCosmoChord
- Supernest + PolyChord + CosmoMC for cosmological parameter estimation and evidence calculation
- Authors
-
- Will Handley (PolyChord and CosmoChord),
- Aleksandr Petrosyan (Superpositional proposals),
- Anthony Lewis (CosmoMC)
- ForkedFrom
- https://github.com/cmbant/CosmoMC
- Homepage
- http://polychord.co.uk
SuperCosmoChord is a fork of CosmoMC, which adds nested sampling provided by PolyChord, and uses superpositional proposal re-partitioning to accelerate the process.
You can see the key changes by running:git remote add upstream https://github.com/cmbant/CosmoMC
git fetch upstream
git diff --stat upstream/master
git diff upstream/master source
The changes to CosmoMC are minor:
- Nested sampling heavily samples the tails of the posterior. This means that there need to be more corrections for these regions that are typically unexplored by the default metropolis hastings tool. This is now implemented by separate CAMB git submodule.
- You should not use openmp parallelisation, as this in inefficient when using PolyChord. Instead, you should use pure MPI parallelisation, and you may use as many cores as you have live points.
git clone --recursive https://github.com/williamjameshandley/CosmoChord
cd CosmoChord
make
export OMP_NUM_THREADS=1
./cosmomc test.ini
If you wish to use Planck data, you should follow the
CosmoMC planck
instructions, and then run make clean; make
; after —
source bin/clik_profile.sh
pip install cython astropy
- install
cfitsio
andastropy
. Most Linux distributions will havecfitsio
in the official repositories. Consult your distribution’s package repositories. - Obtain the likelihood code and the baseline data from the Planck Legacy archive:
curl "http://pla.esac.esa.int/pla-sl/data-action?COSMOLOGY.COSMOLOGY_OID=151912" --output "COM_Likelihood_CODE-v3.0_R3.01.tar.gz"
curl "http://pla.esac.esa.int/pla-sl/data-action?COSMOLOGY.COSMOLOGY_OID=151902" --output "COM_Likelihood_Data-baseline_R3.00.tar.gz"
- Alternatively, manually download
COM_Likelihood_Code-*.tar.gz
andCOM-Likelihood_Data-*.tar.gz
. - Unpack the code
tar xvfz COM_likelihood_Code*.tar.gz
cd code/plc-3.0/plc-3.01/
- install planck likelihood code with:
./waf configure --install_all_deps install
note that if this fails, the waf
script will attempt to pull the
dependencies from obsolete hardcoded locations. If this is the case,
interrupt (Ctrl+c
) and install the dependencies manually. See your
linux distribution’s package catalogue to find the required libraries.
- Set-up the environment variables. An example profile for
bash
is given inbin/clik_profile.sh
. To avoid frustration, you may wish to source the profile at login, e.g. by addingsource $(pwd)/bin/clik_profile.sh
to your.bashrc
. - Return to the CosmoChord’s root directory:
cd ../../..
. - Unpack the baseline data
tar xvfz COM_Likelihood_Data-*.tar.gz
- symlink into baseline data into
CosmoChord/data
.
ln -s baseline/plc3-0 data/clik_14.0
- (re)-build CosmoChord
make rebuild
To run, you should add action=5
to your ini file, and include
batch3/polychord.ini
. Consider modifying test.ini
.