Undefined References in "trace_init.o" and "i

In the process of linking some code, I encountered the following undefined references (using PGI compilers 7.2-4):

undefined reference to `__pgi_abort_init’

undefined reference to `__pgi_ctrl_init’

undefined reference to `_mp_preinit’

Can anybody shed any light on how to correct this?


Hi cc,

How are you linking you’re code? These symbols are included in the PGI C runtime library “libpgc.[a,so]” which gets linked automatically when linking using one of the PGI drivers, so I’m not sure why you’d be missing them.

  • Mat

Thanks for replying, Mat. That is what I thought … that these symbols should be getting linked internally/automatically. Could it be a problem with the way PGI has been installed on our systems or a conflicting PGI driver?

The following is a command line ‘dump’ by using the “-v” switch:

  • /usr/bin/ld /usr/lib64/crt1.o /usr/lib64/crti.o /apps/pgi/linux86-64/7.2-4/libso/trace_init.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtbegin.o /apps/pgi/linux86-64/7.2-4/libso/initmp.o /apps/pgi/linux86-64/7.2-4/libso/f90main.o -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /apps/pgi/linux86-64/7.2-4/lib/pgi.ld -L/apps/ansys_inc/v110/ansys/hpmpi/linop64/lib/linux_amd64 -L/apps/ansys_inc/v110/ansys/lib/linop64 -L/apps/ansys_inc/v110/ansys/syslib/linop64 -L/apps/ansys_inc/v110/commonfiles/Tcl/lib/linop64 -L/usr/lib64 -L/usr/X11R6/lib64 -L/apps/pgi/linux86-64/7.2-4/libso -L/apps/pgi/linux86-64/7.2-4/lib -L/usr/lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -Bdynamic -relax /apps/ansys_inc/v110/ansys/customize/user/linop64/ansys.o /apps/ansys_inc/v110/ansys/customize/user/linop64/mainan.o ansMPIComm.o ansMPIFortranCall.o usermat3d.o /apps/ansys_inc/v110/ansys/customize/user/linop64/UserLink.o /apps/ansys_inc/v110/ansys/customize/user/linop64/xml_labutils.o -ldsp -lhpmpio -lhpmpi -ldl --start-group /apps/ansys_inc/v110/ansys/syslib/linop64/liblapack.a -lansys1 -lansys2 -lansys3 -lansys4 -lansysb -lansysx -lcadoe_core -lmnf -lcif -lacml -lC -lstd -lz -lpng -ltiff -ljpeg --end-group -ldl -lGLU -lGL -lpthread -lXm -lXp -lXt -lXext -lXi -lX11 -lSM -lICE -rpath /apps/pgi/linux86-64/7.2-4/libso -rpath /apps/pgi/linux86-64/7.2-4/lib -o ansyscustdis.e110.Eload -lpgmp -lpgbind -lnuma -lpthread -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl -lnspgc -lpgc -lrt -lpthread -lm -lgcc -lc -lgcc /usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtend.o /usr/lib64/crtn.o
    /apps/pgi/linux86-64/7.2-4/libso/trace_init.o(.init+0x1): undefined reference to __pgi_abort_init' /apps/pgi/linux86-64/7.2-4/libso/trace_init.o(.init+0x6): undefined reference to __pgi_ctrl_init’
    /apps/pgi/linux86-64/7.2-4/libso/initmp.o(.init+0x1): undefined reference to `_mp_preinit’
    pgf90-Fatal-linker completed with exit code

Thanks in advance for your response,

Hi cc,

ANSYS bundles the PGI runtime with their source. I believe what happening is that the linker is picking up the bundled runtime (in the “ansys/syslib/linop64” directory) and not the 7.2-4 versions. Please check with ANSYS, what version of PGI they recommend and/or if you can replace the runtime they ship with 7.2-4.

  • Mat

Thanks for your help, Mat.

Your suspicion was correct … the mismatch between the ANSYS-bundled PGI version and the 7.2-4 version of PGI that I am using was causing the conflict in the undefined reference symbols.