Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: [OMPI users] Unresolved reference 'mbind' and 'get_mempolicy'
From: Blosch, Edwin L (edwin.l.blosch_at_[hidden])
Date: 2011-09-28 11:55:59

I am getting some undefined references in building OpenMPI 1.5.4 and I would like to know how to work around it.

The errors look like this:

/scratch1/bloscel/builds/release/openmpi-intel/lib/libmpi.a(topology-linux.o): In function `hwloc_linux_alloc_membind':
topology-linux.c:(.text+0x1da): undefined reference to `mbind'
topology-linux.c:(.text+0x213): undefined reference to `mbind'
/scratch1/bloscel/builds/release/openmpi-intel/lib/libmpi.a(topology-linux.o): In function `hwloc_linux_set_area_membind':
topology-linux.c:(.text+0x414): undefined reference to `mbind'
topology-linux.c:(.text+0x46c): undefined reference to `mbind'
/scratch1/bloscel/builds/release/openmpi-intel/lib/libmpi.a(topology-linux.o): In function `hwloc_linux_get_thisthread_membind':
topology-linux.c:(.text+0x4ff): undefined reference to `get_mempolicy'
topology-linux.c:(.text+0x5ff): undefined reference to `get_mempolicy'
/scratch1/bloscel/builds/release/openmpi-intel/lib/libmpi.a(topology-linux.o): In function `hwloc_linux_set_thisthread_membind':
topology-linux.c:(.text+0x7b5): undefined reference to `migrate_pages'
topology-linux.c:(.text+0x7e9): undefined reference to `set_mempolicy'
topology-linux.c:(.text+0x831): undefined reference to `set_mempolicy'
make: *** [main] Error 1

Some configure output that is probably relevant:

checking numaif.h usability... yes
checking numaif.h presence... yes
checking for numaif.h... yes
checking for set_mempolicy in -lnuma... yes
checking for mbind in -lnuma... yes
checking for migrate_pages in -lnuma... yes

The FAQ says that I should have to give -with-libnuma explicitly, but I did not do that. Is there a problem with configure? Or the FAQ? Or perhaps the system has a configuration peculiarity?

On another system, the configure output is different, and there are no unresolved references:

checking numaif.h usability... no
checking numaif.h presence... no
checking for numaif.h... no

What is the configure option that will make the unresolved references go away?