1. Download CLASS, untar and do
make
(Be sure that the version of gcc is 4.7)
2. Set proxy in .bashrc [numbers are for the purpose of showing example]
# Proxy settings
export HTTPS_PROXY=http://172.16.0.1:3128
3. a) Download Anaconda from (Use 2.* version only. MontePython is incompatible with 3.* versions)
https://www.anaconda.com/download/#linux
b) chmod a+x Anacon.......v.y.sh
c) ./ Anacon.......v.y.sh
4. Type one by one
$conda install -c anaconda pyqt
$conda install -c piyanatk pyfits
$conda install -c anaconda mpi4py
5. Install cfitsio
Follow instructions from
https://github.com/oguyon/Cfits
6. Install Planck Likelihood :
a) Download the file COM_Likelihood_Code-v2.0.R2.00.tar.bz2
from
http://pla.esac.esa.int/pla/#cosmology
b) unpack the file in /home/your-account-name/data
c) go to plc-2.0 folder.
d) Type
./waf configure –prefix=/home/your-account-name/data/plc-2.0 –lapack_mkl=${MKLROOT} –cfitsio_prefix=/home/ your-account-name/data/cfits --install_all_deps
(These paths may differ depending on where you put those folders)
e) Type
$./waf install
$source ./bin/clik_profile.sh
$echo -e “\nsource $(pwd)/bin/clik_profile.sh” >> ~/.bashrc
7. Download MontePython
https://github.com/baudren/montepython_public
Follow the instruction except Planck Likelihood part.
8. In the montepython folder create 3 new folders with name “input”, “run”, “chains”
9. Follow “default.conf.template” file in the same folder and create your own “default.conf” in that folder only specifying the paths for your CLASS code, planck-likelihood, root folder (in which you have code and montepython)
10. Create your own .param file following the “test.param” file.
[ Note : There is a entry in the param file like “data.over_sampling=[1, 4]”
which helps govern oversampling of nuisance parameters and reduces run time. The first number is always to be kept 1 as it signifies how many times the model parameters are sampled. The second number (eg. 4) makes MontePython sample the nuisance parameters 4 times more frequently. For a detailed description of how this works, refer to Julien Lesgourges’ answer on github. If you are putting many (>3) data of many experiments and not sure about the over-sampling order, just comment this out. ]
11. Create a jobscript file like this :
#!/bin/bash
# Set job parameters
#BSUB -J monte
#BSUB -o monte.o%J
#BSUB -e monte.e%J
# Set total number of processors
#BSUB -n 48
# This sets the number of processors per chain. So, total no. of processors = OMP_NUM_THREADS*(no. of chains. eg. 6 when mpirun -np 6 ...)
# (BSUB -n #) = (OMP_NUM_THREADS)*(mpirun -np #)
# Setting improper number of processors per chain may crash the system!!
export OMP_NUM_THREADS=8
# added for Anaconda2 4.1.1
export PATH="/home/girish20/source/anaconda/bin:$PATH"
DEST=09Nov_planckLSS_neutrino_inverted
INPUT=nu_planckLSS_m0_inv
CHAINS_DIR=chains/neutrino_viscous_corrected
cd /home/girish20/class/montepython_public-2.2/
# Run a short chain to create small chains
mpirun -np 6 python montepython/MontePython.py run -p input/"$INPUT".param -o "$CHAINS_DIR"/"$DEST" -N 1000
# Once you have the short chains by running the above command, go the
# class/montepython_public-2.2/ and then run this
montepython/MontePython.py info "$CHAINS_DIR"/"$DEST" --want-covmat --noplot
# The above command should have created a covmat. Use the covmat to generate longer
# chains
mpirun -np 6 python montepython/MontePython.py run -p input/"$INPUT".param -o "$CHAINS_DIR"/"$DEST" -c "$CHAINS_DIR"/"$DEST"/"$DEST".covmat --update 500 -N 100000
# The chains created above can then be analysed by the following command on the
# terminal. Remember to change the chain name to that of long chain if you want to
# analyze only long chains.
# montepython/MontePython.py info chains/planck/shear_test/2017*
12. Submit your job
$bsub < jobscript
ENJOY--------
Prakrut, Arindam, Sampurn, Priyank