COSMOMC help with compilation error

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
Jens Kujat
Posts: 2
Joined: June 15 2005
Affiliation: Vanderbilt University

COSMOMC help with compilation error

Post by Jens Kujat » June 15 2005

Hi,

After downloading the latest version of COSMOMC/CAMB and installing the Intel Fortran compiler for Linux (8.1) as well as the Math Kernel Library (MKL) 7.2.1, I'm running into some trouble when trying to compile COSMOMC.
I adjusted the Makefile in the source directory to reflect the compiler I'm using:

"F90C = ifort
FFLAGS = -O2 -Vaxlib -ip -W0 -WB -openmp -fpp
LAPACKL = -L/opt/intel/mkl721/lib/32 -lmkl_lapack -lmkl_ia32 -lguide -lpthread -static
INCLUDE = -I../camb "

But when trying to run "make all" I receive the following error message regarding an undefined library reference:

"/opt/intel/mkl721/lib/32/libguide.a(z_Linux_util.o)(.text+0x17c2): In function ` __kmp_suspend_initialize':
: undefined reference to `pthread_atfork'
make: *** [cosmomc] Error 1"

If anyone has ever run into the same kind of problem - any help will be greatly appreciated, since I have already spent many hours on google looking for a solution.

Thanks so much in advance,

Jens

Jens Kujat
Posts: 2
Joined: June 15 2005
Affiliation: Vanderbilt University

COSMOMC help with compilation error

Post by Jens Kujat » June 16 2005

UPDATE - solution found

Just in case someone else runs into the same problem and stumbles across this:
It turns out the path for the lpthread library needed to be included in the Makefile:

I included "-lm /usr/lib/libpthread_nonshared.a" right before the "-lpthread" and everything worked fine....

Jens

Post Reply