[mpich-discuss] Compile Fortran code with -static

Rajeev Thakur thakur at mcs.anl.gov
Sat Nov 8 10:39:55 CST 2014


If you don't need to use the MPI-IO functions, try configuring with --disable-romio.

Rajeev

On Nov 8, 2014, at 9:58 AM, Shuchi Yang <yang.shuchi at gmail.com> wrote:

> 1) At Ubuntu 14.04, Intel Fortran 2015 xe
>    Download mpich-3.13
>    It works well with general purpose 
> 2) I need compile the fortran code with -static to run on machine without Intel Fortran environment so I use -static option to compile both MPICH and FORTRAN code. I met the following error 
> 
>     /mpich/lib/libmpi.a(lib_libmpi_la-tcp_init.o): In function `MPID_nem_tcp_get_business_card':
> src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c:(.text+0x319): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
> /mpich/lib/libmpi.a(ad_iwrite.o): In function `ADIOI_GEN_IwriteContig':
> adio/common/ad_iwrite.c:(.text+0xb7): undefined reference to `aio_write64'
> /mpich/lib/libmpi.a(ad_iwrite.o): In function `ADIOI_GEN_aio':
> adio/common/ad_iwrite.c:(.text+0x2dc): undefined reference to `aio_write64'
> adio/common/ad_iwrite.c:(.text+0x2e6): undefined reference to `aio_read64'
> /mpich/lib/libmpi.a(ad_iwrite.o): In function `ADIOI_GEN_aio_poll_fn':
> adio/common/ad_iwrite.c:(.text+0x4d0): undefined reference to `aio_error64'
> adio/common/ad_iwrite.c:(.text+0x4f0): undefined reference to `aio_return64'
> /mpich/lib/libmpi.a(ad_iwrite.o): In function `ADIOI_GEN_aio_wait_fn':
> adio/common/ad_iwrite.c:(.text+0x65d): undefined reference to `aio_suspend64'
> adio/common/ad_iwrite.c:(.text+0x6a0): undefined reference to `aio_error64'
> adio/common/ad_iwrite.c:(.text+0x6b5): undefined reference to `aio_return64'
> 
>     I tried to link librt.a and libaio.a, it does not work with the following option:
>      -L/usr/lib/x86_64-linux-gnu -lrt -laio
> 
>     Any comments and suggestion will be welcome.
> 
> Shuchi 
> 
> _______________________________________________
> discuss mailing list     discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss

_______________________________________________
discuss mailing list     discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss


More information about the discuss mailing list