[mpich-discuss] Compiling shared libraries with Fortran 77 compiler and unexpected option

Thomas Jahns jahns at dkrz.de
Wed Sep 7 12:02:15 CDT 2011


On 09/07/2011 04:22 PM, Dave Goodell wrote:
> On Sep 7, 2011, at 4:20 AM CDT, Thomas Jahns wrote:
> 
> I'm not 100% sure that I understand what you mean here.  Are you saying that
> because setbotf.f lives in lib${MPIFLIBNAME}.so and MPIFLIBNAME=mpich that
> the libmpich.so must be linked with the fortran compiler? 

No, but it must be linked with the Fortran runtime-library (at least if one
wants to perform symbol resolution for shared libraries).

> And that furthermore applications linked via mpicc must include some
> libraries from the fortran compiler runtime on underlying link line?

Yes, exactly, mpicc would need to include something like

-Wl,-rpath,/opt/nag-5.2.747/lib/NAG_Fortran -L/opt/nag-5.2.747/lib/NAG_Fortran -lf52

in its LIBS. I'd rather not introduce this dependency on the C part.

> Can you give us any specifics about which compiler you are using and what the
> internal Fortran runtime dependency is?

It's NAG Fortran 5.2.747 on Linux x86_64. The symbols in question are

__NAGf90_enter_pu
__NAGf90_exit_pu
__NAGf90_filename
__NAGf90_lineno
__NAGf90_rterr

The NAG compiler does some heavy error checking and instrumentation and these
seem to be related to traceback functionality. I could switch all checking off,
but that's what one typically wants to use the NAG compiler for.

> These scripts are current.  You should run these many scripts via
> "./maint/updatefiles", not by hand.  Their invocation is not as
> straightforward as you initially guessed.  You'll need the exact versions of
> the autotools described here:
> 
> http://wiki.mcs.anl.gov/mpich2/index.php/Getting_And_Building_MPICH2#Setting_up_the_build_environment

Thanks, I'll see how that works out.

Greetings, Thomas
-- 
Thomas Jahns
DKRZ GmbH, Department: Application software

Deutsches Klimarechenzentrum
Bundesstraße 45a
D-20146 Hamburg

Phone: +49-40-460094-151
Fax: +49-40-460094-270
Email: Thomas Jahns <jahns at dkrz.de>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5884 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20110907/145954b4/attachment.bin>


More information about the mpich-discuss mailing list