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 <mahmood...@gmail.com>
wrote:

> 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
> MPI2=/export/apps/siesta/openmpi-1.8.8/lib/libmpi_usempi.a
> BLAS_LIBS=../libopenblas.a
> SCALAPACK_LIBS=../libscalapack.a
> LIBS=$(SCALAPACK_LIBS) $(BLAS_LIBS) $(MPI1) $(MPI2)
>
>
>
>
> The output of "make" is:
>
> /export/apps/siesta/openmpi-1.8.8/bin/mpifort -o transiesta \
>                -static automatic_cell.o ...<OMITTED LIB NAMES>.....
> libmpi_f90.a
>               `FoX/FoX-config --libs --wcml` ../libscalapack.a
> ../libopenblas.a  /export/apps/siesta/openmpi-1.8.8/lib/libmpi_mpifh.a
> /export/apps/siesta/openmpi-1.8.8/lib/libmpi_usempi.a
> /export/apps/siesta/openmpi-1.8.8/lib/libopen-pal.a(dl_dlopen_module.o):
> In function `dlopen_open':
> dl_dlopen_module.c:(.text+0x473): warning: Using 'dlopen' in statically
> linked applications requires at runtime the shared libraries from the glibc
> version used for linking
> /usr/bin/ld: cannot find -libverbs
> collect2: ld returned 1 exit status
>
>
>
>
> If I drop -static, the error is gone... However, ldd command shoes that
> binary can not access those two MPI libraries.
>
>
> Regards,
> Mahmood
>
>
>
_______________________________________________
users mailing list
users@lists.open-mpi.org
https://rfd.newmexicoconsortium.org/mailman/listinfo/users

Reply via email to