Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] libnuma under ompi 1.3
From: Prentice Bisbal (prentice_at_[hidden])
Date: 2009-03-04 10:32:03


Terry Frankcombe wrote:
> Having just downloaded and installed Open MPI 1.3 with ifort and gcc, I
> merrily went off to compile my application.
>
> In my final link with mpif90 I get the error:
>
> /usr/bin/ld: cannot find -lnuma
>
> Adding --showme reveals that
>
> -I/home/terry/bin/Local/include -pthread -I/home/terry/bin/Local/lib
>
> is added to the compile early in the aggregated ifort command, and
>
> -L/home/terry/bin/Local/lib -lmpi_f90 -lmpi_f77 -lmpi -lopen-rte
> -lopen-pal -lpbs -lnuma -ldl -Wl,--export-dynamic -lnsl -lutil -lm -ldl
>
> is added to the end.
>
> I note than when compiling Open MPI -lnuma was visible in the gcc
> arguments, with no added -L.
>
> On this system libnuma.so exists in /usr/lib64. My (somewhat long!)
> configure command was
>
> ./configure --enable-static --disable-shared
> --prefix=/home/terry/bin/Local --enable-picky --disable-heterogeneous
> --without-slurm --without-alps --without-xgrid --without-sge
> --without-loadleveler --without-lsf F77=ifort
>
>
> Should mpif90 have bundled a -L/usr/lib64 in there somewhere?
>
> Regards
> Terry
>
>

I had the same exact problem with my PGI compilers, (no problems
reported yet with my intel compilers). I have a fix for you.

You would think that the compiler would automatically look in
/usr/lib64, since that's one of the system's default lib directories,
but the PGI compilers don't for some reason.

A quick fix is to do

OMPI_LDFLAGS="-L/usr/lib64"

or

OMPI_MPIF90_LDFLAGS="-L/usr/lib64"

A more permanent fix is to edit
INSTALL_DIR/share/openmpi/mpif90-wrapper-data.txt

and change

linker_flags=

to

linker_flags=-L/usr/lib64

In my case, I also had to add the OpenMPI lib directory for the PGI
compilers, too. You may or may not need to add them, too:

linker_flags=-L/usr/lib64 -L/usr/local/openmpi/pgi/x86_64/lib

You may want to test all your compilers and makea similar change to all
your *wrapper-data.txt files

Not sure if this is a problem with the compilers not picking up the
system's lib dirs, or an OpenMPI configuration/build problem.

-- 
Prentice