Compiling, running and analysing chains

This file is for release v1.35 (Sept 2008).

If you are looking for older versions' read-me files, see the version history page.

Jump to:

Compiling SuperBayes

The code can be compiled to run on one CPU only or as an MPI code to run in parallel on an MPI cluster. In source/Makefile, turn the FC flag to mpif90 for MPI support or to ifort to work in single mode.

In MPI mode, if running MCMC the number of chains is automatically set equal to the number of processors used in the run. Each chain then produces output files with an id tag "_i", with i=1,...,n (n being the number of processors). In Grid Scan mode, the MPI mode distributes points on the grid across nodes. With MultiNest, MPI mode switches on the faster MultiNest parallel computation on the given number of nodes (recommended n=10). If MPI is off, in MCMC only one chain is produced while MultiNest runs in serial mode.

From the source directory, the command

make cleanall

cleans all the compiled files and executables. For a MPI to single processor mode transition use the command

make clean

and reset the FC flag to ifort in the Makefile as it was mentioned above. The command

make all

then recompiles the whole package building static libraries for each of the codes included into the package (notice that MicrOMEGAs also uses dynamical libraries). Then two binary files are produced: superbayes (which is to be used for runs in MCMC mode, postprocessing and grid scanning) and superbayes_multinest (to be used for MultiNest mode runs). The command

make superbayes (superbayes_multinest)

only recompiles files (for the corresponding mode) in the source directory. Use

make getplots

to compile the getplots routine (for chain analysis and plotting).

Testing SuperBayes

For testing purposes the testing.90 file is provided. The command

make tester

will compile it.

The run is made from the command line with the command

tester

The parameters for running the tester are hardcoded in the source\tester.f90 file, and are the same as described below. Setting debug=.true. will write the full output with detailed info about the point being considered to the file spectrum.out. By default a file called ifort.* containing the formatted output is created too. The tester works in single-point mode if test_chain = .false., otherwise it can read in a list of points from an existing chain (filename of the chain file hardcoded in tester.f90), which can be useful for testing purpose.

If your installation has been successfull, the output of running tester should match the content of the file tester.output in the main directory.

Running SuperBayeS

If MPI is turned off, Superbayes is invoked in single-processor mode from the command line with the command

superbayes (superbayes_multinest) SampleIniFile.ini

If you try e.g. to run superbayes in MultiNest mode, you will get an error message (and viceversa).

The corresponding MPI command depends on the configuration of your machine. The SampleIniFile.ini file contains all parameters for the run. Currently, only the Constrained MSSM is supported, but the package is easily customizable to extend the scan to the general MSSM if required. The syntax of the .ini file is mutuated from the CosmoMC package, and the meaning of the parameters is explained here .

SuperBayeS can be run in MCMC mode (using Metropolis-Hastings), in grid-scan mode (which returns the likelihood on a multi-dimensional grid at pre-defined spacings in parameter space) or (recommended option) in MultiNest (Nested Sampling) mode (use the superbayes_multinest binary). See running options for details.

(top)

Analysing the chains and plotting

SuperBayeS comes with GetPlots, a routine for analysing the MCMC and MultiNest outputs and plotting the results in 1, 2 and 3 dimensions. This is based on GetDist, from the CosmoMC package - refer to CosmoMC website for futher details. The current version has many extensions and new facilities that are described in detail here

GetPlots is invoked with the command (from SuperBayeS root directory)

getplots GetPlotsSample.ini

Output files are stored in subdirectories of the folder output_files folder (any pre-existing files are overwritten). Those files contain the statistical information about the run and the matlab and SuperMongo (SM) files needed to produce plots (see here for details). Data files needed by matlab and SM for the plots are stored in subdirectories of the folder plot_data (it should usually not be necessary to edit or otherwise change these files).

To generate .ps plots, go to the output_files/rootname directory and call SM (for 1D plots) with the command

sm < rootname_1D.sm

or matlab via the command

matlab < rootname_2D.m or matlab < rootname_3D.m

Details of the format of the ensuing plots (line colours, thickness, labels, colormaps, etc) can be custom-edited in the source files source\matlab.f90 (matlab plots) and source\smplots.f90 (SM plots).

Analysis and plotting options are explained here. Interactive plotting with SuperEGO is described here.

The list of output files and their meaning is explained here.

(top)

Running options (indirect detection quantities options are listed separately here. MultiNest specific running options are here )

(top)

Indirect detection quantities options

All of the following options are only relevant if compute_Indirect_Detection is set to true. We recommend to use the post-processing routine to compute indirect detection quantities from the saved MCMC or MultiNest run rather than compute them directly in the run.

Running options for MultiNest

Please notice that the MultiNest sampler needs at least a stack size of about 512 MB.

(top)

Plotting options for getplots

Plotting options are set in the GetPlotsSample.ini file to be used with getplots as follows:

(top)

List of output files and their content

(top)