## CosmoMC Over-utilisation

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
ruchika kaushik
Posts: 5
Joined: December 06 2017
Affiliation: research scholar

### CosmoMC Over-utilisation

I have installed CosmoMC successfully in an 8 core Xeon processor
workstation. When I use the command mpirun -np 4 ./cosmomc test.ini , my
8 cores are high with num_thread = 0 & action=0. Could you please tell why
cosmomc is utilizing full cores and not 4 as given in command line. And if I
try to use -n p 8, it throws error, no that much slots are available

How many chains are recommended for good statistics?

Antony Lewis
Posts: 1369
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

### Re: CosmoMC Over-utilisation

num_thread =0 will automatically set the number of threads, in your case you have two threads per chain to use all the cores. You can set num_threads=1 if you really only want one per chain.

Should be no space in "-n p"?

I usually run four chains till R-1 ~ 0.02 or 0.01 (0.05 is usually fine if you don't want to make 2D plots).

ruchika kaushik
Posts: 5
Joined: December 06 2017
Affiliation: research scholar

### CosmoMC Over-utilisation

Thank you very much for the post. CosomoMC is working fine in this case.

My processor is IntelÂ® Xeon(R) CPU E3-1271 v3 @ 3.60GHz Ã— 8

Now for action = 0,
If I use mpirun -np 4 ./cosmomc test.in with num_threads = 1, it uses exactly four cores. And with num_threads = 2, it uses 8 cores. So its fine here.

But. If I use mpirun -np 8 with num_threads=1, it gives this following error

Code: Select all

--------------------------------------------------------------------------
There are not enough slots available in the system to satisfy the 8 slots
that were requested by the application&#58;
./cosmomc

Either request fewer slots for your application, or make more slots available
for use.
--------------------------------------------------------------------------


Antony Lewis
Posts: 1369
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

### Re: CosmoMC Over-utilisation

That looks like an mpirun error, nothing to do with Cosmomc. Maybe other programs on your computer are using too much cpu to assing all to cosmomc (or maybe it's seeing the physical cores rather than hyperthreaded).

ruchika kaushik
Posts: 5
Joined: December 06 2017
Affiliation: research scholar

### CosmoMC Over-utilisation

Thank you. It is a hyperthreaded processor.

Shouvik Roychoudhury
Posts: 21
Joined: August 14 2016
Affiliation: Harish-Chandra Research Institute

### CosmoMC Over-utilisation

Keep num_threads=0. It should work.