Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] How do you get static linkage for Intel compiler libsfor the orterun executable?
From: Blosch, Edwin L (edwin.l.blosch_at_[hidden])
Date: 2009-11-11 09:49:25


Thanks for the reply, Jeff,

I think -i-static is an Intel 9 option, but unfortunately it didn't make a difference switching to -static-intel:

libtool: link: /appserv/intel/cce/10.1.021/bin/icc -DNDEBUG -finline-functions -fno-strict-aliasing -restrict -pthread -fvisibility=hidden -g -static-intel -o .libs/orterun main.o orterun.o debuggers.o -Wl,--export-dynamic ../../../orte/.libs/libopen-rte.so /home/bloscel/builds/openmpi/opal/.libs/libopen-pal.so -ldl -lnsl -lutil -pthread -Wl,-rpath -Wl,/release/cfd/openmpi-intel/lib
/appserv/intel/cce/10.1.021/lib/libimf.so: warning: warning: feupdateenv is not implemented and will always fail

The option is passed, but ldd gives:

ldd ./orterun
        libopen-rte.so.0 => <some path>/lib/libopen-rte.so.0 (0x00002b1cd4a01000)
        libopen-pal.so.0 => <some path>/lib/libopen-pal.so.0 (0x00002b1cd4ba9000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00002b1cd4d5f000)
        libnsl.so.1 => /lib64/libnsl.so.1 (0x00002b1cd4e63000)
        libutil.so.1 => /lib64/libutil.so.1 (0x00002b1cd4f7a000)
        libm.so.6 => /lib64/libm.so.6 (0x00002b1cd507d000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002b1cd51d2000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b1cd52e0000)
        libc.so.6 => /lib64/libc.so.6 (0x00002b1cd53f9000)
        /lib64/ld-linux-x86-64.so.2 (0x00002b1cd48e5000)
        libimf.so => not found
        libsvml.so => not found
        libintlc.so.5 => not found
        libimf.so => not found
        libsvml.so => not found
        libintlc.so.5 => not found

The Intel libs are listed twice. I presume that means something.

Is it possible that the -static-intel option needs to be somewhere different within the link line? Is it possible that open-rte.so or open-pal.so require libimf.so instead of libimf.a?

Thanks

> -----Original Message-----
> From: users-bounces_at_[hidden] [mailto:users-bounces_at_[hidden]] On
> Behalf Of Jeff Squyres
> Sent: Tuesday, November 10, 2009 4:27 PM
> To: Open MPI Users
> Subject: Re: [OMPI users] How do you get static linkage for Intel compiler
> libsfor the orterun executable?
>
> I'm away from icc help resources, but try the -static-intel compiler
> flag.
>
>
> On Nov 10, 2009, at 2:51 PM, Blosch, Edwin L wrote:
>
> > I'm trying to build OpenMPI with Intel compilers, both static and
> > dynamic libs, then move it to a system that does not have Intel
> > compilers. I don't care about system libraries or OpenMPI loadable
> > modules being dynamic, that's all fine. But I need the compiler
> > libs to be statically linked into any executable.
> >
> > I don't seem to be smart enough to figure out how to get the Intel
> > libs statically linked into the "orterun" command.
> >
> > Can someone help suggest the right way to achieve this?
> >
> > Here's my configure command and the relevant output from the "make"
> > inside tools/orterun. Notice that I am passing -i-static in
> > LDFLAGS, and it does indeed appear to have made it into the link
> > line for orterun. It just didn't have the desired effect. A
> > subsequent 'ldd' shows that there is still a dependency on the
> > libimf.so.
> >
> > Thanks
> >
> > ./configure
> > --prefix=/release/cfd/openmpi-intel
> > --enable-mpirun-prefix-by-default
> > --enable-contrib-no-build=vt
> > --disable-per-user-config-files
> > --enable-mca-no-build=maffinity
> > --enable-static
> > --without-openib
> > --without-tm
> > --with-mpi-f90-size=small
> > 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 -fpe0 -no-ftz -traceback -O2'
> > FC=/appserv/intel/fce/10.1.021/bin/ifort
> > 'FCFLAGS=-D_GNU_SOURCE -fpe0 -no-ftz -traceback -O2'
> > 'LDFLAGS= -i-static'
> >
> >
> >
> > make[2]: Entering directory `/home/bloscel/builds/openmpi/orte/tools/
> > orterun'
> > depbase=`echo main.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> > /appserv/intel/cce/10.1.021/bin/icc -DHAVE_CONFIG_H -I. -I../../../
> > opal/include -I../../../orte/include -I../../../ompi/include -
> > I../../../opal/mca/paffinity/linux/plpa/src/libplpa -I../../.. -
> > DNDEBUG -finline-functions -fno-strict-aliasing -restrict -pthread -
> > fvisibility=hidden -g -MT main.o -MD -MP -MF $depbase.Tpo -c -o
> > main.o main.c &&\
> > mv -f $depbase.Tpo $depbase.Po
> > depbase=`echo orterun.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> > /appserv/intel/cce/10.1.021/bin/icc -DHAVE_CONFIG_H -I. -I../../../
> > opal/include -I../../../orte/include -I../../../ompi/include -
> > I../../../opal/mca/paffinity/linux/plpa/src/libplpa -I../../.. -
> > DNDEBUG -finline-functions -fno-strict-aliasing -restrict -pthread -
> > fvisibility=hidden -g -MT orterun.o -MD -MP -MF $depbase.Tpo -c -o
> > orterun.o orterun.c &&\
> > mv -f $depbase.Tpo $depbase.Po
> > depbase=`echo debuggers.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> > /appserv/intel/cce/10.1.021/bin/icc -DHAVE_CONFIG_H -I. -I../../../
> > opal/include -I../../../orte/include -I../../../ompi/include -
> > I../../../opal/mca/paffinity/linux/plpa/src/libplpa -I../../.. -
> > DNDEBUG -finline-functions -fno-strict-aliasing -restrict -pthread -
> > fvisibility=hidden -g -MT debuggers.o -MD -MP -MF $depbase.Tpo -c -o
> > debuggers.o debuggers.c &&\
> > mv -f $depbase.Tpo $depbase.Po
> > /bin/sh ../../../libtool --tag=CC --mode=link /appserv/intel/cce/
> > 10.1.021/bin/icc -DNDEBUG -finline-functions -fno-strict-aliasing -
> > restrict -pthread -fvisibility=hidden -g -export-dynamic -i-
> > static -o orterun main.o orterun.o debuggers.o ../../../orte/
> > libopen-rte.la -lnsl -lutil
> > libtool: link: /appserv/intel/cce/10.1.021/bin/icc -DNDEBUG -finline-
> > functions -fno-strict-aliasing -restrict -pthread -
> > fvisibility=hidden -g -i-static -o .libs/orterun main.o orterun.o
> > debuggers.o -Wl,--export-dynamic ../../../orte/.libs/libopen-
> > rte.so /home/bloscel/builds/openmpi/opal/.libs/libopen-pal.so -ldl -
> > lnsl -lutil -pthread -Wl,-rpath -Wl,/release/cfd/openmpi-intel/lib
> > /appserv/intel/cce/10.1.021/lib/libimf.so: warning: warning:
> > feupdateenv is not implemented and will always fail
> >
> >
> >
> > _______________________________________________
> > users mailing list
> > users_at_[hidden]
> > http://www.open-mpi.org/mailman/listinfo.cgi/users
>
>
> --
> Jeff Squyres
> jsquyres_at_[hidden]
>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users