Dear all,
I've got some problems when I use "pc_build" to compile the code in the sample cylinder_deposition with MPI. The code generated a bunch of"undefined reference to" errors. A part of the output is below:
In make[2]: function*** Waiting for unfinished jobs....
`PMPI_Info_get':
info_get.c:(.text+0x4f): undefined reference to `pthread_getspecific'
info_get.c:(.text+0x114): undefined reference to `pthread_getspecific'
info_get.c:(.text+0x34e): undefined reference to `pthread_setspecific'
info_get.c:(.text+0x373): undefined reference to `pthread_setspecific'
/usr/local/mpi/lib//libmpich.a(info_getn.o): In function `PMPI_Info_get_nkeys':
info_getn.c:(.text+0x3c): undefined reference to `pthread_getspecific'
info_getn.c:(.text+0xf2): undefined reference to `pthread_getspecific'
info_getn.c:(.text+0x285): undefined reference to `pthread_setspecific'
info_getn.c:(.text+0x2aa): undefined reference to `pthread_setspecific'
/usr/local/mpi/lib//libmpich.a(info_getnth.o): In function `PMPI_Info_get_nthkey':
info_getnth.c:(.text+0x3e): undefined reference to `pthread_getspecific'
info_getnth.c:(.text+0xf8): undefined reference to `pthread_getspecific'
info_getnth.c:(.text+0x29a): undefined reference to `pthread_setspecific'
info_getnth.c:(.text+0x2bf): undefined reference to `pthread_setspecific'
/usr/local/mpi/lib//libmpich.a(info_getvallen.o): In function `PMPI_Info_get_valuelen':
info_getvallen.c:(.text+0x4c): undefined reference to `pthread_getspecific'
info_getvallen.c:(.text+0x10c): undefined reference to `pthread_getspecific'
info_getvallen.c:(.text+0x346): undefined reference to `pthread_setspecific'
info_getvallen.c:(.text+0x36b): undefined reference to `pthread_setspecific'
collect2: error: ld returned 1 exit status
make[2]: *** [run.x] Error 1
make[2]: Leaving directory `/home/ht/pencil-code/samples/2d-tests/cylinder_deposition/src'
make[1]: *** [code] Error 2
make[1]: Leaving directory `/home/ht/pencil-code/samples/2d-tests/cylinder_deposition/src'
make: *** [default] Error 2
Make failed: <>
I thought maybe I set wrong flags in my ".conf" file in the pencil-code/config/hosts/, but I don't know which is wrong. The ".conf" file is below. And I installed the mpich2 in the '/usr/local/mpi/' directory.
#
# $Id: GNU_Linux.conf 19488 2012-09-04 14:00:20Z Bourdin.KIS $
%include compilers/GNU-GCC
%section Makefile
FC_SLOPPY = gfortran -I/usr/include -I/usr/local/mpi/include -I.
FC = $(FC_SLOPPY) -Wall -fbounds-check
CFLAGS += -I/usr/lib/
FFLAGS += -O3 -I/usr/include/ -I/usr/local/mpi/include
FFLAGS_DOUBLE = -fdefault-real-8
F77 = $(FC)
MPI_LDLIBS= -lmpich
LD_MPI = -L/usr/local/mpi/lib/ $(MPI_LDLIBS)
%endsection Makefile
%section runtime
mpiexec=mpirun
%endsection runtime
# End of file
Any suggestions?
Thanks in advance.
Zhuang