[mpich-discuss] Default behavior of mpif90/ifort on MacOSX (MH_BUNDLE, MH_DYLIB)

Bodony, Daniel J bodony at illinois.edu
Wed Jul 24 14:42:51 CDT 2013


Hello,

After upgrading to mpich-3.0.4 today I was presented with the following error on my MacOSX 10.8.4 machine when using mpif90 (installation/compiler info at e-mail bottom).  For the simple code:

> [02:23 PM Wed Jul 24] > cat main.f90 
> Program MAIN
> 
>   Print *, "F: Hello, World!"
> 
> End Program MAIN

The compilation gives

> [02:26 PM Wed Jul 24] > mpif90 main.f90
> ld: can't link with bundle (MH_BUNDLE) only dylibs (MH_DYLIB) for architecture x86_64

and no executable is built.  Using mpif90 -link-info and chasing down the libraries I found that the bundle libmpichf90.so was being linked instead of libmpichf90.dylib (which is not created) or the static library libmpichf90.a.  (That libmpichf90.so was a bundle was confirmed using otool -hV /usr/local/lib/libmpichf90.so.) After hiding the library libmpichf90.so so the static version libmpichf90.a is used, compile proceeds normally.  

This behavior was not seen earlier when using mpich2-1.4.1 through mpich-3.0.1 (I think).

COMPILER INFO:

> [02:36 PM Wed Jul 24] > ifort -V
> Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.0.3.198 Build 20130606
> 
> [02:36 PM Wed Jul 24] > icc -V
> Intel(R) C Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.0.3.198 Build 20130606
> 
> [02:36 PM Wed Jul 24] > icpc -V
> Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.0.3.198 Build 20130606

MPICH INFO: (build used ifort/icc/icpc as above)

> [02:38 PM Wed Jul 24] > head config.log
> This file contains any messages produced by compilers while
> running configure, to aid debugging if configure makes a mistake.
> 
> It was created by MPICH configure 3.0.4, which was
> generated by GNU Autoconf 2.69.  Invocation command line was
> 
>   $ ./configure --enable-f77 --enable-fc --enable-cxx --enable-shared --enable-romio --enable-mpe

Cheers,
Dan

--
Daniel J. Bodony
Associate Professor of Aerospace Engineering
Affiliate Professor of Mechanical Science & Engineering
University of Illinois at Urbana-Champaign




More information about the discuss mailing list