CosmoMC is the Cosmological MonteCarlo code. It comes as a Fortran code with various supporting Python packages. The Fortran code is capable of running in parallel, using all cores on the PC, to speed calculations - to do this is needs to be built with MPI capabilities.
To build the Fortran component follow these steps:
module load mpi
git clone https://github.com/cmbant/CosmoMC.git- which will download a copy of the program source code to a folder called CosmoMC
make allto compile the code. There will be some compiler warnings, but there should not be any fatal errors.
cosmomcand you can run a simple test by typing
mpirun ./cosmomc test.ini
To run the Python scripts associated with CosmoMC you will need to install the GetDist module into your Python environment.
~/.bashrcfile. Set either:
export PYTHONPATH=$HOME/CosmoMC/python:$PYTHONPATHif you already define
export PYTHONPATH=$HOME/CosmoMC/pythonif you don't have any other definitions of
python setup.py install
python setup.py test
To run the GetDistGUI.py script you need to install the Python PySide library. You can do this in Anaconda by running
conda install PySide. Then run the GUI by either typing
python GetDistGUI.py or else make the script executable (
chmod +x GetDistGUI.py) and then run