running CAMB in parallel on multiple cores

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
Oliver Zahn
Posts: 9
Joined: March 10 2005
Affiliation: Berkeley Center for Cosmological Physics

running CAMB in parallel on multiple cores

Post by Oliver Zahn » September 21 2007

I'm trying to get CAMB to run on both cores of a Macbook Pro, using the default Makefile setup:

#Intel 8 , -openmp toggles mutli-processor:
F90C = ifort
FFLAGS = -ip -O2 -Vaxlib -W0 -WB -fpp2 -openmp

The code compiles, but when running I get the following error:

lap~/NUMERICS/CAMB>./camb params.ini
dyld: Library not loaded: libguide.dylib
Referenced from: /Users/oliverzahn/NUMERICS/CAMB/./camb
Reason: image not found
Trace/BPT trap

Any idea on what is going wrong?

Without the -openmp flag, the code runs fine on my Mac, however of course only on one core.

Oliver

Pascal Vaudrevange
Posts: 50
Joined: March 26 2006
Affiliation: DESY
Contact:

running CAMB in parallel on multiple cores

Post by Pascal Vaudrevange » September 27 2007

I am not sure, maybe you need to add or remove the following flags

LAPACKL = $(LAPACKL) -lguide -lpthreads

?

Oliver Zahn
Posts: 9
Joined: March 10 2005
Affiliation: Berkeley Center for Cosmological Physics

running CAMB in parallel on multiple cores

Post by Oliver Zahn » September 28 2007

Thanks for the suggestion. Unfortunately adding "-lguide -lpthread" leads to the same runtime error.

Pascal Vaudrevange
Posts: 50
Joined: March 26 2006
Affiliation: DESY
Contact:

running CAMB in parallel on multiple cores

Post by Pascal Vaudrevange » September 28 2007

Is your $LD_LIBRARY_PATH set properly? There should be some scripts coming with the intel compilers called ifortvars.sh or ifortvars.csh that set this correctly.

Oliver Zahn
Posts: 9
Joined: March 10 2005
Affiliation: Berkeley Center for Cosmological Physics

running CAMB in parallel on multiple cores

Post by Oliver Zahn » October 15 2007

Thanks for the advice! The library path was the problem. After executing

. /opt/intel/fc/XXX/bin/ifortvars.sh

where XXX is a name given during ifort installation, it works just fine on multiple processors (and scales quite well in my case).

Switching to e.g. two processors is done by

export OMP_NUM_THREADS=2

Post Reply