Link error building OpenMPI 1.5.1 with PGI Server 2011

Hi,

I’m getting a link error trying to build OpenMPI 1.5.1 with PGI Server 11.1 on Oracle Enterprise Linux 5.4.

configure command:

cd /tmp/openmpi-1.5.1/build

env CC=pgcc FC=pgfortran F77=pgfortran CXX=pgcpp CFLAGS=-fast FFLAGS=-fast CXXFLAGS=-fast …/configure --prefix=/shared_apps/pgi/linux86-64/11.1/mpi/openmpi

<snip>
make[2]: Entering directory `/tmp/mpi/openmpi-1.5.1/build/opal'
  CC     class/opal_bitmap.lo
  CC     class/opal_free_list.lo
  CC     class/opal_hash_table.lo
  CC     class/opal_list.lo
  CC     class/opal_object.lo
  CC     class/opal_graph.lo
  CC     class/opal_atomic_lifo.lo
  CC     class/opal_pointer_array.lo
  CC     class/opal_value_array.lo
  CC     memoryhooks/memory.lo
  CC     runtime/opal_progress.lo
  CC     runtime/opal_finalize.lo
  CC     runtime/opal_init.lo
  CC     runtime/opal_params.lo
  CC     runtime/opal_cr.lo
  CC     threads/condition.lo
  CC     threads/mutex.lo
  CC     threads/thread.lo
  CC     threads/tsd.lo
  CC     dss/dss_internal_functions.lo
  CC     dss/dss_compare.lo
  CC     dss/dss_copy.lo
  CC     dss/dss_dump.lo
  CC     dss/dss_get.lo
  CC     dss/dss_load_unload.lo
  CC     dss/dss_lookup.lo
  CC     dss/dss_pack.lo
  CC     dss/dss_peek.lo
  CC     dss/dss_print.lo
  CC     dss/dss_register.lo
  CC     dss/dss_release.lo
  CC     dss/dss_set.lo
  CC     dss/dss_set_buffer_type.lo
  CC     dss/dss_size.lo
  CC     dss/dss_unpack.lo
  CC     dss/dss_open_close.lo
  CCLD   libopen-pal.la
/usr/bin/ld: /shared_apps/pgi/linux86-64/11.1/lib/libpgbind.a(bindsa.o): relocation R_X86_64_PC32 against `syscall@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
make[2]: *** [libopen-pal.la] Error 2
make[2]: Leaving directory `/tmp/mpi/openmpi-1.5.1/build/opal'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/mpi/openmpi-1.5.1/build/opal'
make: *** [all-recursive] Error 1

I’ve tried adding -fPIC to each of the compiler flags, e.g.
CFLAGS="-fast -fPIC"
but it doesn’t seem to make any difference.


I’ve also tried PGI Server installed as both a network install with the main installation on an NFS mount /shared_apps and the local files in /usr/pgi/shared_objects and as a normal install with everything in /shared_apps but each time I get this link error on libpgbind.a


OpenMPI configures and builds OK with GCC (no compiler parameters on the configure line).

Do I have the correct compiler parameters for 11.1 ?
I’ve seen previous versions specify F77=pgf77 rather than pgfortran ?


Any ideas would be appreciated.

Hi John,

As part of the the 11.0 release, we started to link in our OpenMP libraries by default. libpgbind handles the core and memory binding on NUMA based systems. However, we failed to get the correct fpic version of libpgbind.a when creating shared libraries.

This problem will go away in this week’s 11.2 release since we’re able to move this functionality elsewhere and remove the libpgbind library altogether. In the mean time add the flag “-nomp” to your link to remove this library.

Hope this helps,
Mat

Hi Mat,
thanks for the quick reply.

I’m not entirely clear on what you mean here.

Where exactly do I add this flag ? to the configure line ? or as a CFLAG/FFLAG parameter to pass to the compiler ?


thanks,
John

Hi John,

I haven’t built OpenMPI myself in a while now, but you should be able to set LDFLAG to “-nomp” to have it added to the link line. Adding it to both CFLAG and FFLAG would work as well since -nomp will be accepted by the compilers during link but only effect the link.

  • Mat

Hi,

I’ve tried to rebuild this several times with:

CFLAGS="-fast -nomp" ... etc



CFLAGS="-fast -fPIC -nomp" ... etc



CFLAGS="-fast" ... etc ... LDFLAGS=-nomp

But each time, although I see -nomp is applied during the configure step, the make fails in exactly the same way.

Looks like I’ll just nee to wait until 11.2 is released.
Do you know which date it’s scheduled to appear ?


thanks,
John

Came across exactly the same problem this week. As OpenMPI built without problems with PGI 10.3 & 10.9 figured it was something to with 11.1. Going to wait for the next release & try again then.