LensPix: parallelising on Mac OS

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Alan Heavens
Posts: 4
Joined: September 28 2004
Affiliation: Imperial College London
Contact:

LensPix: parallelising on Mac OS

Post by Alan Heavens » October 04 2013

I'm not having much luck getting lenspix to use more than one thread on a multicore (Mountain Lion) iMac. Does anyone have compiler/linker/include options which work? Thanks.

Alan Heavens
Posts: 4
Joined: September 28 2004
Affiliation: Imperial College London
Contact:

LensPix: parallelising on Mac OS

Post by Alan Heavens » October 04 2013

I forgot to add I'm using ifort, and this works for a single thread:

ifort -O2 -ip -fpp -error-limit 5 -heap-arrays -openmp -fast -arch x86_64 -I/Applications/Healpix_3.11/include -L/opt/local/lib -L/Applications/Healpix_3.11/lib -L/opt/intel/composer_xe_2013.3.171/mkl/lib -mkl=sequential -lmkl_lapack95_lp64 -lhealpix -lsharp_healpix_f -lpthread -lcfitsio -c SimLens.f90

and OMP_NUM_THREADS is set to >1. I'm assuming that I can do this with openmp rather than MPI.

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

Re: LensPix: parallelising on Mac OS

Post by Antony Lewis » October 04 2013

LensPix is really designed for MPI parallelization (which has the advantage of partially distributing memory over nodes if you want to go to very high resolution on a moderate memory cluster). A few of the auxiliary routines can use openmp to maximize throughput when not doing MPI based work, but the core codes for spherical transforms and lensing are MPI-based. It should run well on e.g. Cosmos.

Alan Heavens
Posts: 4
Joined: September 28 2004
Affiliation: Imperial College London
Contact:

LensPix: parallelising on Mac OS

Post by Alan Heavens » October 04 2013

Thanks Antony. I installed open mpi from http://www.open-mpi.org/software/ompi/v1.6/ and it works fine, with ifort replaced by mpif90 and some MPI flags set. e.g. orterun -np 8 simlens params.ini

Post Reply