People helping me with installation of CosmoMC failed to compile mpif90, but succeeded with gfortran. I checked that I can run code, and with num_threads set to e.g. 10 or 20, I get a nice-looking cpu usage of ~1000% on my (24-core) desktop.
Probably a beginner's type question: what is lost in practice in not using mpi? Given I do apparently use multiple cores (which is openmp I assume) in the current configuration without mpi.
CosmoMC: mpif90 vs (gfortran+num_threads)
-
- Posts: 27
- Joined: July 18 2005
- Affiliation: University of Michigan
- Contact:
-
- Posts: 1943
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: CosmoMC: mpif90 vs (gfortran+num_threads)
You need mpi to use multiple chains at once. This is substantially more efficient that using lots of openmp threads since the scaling with openmp is not linear, and also allows convergence checks between the chains. I usually run four chains with 4-8 threads each. mpif90 may use gfortran or another compiler depending on options/how it is configured.
-
- Posts: 27
- Joined: July 18 2005
- Affiliation: University of Michigan
- Contact:
Re: CosmoMC: mpif90 vs (gfortran+num_threads)
Makes sense - thanks Antony!
Meanwhile our very fine IT people managed to install mpif90, so that works for me now.
Meanwhile our very fine IT people managed to install mpif90, so that works for me now.