- 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.iniIf 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
cfitsioandastropy. Most Linux distributions will havecfitsioin 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.gzandCOM-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 installnote 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
bashis 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.shto 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 rebuildTo run, you should add action=5 to your ini file, and include
batch3/polychord.ini. Consider modifying test.ini.