Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] OpenMPI with NAG compiler and gcc 4.6
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2011-07-11 10:32:37


(moved over from the users list; this is definitely a better fit for the devel list...)

On Jul 11, 2011, at 4:17 AM, Ning Li wrote:

> I am willing to help test OpenMPI with the NAG compiler from time to time but not sure how. If you could give me specific instructions I am very happy to help.

Ping me off the list and I can get you started. The MPI Testing Tool (MTT) is a little complicated to configure, but once you have done so, it can run in a fully automated fashion with little care and feeding required.

> As for this technical issue, I did some research online. It appears that a later version of Libtool (probably 2.2.10+) added support to NAG Fortran compiler. There are discussions at http://lists.gnu.org/archive/html/bug-libtool/2010-09/msg00002.html
>
> The relevant section of code (which I found from Libtool 2.4) looks like:
>
> nagfor*)
> # NAG Fortran compiler
> _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
> _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
> _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
> ;;
>
> The basic idea here is that nagfor calls gcc (not ld directly) for linking so there are two stages of parameter passing, so the rather strange looking '-Wl,-Wl,,' flag.

Gotcha.

OMPI v1.5.x uses Libtool 2.2.6b, unfortunately -- it is highly unlikely that we can upgrade this in the middle of a release series. Indeed, LT made some significant changes after 2.2.6b that would require fairly extensive changes to OMPI v1.5's build system. So upgrading is not likely.

But patching is fine -- we already have several patches in place for various Autotool bugs / back ports. Could you prepare a patch, perchance? OMPI's autogen.sh script applies such patches (our autogen.sh script runs autoconf/automake/etc. -- autogen.sh is only necessary for developers who get SVN checkouts; it's already been run for official OMPI release tarballs). More on patching below.

FWIW, the current OMPI SVN trunk has already been upgraded to LT 2.4; so hypothetically the problem should be fixed there. Could you try a trunk nightly tarball and see if it works with the NAG compiler?

    http://www.open-mpi.org/nightly/trunk/

> I can see that in OpenMPI 1.5.3 source, the $OPENMPI_DIR/config/libtool.m4 file does not contain the above code. I have not nuch experience using Libtool so I don't know how to fix this. Simply adding the new code does not seem to work.

It's a little more convoluted, unfortunately. The contents of libtool.m4 are only added to OMPI's "configure" script when "autogen.sh" is run. There's likely a magic place where the patch has to be added in the sequence of events in autogen.sh.

If you can find the right place to patch in libtool.m4, try manually editing configure to put the fix in there, too (i.e., you should be able to find enough context from libtool.m4 to find the Right place(s) in configure). If that works, send the libtool.m4 patch along and I can see about putting it in the Right place in autogen.sh.

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/