CosmoMC Over-utilisation

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

CosmoMC Over-utilisation

Post by ruchika kaushik » December 06 2017

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: 1353
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: CosmoMC Over-utilisation

Post by Antony Lewis » December 06 2017

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

Post by ruchika kaushik » December 07 2017

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 allp>

————————————————————————–
There are not enough slots available in the system to satisfy the 8 slots
that were requested by the application:
  ./cosmomc

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

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

Re: CosmoMC Over-utilisation

Post by Antony Lewis » December 07 2017

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

Post by ruchika kaushik » December 07 2017

Thank you. It is a hyperthreaded processor.

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

CosmoMC Over-utilisation

Post by Shouvik Roychoudhury » January 04 2018

Keep num_threads=0. It should work.

Post Reply