[CPMD-list] pthread compilation problems
arnaud marmier
a.marmier at bath.ac.uk
Fri Jul 1 16:03:21 CEST 2005
Hello,
I'm trying to compile CPMD-3.9.2 on an opteron
I got a sequential version easily enough, but am having trouble with
the MPI.
Essentially I get the following kind of errors :
/usr/local/Cluster-Apps//mpi/gm/pgi/64//1.2.6..14a.1/lib/libmpich.a(gmpi_malloc.o)(.text+0x48c7):
In function `mALLOPt':
: undefined reference to `pthread_mutex_lock'
/usr/local/Cluster-Apps//mpi/gm/pgi/64//1.2.6..14a.1/lib/libmpich.a(gmpi_malloc.o)(.text+0x49ee):
In function `.st3894':
: undefined reference to `pthread_mutex_unlock'
make: *** [cpmd.x] Error 2
After checking a bit more it seems that the mpich library has been
compiled using threads and that I need to link to the threading library.
I have tried adding -lpthread to the FFLAGS, even copying some of the
libpthread.a libs in the SOURCE directory, but to no avail.
I include the Makefile Header for info :
#----------------------------------------------------------------------------
# Makefile for cpmd.x (plane wave electronic calculation)
# Configuration: PGI-AMD64-MPI
# Creation of Makefile: Jul 1 2005
# on Linux mott2 2.4.21-32.0.1.ELsmp #1 SMP Tue May 17 17:46:36 EDT 2005
x86_64
x86_64 x86_64 GNU/Linux
# Author: marmier
#----------------------------------------------------------------------------
#
SHELL = /bin/sh
#
#--------------- Default Configuration for PGI-AMD64-MPI ---------------
SRC = .
DEST = .
BIN = .
#QMMM_FLAGS = -D__QMECHCOUPL
#QMMM_LIBS = -L. -lmm
FFLAGS = -r8 -pc=64 -Msignextend
LFLAGS = -Bstatic -L. -latlas_x86-64 $(QMMM_LIBS)
CFLAGS =
CPP = /lib/cpp -P -C -traditional
CPPFLAGS = -D__Linux -D__PGI -DFFT_DEFAULT -DPOINTER8 -D__pgf77 \
-DPARALLEL -DMYRINET
NOOPT_FLAG =
CC = mpicc -O2 -Wall -m64
FC = mpif77 -c -fastsse -tp k8-64
LD = mpif77 -fastsse -tp k8-64
AR = ar
Thnaks in advance,
Best wishes,
Arnaud
More information about the CPMD-list
mailing list