### Increase efficiency of multiple CosmoMC action=4 runs

Posted:

**August 10 2019**Hello,

I am trying to work out how \chi^2 varies when Gaussian prior is applied to some parameters (eg ombh2, omch2). I added my new functions in CosmologyParameterizations.f90. To get the data, I have to run multiple times of CosmoMC (action=4). The method I am currently using is simply to write a script that calls CosmoMC multiple times and record the parameter set and the \chi^2. However, this takes a long time to finish as every time CosmoMC is called, the whole program has to re-initialise.

So, I am wondering if there is a way to modify the code so that CosmoMC can retain the initialisation. I want the program to simply change the central value of some parameters, send them to CAMB, and calculate the \chi^2. I think I should modify the driver, but I am not sure where/which subroutines should be in the loop.

Thank you in advance for your help!

Chien Lin

I am trying to work out how \chi^2 varies when Gaussian prior is applied to some parameters (eg ombh2, omch2). I added my new functions in CosmologyParameterizations.f90. To get the data, I have to run multiple times of CosmoMC (action=4). The method I am currently using is simply to write a script that calls CosmoMC multiple times and record the parameter set and the \chi^2. However, this takes a long time to finish as every time CosmoMC is called, the whole program has to re-initialise.

So, I am wondering if there is a way to modify the code so that CosmoMC can retain the initialisation. I want the program to simply change the central value of some parameters, send them to CAMB, and calculate the \chi^2. I think I should modify the driver, but I am not sure where/which subroutines should be in the loop.

Thank you in advance for your help!

Chien Lin