Re: [OMPI users] EXTERNAL: Re: Unresolved reference 'mbind' and 'get_mempolicy'

2011-09-29 Thread Blosch, Edwin L
Jeff, Bruce, Reuti, all:

If I add --without-hwloc in addition to --without-libnuma, then it builds.  Is 
that a reasonable thing to do?  Is there a better workaround?  This 'hwloc' 
module looks like it might be important.

For what it's worth, if there's something wrong with my configure line, let me 
know what to improve. Otherwise, as weird as "--enable-mca-no-build=maffinity 
--disable-io-romio --enable-static --disable-shared" may look, I am not trying 
to build fully static binaries. I have unavoidable need to build OpenMPI on 
certain machines and then transfer the executables to other machines that are 
compatable but not identical, and over the years these are the minimal set of 
configure flags necessary to make that possible. I may revisit these choices at 
some point, but if they are supposed to work, then I'd rather just keep using 
them.

Thanks again,

Ed


-Original Message-
From: users-boun...@open-mpi.org [mailto:users-boun...@open-mpi.org] On Behalf 
Of Blosch, Edwin L
Sent: Wednesday, September 28, 2011 4:02 PM
To: Open MPI Users
Subject: Re: [OMPI users] EXTERNAL: Re: Unresolved reference 'mbind' and 
'get_mempolicy'

Jeff,  

I've tried it now adding --without-libnuma.  Actually that did NOT fix the 
problem, so I can send you the full output from configure if you want, to 
understand why this "hwloc" function is trying to use a function which appears 
to be unavailable.  The answers to some of your questions:

The configure command was this:

./configure --prefix=/release/cfd/openmpi-intel --without-tm --without-sge 
--without-lsf --without-psm --without-portals --without-elan --without-slurm 
--without-loadleveler --without-libnuma --enable-mpirun-prefix-by-default 
--enable-contrib-no-build=vt --enable-mca-no-build=maffinity 
--disable-per-user-config-files --disable-io-romio --enable-static 
--disable-shared --without-openib CXX=/appserv/intel/cce/10.1.021/bin/icpc 
CC=/appserv/intel/cce/10.1.021/bin/icc 'CFLAGS=  -O2' 'CXXFLAGS=  -O2' 
F77=/appserv/intel/fce/10.1.021/bin/ifort 'FFLAGS=-D_GNU_SOURCE -traceback  
-O2' FC=/appserv/intel/fce/10.1.021/bin/ifort 'FCFLAGS=-D_GNU_SOURCE -traceback 
 -O2' 'LDFLAGS= -static-intel

The error messages upon linking the application are unchanged:  
> /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'

Re: NUMA:  It appears there is a /usr/lib64/libnuma.so but no static version. 
There is /usr/include/numa.h and /usr/include/numaif.h.

I don't understand about make V=1. What tree? Somewhere in the OpenMPI build, 
or in the application compilation itself? Is "V=1" something in the OpenMPI 
makefile structure?

Thanks,

Ed

-Original Message-
From: users-boun...@open-mpi.org [mailto:users-boun...@open-mpi.org] On Behalf 
Of Jeff Squyres
Sent: Wednesday, September 28, 2011 11:05 AM
To: Open MPI Users
Subject: EXTERNAL: Re: [OMPI users] Unresolved reference 'mbind' and 
'get_mempolicy'

Yowza; that sounds like a configury bug.  :-(

What line were you using to configure Open MPI?  Do you have libnuma installed? 
 If so, do you have the .h and .so files?  Do you have the .a file?

Can you send the last few lines of output from a failed "make V=1" in that 
tree?  (it'll show us the exact commands used to compile/link, etc.)


On Sep 28, 2011, at 11:55 AM, Blosch, Edwin L wrote:

> 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
>  
> S ome  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

Re: [OMPI users] EXTERNAL: Re: Unresolved reference 'mbind' and 'get_mempolicy'

2011-09-29 Thread Brice Goglin
Le 28/09/2011 23:02, Blosch, Edwin L a écrit :
> Jeff,  
>
> I've tried it now adding --without-libnuma.  Actually that did NOT fix the 
> problem, so I can send you the full output from configure if you want, to 
> understand why this "hwloc" function is trying to use a function which 
> appears to be unavailable.

This function is likely available... in the dynamic version of libnuma
(that's why configure is happy), but make is probably trying to link
with the static version which isn't available on your machine. That's my
guess, at least.

> I don't understand about make V=1. What tree? Somewhere in the OpenMPI build, 
> or in the application compilation itself? Is "V=1" something in the OpenMPI 
> makefile structure?

Instead of doing
  ./configure ...
  make
do
  ./configure 
  make V=1

It will make the output more verbose. Once you get the failure, please
send the last 15 lines or so. We will look at these verbose lines to
understand how things are being compiled (which linker flags, which
libraries, ...)

Brice



[OMPI users] MPIRUN + Environtment Variable

2011-09-29 Thread Xin Tong
I need to set up some environment variables before I run my application (
appA ). I am currently using mpirun -np 1 -host socrates (socrates is
another machine) appA. Before appA runs, it expects
some environment variables to be set up. How do i do that ?


Thanks

Xin