undefined reference to .LB2480 / .LB2486

Would you normally expect linking errors when using the higher compiler optimisation levels?

I’m building IMB 3.1 / 3.2 with MVAPICH2 1.4 and PGI 10.0 on a 64-bit RHEL5.4 system. The default makefile uses an optimisation level of “-O2”, which generates the following error:

/scratch/issmcd/m/bin/mpicc -o IMB-IO IMB.o IMB_declare.o IMB_init.o IMB_mem_manager.o IMB_init_file.o IMB_benchlist.o IMB_parse_name_io.o IMB_strgs.o IMB_user_set_info.o IMB_cpu_exploit.o IMB_err_handler.o IMB_g_info.o IMB_warm_up.o IMB_output.o IMB_open_close.o IMB_write.o IMB_read.o IMB_init_transfer.o IMB_chk_diff.o
IMB_output.o:(.debug_info+0x1060): undefined reference to .LB2480' IMB_output.o:(.debug_info+0x1068): undefined reference to .LB2486’

This error disappears when using “-O1” or lower.

IMB_output.o is generated from:

/scratch/issmcd/m/bin/mpicc -I/scratch/issmcd/m/include -DMPIIO -O2 -c IMB_output.c

Which does a:

pgcc -g -I/scratch/issmcd/m/include -DMPIIO -O2 -c IMB_output.c -I/scratch/issmcd/m/include

Which does:

/apps/compilers/pgi/10.0/1/linux86-64/10.0/bin/pgc IMB_output.c -debug -x 120 0x200 -opt 2 -x 119 0xa10000 -x 122 0x40 -x 123 0x1000 -x 127 4 -x 127 17 -x 19 0x400000 -x 28 0x40000 -x 120 0x10000000 -x 70 0x8000 -x 122 1 -quad -x 59 4 -x 59 4 -tp nehalem-64 -astype 0 -stdinc /apps/compilers/pgi/10.0/1/linux86-64/10.0/include:/usr/local/include:/usr/lib/gcc/x86_64-redhat-linux/4.1.2/include:/usr/lib/gcc/x86_64-redhat-linux/4.1.2/include:/usr/include -def unix -def __unix -def unix -def linux -def __linux -def linux -def __NO_MATH_INLINES -def x86_64 -def LONG_MAX=9223372036854775807L -def ‘SIZE_TYPE=unsigned long int’ -def ‘PTRDIFF_TYPE=long int’ -def __THROW= -def extension= -def amd64 -def SSE -def MMX -def SSE2 -def SSE3 -def SSSE3 -predicate ‘#machine(x86_64) #lint(off) #system(posix) #cpu(x86_64)’ -idir /scratch/issmcd/m/include -idir /scratch/issmcd/m/include -def MPIIO -cmdline ‘+pgcc IMB_output.c -v -g -I/scratch/issmcd/m/include -DMPIIO -O2 -c -I/scratch/issmcd/m/include’ -x 123 0x80000000 -x 123 4 -x 119 0x20 -alwaysinline /apps/compilers/pgi/10.0/1/linux86-64/10.0/lib/libintrinsics.il 4 -x 120 0x200000 -asm /tmp/pgcc6iDbUda95i8A.s
PGC-I-0222-Redundant definition for symbol __THROW (/usr/include/sys/cdefs.h: 63)
PGC-I-0222-Redundant definition for symbol extension (/usr/include/sys/cdefs.h: 287)
PGC/x86-64 Linux 10.0-1: compilation completed with informational messages

/usr/bin/as /tmp/pgcc6iDbUda95i8A.s -I/scratch/issmcd/m/include -I/scratch/issmcd/m/include -o IMB_output.o
Unlinking /tmp/pgcc6iDbUda95i8A.s

Looking at the temporary assembler file, it looks like the symbols are being used but not being defined.

Hi Mark,

These are compiler debug labels that are most likely being optimized away. To work around, try removing “-g” from your MVAPICH compilation flags. If you do want to keep debugging enabled, changing “-g” to “-gopt” might work as well.

I’d like to try and recreate the issue here. Is IMB publicly available? If so, can you post a pointer? Unfortunately, a simple search of “IMB” yield too many extraneous results.

Thanks,
Mat

Thanks Mat, I’ll have a play with -g - and see why MVAPICH2 is specifying it in the first place.

IMB is available from:

MVAPICH2 is available from:

http://mvapich.cse.ohio-state.edu/

I’ve been building MVAPICH2 for our InfiniBand cluster (OFED 1.4.1) with configure arguments:

./configure --with-rdma=gen2 --enable-sharedlibs=gcc --enable-romio --with-file-system=lustre+ufs+nfs


All the best,

Mark

Hi Mat, I can provide an environment for you which reproduces this issue if you would like to see first hand. lmk.

Thanks Jason, but I was able to recreate the problem here and have sent it to our engineers as TPR#16589.

Note that the error can also be worked around by adding “-fast” to the OPTFLAGS and LDFLAGS or changing “-g” to “-gopt”.

  • Mat

Jason,

We believe TPR 16589 has been corrected in the current 10.3 release.

regards,
dave

Dave, thank you for the update. i’ll upgrade to 10.3 and fire off a ofed build.

Jason