CosmoMC: estimate_propose_matrix with new parameters

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
Hiranya Peiris
Posts: 54
Joined: September 28 2004
Affiliation: University College London

CosmoMC: estimate_propose_matrix with new parameters

Post by Hiranya Peiris » September 16 2005

Hi,

I am trying to use the above option set to true in CosmoMC to find a new proposal distribution for a model in which I have added several fast parameters. In one case I have a pretty good idea of the marginalized standard deviation of the parameters, in the others, not so much. But in all cases, the code crashes after a while with errors that look like what is pasted below.

I can always try the MPI methods to learn the propose matrix that are recommended in previous posts in this forum. However, I would really like to get the code working as it should in a serial environment before migrating to a cluster. The error looks like there is some weird memory leak happening, so I would really like to know its cause, even if it ends up that I can't use this option for some reason. I would be really grateful if anyone can provide any suggestions.

Thanks a lot!

Hiranya

For initial lower limit on step length (lambda1), 0.0000000000E+00 , gradient.dirn is -483.36
40747
For initial upper estimate (lambda2), 0.8407531306E-02 , gradient.dirn is 57083.14844
Locating the minimum in this direction...
Finding the gradient numerically...
gradient wrt 1 th element is: 58.58262634
gradient wrt 2 th element is: -70.12072754
gradient wrt 3 th element is: -6.720314026
gradient wrt 4 th element is: -149.6531372
gradient wrt 5 th element is: -698.9159546
gradient wrt 6 th element is: 1242.675415
gradient wrt 7 th element is: 380.3808289
after 1 bisections, lambda2,df2: 0.4203765653E-02 30061.18359
Finding the gradient numerically...
gradient wrt 1 th element is: 28.08916283
gradient wrt 2 th element is: -33.91596985
gradient wrt 3 th element is: -4.793701172
gradient wrt 4 th element is: -75.75560760
gradient wrt 5 th element is: -350.4357605
gradient wrt 6 th element is: 631.8175049
gradient wrt 7 th element is: 185.3844452
after 2 bisections, lambda2,df2: 0.2101882827E-02 15189.93262
Finding the gradient numerically...
cosmomc(15553) malloc: *** vm_allocate(size=897024) failed (error code=3)
cosmomc(15553) malloc: *** error: can't allocate region
cosmomc(15553) malloc: *** set a breakpoint in szone_error to debug
1525-108 Error encountered while attempting to allocate a data object. The program will stop.

gongbo zhao
Posts: 69
Joined: January 04 2005
Affiliation: ICG, Portsmouth
Contact:

CosmoMC: estimate_propose_matrix with new parameters

Post by gongbo zhao » September 16 2005

Dear Hiranya:
Jun-Qing and I have encontered similar problems when trying to estimate a new proposal matrix when adding new parameters. Our way out is adding null comlumns and rows (setting the added elements zero )in the old matrix to make its dimension correct. Given this proposal matrix , CosmoMC can run smoothly . The new proposal matrix can be generated when you "getdist" the output chain files after several hours of running ( I typically use 4 CPUs per chain and 8 chains ). Then replace the old matrix with the new one, in most cases the chains will converge in a reasonable period of time and give nice results .
I do not know whether this method can be used in your work .

Cheers,
Gong-bo Zhao

Hiranya Peiris
Posts: 54
Joined: September 28 2004
Affiliation: University College London

CosmoMC: estimate_propose_matrix with new parameters

Post by Hiranya Peiris » September 20 2005

Hi,

I would use the MPI_LearnPropose flag except right now I can't get my f90 compiler to talk to MPI on my G5s. The cosmomc compile will not link to the MPI libraries, though they are in the link path. Sigh. I guess its time to migrate to a proper cluster - I may try out recompiling MPI from source with the f90 compiler first.

Cheers
Hiranya

Post Reply