undefined reference to `pthread_atfork

undefined reference to `pthread_atfork

I try to compile GAMESS on x86-64 using ifort & MKL. When I try to link it, I get the following error message:

  • undefined reference to 'pthread_atfork'

There have been many more undefined references until I added libguide.a to the libraries to be linked to. Do I have to specify any other library to resolve this problem? Thanks for any hints.




Thu Oct 27 15:34:17 CEST 2005
GAMESS will be linked into the executable image gamess.00.x.
chdir object
ifort -o ../gamess.00.x -Wl,-rpath=/opt/intel/mkl/8.0/lib/em64t gamess.o unport.o zunix.o aldeci.o algnci.o basccn.o basecp.o 
basext.o bashuz.o bashz2.o basn21.o basn31.o baspcn.o bassto.o ccaux.o ccqaux.o ccquad.o ccsdt.o chgpen.o cisgrd.o cosmo.o 
cphf.o cpmchf.o cprohf.o ddilib.o delocl.o demrpt.o dft.o dftaux.o dftexc.o dftfun.o dftgrd.o dftint.o dgeev.o dgesvd.o 
dmulti.o drc.o ecp.o ecpder.o ecplib.o ecppot.o efchtr.o efdrvr.o efgrda.o efgrdb.o efgrdc.o efgrd2.o efinp.o efinta.o 
efintb.o efelec.o efpaul.o efpcm.o efpcov.o eigen.o eomcc.o ffield.o fmo.o fmogrd.o fmoint.o fmoio.o fmolib.o fmoprp.o frfmt.o 
fsodci.o globop.o gradex.o guess.o grd1.o grd2a.o grd2b.o grd2c.o gugdga.o gugdgb.o gugdm.o gugdm2.o gugdrt.o gugem.o gugsrt.o 
gvb.o hess.o hss1a.o hss1b.o hss2a.o hss2b.o inputa.o inputb.o inputc.o int1.o int2a.o int2b.o int2c.o int2d.o int2f.o int2g.o 
int2r.o int2s.o int2t.o int2u.o int2v.o int2w.o int2x.o iolib.o lagran.o local.o loccd.o locpol.o mcpinp.o mcpint.o mcpl10.o 
mcpl20.o mcpl30.o mcpl40.o mcpl50.o mcpl60.o mcpl70.o mcpl80.o mccas.o mcjac.o mcqdpt.o mcqdwt.o mcqud.o mcscf.o mctwo.o 
mdefp.o mm23.o mp2.o mp2ddi.o mp2grd.o mpcdat.o mpcgrd.o mpcint.o mpcmol.o mpcmsc.o morokm.o mthlib.o nameio.o nmr.o ordint.o 
ormas1.o parley.o pcm.o pcmcav.o pcmcv2.o pcmder.o pcmdis.o pcmief.o pcmpol.o pcmvch.o prpel.o prplib.o prppop.o qeigen.o 
qfmm.o qmfm.o qrel.o raman.o rhfuhf.o rxncrd.o ryspol.o scflib.o scfmi.o scrf.o sobrt.o soffac.o solib.o sozeff.o statpt.o 
surf.o svpchg.o svpinp.o svpleb.o symorb.o symslc.o tdhf.o tdx.o tdxio.o tdxitr.o tdxni.o tdxprp.o trans.o trfdm2.o trnstn.o 
trudge.o umpddi.o vibanl.o vscf.o zapddi.o zheev.o zmatrx.o qmmm.o vbdum.o neostb.o ../ddi/libddi.a 
-lpthread /opt/intel/mkl/8.0/lib/em64t/libmkl_em64t.a /opt/intel/mkl/8.0/lib/em64t/libguide.a
/opt/intel/mkl/8.0/lib/em64t/libguide.a(z_Linux_util.o)(.text+0x1555): In function `__kmp_register_atfork':
: undefined reference to `pthread_atfork'
unset echo
0.570u 0.315s 0:00.89 98.8%     0+0k 0+0io 0pf+0w

System Information:

  • Dual Opteron
  • Rocks 4.0 (based on CentOS 4.0)
  • Intel CCE 9.0
  • Intel FCE 9.0
  • Intel MKL 8.0
  • gcc 3.2.3
3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Follow one of the examples which link against libguide and libpthreads, or use ifort -openmp to cover both of those.

I used this configuration with success :

# Define the options for the system loader 'ld'. These are
# LDR - the name of the loader (usually a compiler).
# LDOPTS - options, such as asking for a load map.
# LIBRARIES - extra system libraries which must be searched.
# BLAS - set to blas.o if not using system BLAS.
# set to blank if using system BLAS.
# VECTOR - set to vector.o on a vector processor.
# set to blank on a scalar processor.
# QUICHE - set to zunix.o if using true dynamic memory,
# possibly add other system specific objects.
# set to blank otherwise.
# --- start of machine specific options ---
if ($TARGET == amd64) then
set LDR = 'ifort'
set LDOPTS='-O2 -xP'
# set LDOPTS="$LDOPTS -fastsse -Mipa=fast,safe -Mprof=func"
set VECTOR=' '
# if (-e /usr/lib64/libblas.a) then
set LIBRARIES='-L/opt/intel/mkl/8.0/lib/em64t/ -lmkl_em64t -lguide -lpthread'
set BLAS=' '
# else
# set LIBRARIES=' '
# set BLAS='blas.o'
# endif
set QUICHE='zunix.o'
# endif

If you compiled the rest of gamess with ifort, could you share with me the compilations options you used in the "comp" script?

Leave a Comment

Please sign in to add a comment. Not a member? Join today