Re: [OMPI users] static linking MPI libraries with applications

2016-09-15 Thread Jeff Squyres (jsquyres)
If you want to build statically with verbs support, it's tricky. Per the FAQ: 37. I get bizarre linker warnings / errors / run-time faults when I try to compile my OpenFabrics MPI application statically. How do I fix this? Fully static linking is not for the weak, and is not recommended. But

Re: [OMPI users] static linking MPI libraries with applications

2016-09-14 Thread Reuti
Am 14.09.2016 um 20:09 schrieb Mahmood Naderan: > ​I installed libibverb-devel-static.x86_64 via yum > > > root@cluster:tpar# yum list libibverb* > Installed Packages > libibverbs.x86_64 1.1.8-4.el6 >@base > libibverbs-devel.x86_64

Re: [OMPI users] static linking MPI libraries with applications

2016-09-14 Thread Mahmood Naderan
Good news :) >If I drop -static, the error is gone... However, ldd command shoes that binary can not access those two MPI libraries. In the previous installation, I kept both .so and .a files. Therefore, it first searched for .so files and that was the reason why ldd failed. Forget about

Re: [OMPI users] static linking MPI libraries with applications

2016-09-14 Thread Mahmood Naderan
​I installed libibverb-devel-static.x86_64 via yum root@cluster:tpar# yum list libibverb* Installed Packages libibverbs.x86_64 1.1.8-4.el6@base libibverbs-devel.x86_64 1.1.8-4.el6@base libibverbs-devel-static.x86_64 1.1.8-4.el6

Re: [OMPI users] static linking MPI libraries with applications

2016-09-14 Thread Reuti
> Am 14.09.2016 um 19:12 schrieb Mahmood Naderan : > > So, I used > > ./configure --prefix=/export/apps/siesta/openmpi-1.8.8 > --enable-mpirun-prefix-by-default --enable-static --disable-shared > --disable-dlopen > > and added -static to LDFLAGS, but I get: > >

Re: [OMPI users] static linking MPI libraries with applications

2016-09-14 Thread Mahmood Naderan
So, I used ./configure --prefix=/export/apps/siesta/openmpi-1.8.8 --enable-mpirun-prefix-by-default --enable-static --disable-shared --disable-dlopen and added -static to LDFLAGS, but I get: /export/apps/siesta/openmpi-1.8.8/bin/mpifort -o transiesta -static libfdf.a libSiestaXC.a \

Re: [OMPI users] static linking MPI libraries with applications

2016-09-14 Thread Reuti
> Am 14.09.2016 um 15:05 schrieb Gilles Gouaillardet > : > > in this case, you should configure OpenMPI with > --disable-shared --enable-static --disable-dlopen > > then you can manually run the mpifort link command with --showme, > so you get the fully expanded

Re: [OMPI users] static linking MPI libraries with applications

2016-09-14 Thread Gilles Gouaillardet
Mahmood, i meant --disable-dlopen i am not aware of a --disable-dl-dlopen option, which does not mean it does not exist Cheers, Gilles On Wednesday, September 14, 2016, Mahmood Naderan wrote: > Do you mean --disable-dl-dlopen? The last lines of configure are > > +++

Re: [OMPI users] static linking MPI libraries with applications

2016-09-14 Thread Bennet Fauber
Mahmood, See Gilles's subsequent reply which contains more details, but, no, I think we mean --disable-dlopen. configure recognizes two negations of a feature, which you can see from the ./configure --help output --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)

Re: [OMPI users] static linking MPI libraries with applications

2016-09-14 Thread Mahmood Naderan
Do you mean --disable-dl-dlopen? The last lines of configure are +++ Configuring MCA framework dl checking for no configure components in framework dl... checking for m4 configure components in framework dl... libltdl, dlopen --- MCA component dl:dlopen (m4 configuration macro, priority 80)

Re: [OMPI users] static linking MPI libraries with applications

2016-09-14 Thread Gilles Gouaillardet
in this case, you should configure OpenMPI with --disable-shared --enable-static --disable-dlopen then you can manually run the mpifort link command with --showme, so you get the fully expanded gfortran link command. then you can edit this command, and non system libs (e.g. lapack, openmpi,

Re: [OMPI users] static linking MPI libraries with applications

2016-09-14 Thread Bennet Fauber
Mahmood, It looks like it is dlopen that is complaining. What happens if --disable-dlopen? On Wed, Sep 14, 2016 at 8:34 AM, Mahmood Naderan wrote: > Well I want to omit LD_LIBRARY_PATH. For that reason I am building the > binary statically. > >> note this is not required

Re: [OMPI users] static linking MPI libraries with applications

2016-09-14 Thread Mahmood Naderan
Well I want to omit LD_LIBRARY_PATH. For that reason I am building the binary statically. > note this is not required when Open MPI is configure'd with >--enable-mpirun-prefix-by-default I really did that. Using Rocks-6, I installed the application and openmpi on the shared file system (/export).

Re: [OMPI users] static linking MPI libraries with applications

2016-09-14 Thread Gilles Gouaillardet
Mahmood, try to prepend /export/apps/siesta/openmpi-1.8.8/lib to your $LD_LIBRARY_PATH note this is not required when Open MPI is configure'd with --enable-mpirun-prefix-by-default Cheers, Gilles On Wednesday, September 14, 2016, Mahmood Naderan wrote: > Hi, > Here

[OMPI users] static linking MPI libraries with applications

2016-09-14 Thread Mahmood Naderan
Hi, Here is the problem with statically linking an application with a program. by specifying the library names: FC=/export/apps/siesta/openmpi-1.8.8/bin/mpifort FFLAGS=-g -Os FPPFLAGS= -DMPI -DFC_HAVE_FLUSH -DFC_HAVE_ABORT LDFLAGS=-static MPI1=/export/apps/siesta/openmpi-1.8.8/lib/libmpi_mpifh.a