Page 1 of 1

Using MPI with CAMB

Posted: May 17 2021
by Dournac Fabien
Hello,

I would like to use MPI for CAMB with intel compiler mpifort since I have to launch the executable "camb" multiple times in a loop.

I saw in the Makefile this part where I modified F90C and FFLAGS (keeping -omp to mention multi-processor) :

Code: Select all

#Digital/Compaq fortran, -omp toggles multi-processor
#F90C    = f90
F90C    = mpifort
#FFLAGS  = -omp -O4 -arch host -math_library fast -tune host -fpe1
FFLAGS  = -omp


Unfortunately, at the execution by doing :

mpirun -np 64 ./camb params.ini

CAMB seems to not be distributed on multi-processors, runtime is even higher than for a classical single processor execution.

Does anyone know how to make it run with MPI ? (especially the different flags to set in Makefile) ?

Regards

Re: Using MPI with CAMB

Posted: May 17 2021
by Antony Lewis
CAMB uses OpenMP not MPI. If you want to call camb multiple times in parallel, run mpirun on your MIP code that is calling CAMB. parallelizing the loop.