running CAMB in parallel on multiple cores
-
- Posts: 9
- Joined: March 10 2005
- Affiliation: Berkeley Center for Cosmological Physics
running CAMB in parallel on multiple cores
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
#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
-
- Posts: 50
- Joined: March 26 2006
- Affiliation: DESY
- Contact:
running CAMB in parallel on multiple cores
I am not sure, maybe you need to add or remove the following flags
LAPACKL = $(LAPACKL) -lguide -lpthreads
?
LAPACKL = $(LAPACKL) -lguide -lpthreads
?
-
- Posts: 9
- Joined: March 10 2005
- Affiliation: Berkeley Center for Cosmological Physics
running CAMB in parallel on multiple cores
Thanks for the suggestion. Unfortunately adding "-lguide -lpthread" leads to the same runtime error.
-
- Posts: 50
- Joined: March 26 2006
- Affiliation: DESY
- Contact:
running CAMB in parallel on multiple cores
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.
-
- Posts: 9
- Joined: March 10 2005
- Affiliation: Berkeley Center for Cosmological Physics
running CAMB in parallel on multiple cores
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
. /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