Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] openmpi-1.8.2rc2 and f08 interface built with PGI-14.7 causes link error
From: Paul Hargrove (phhargrove_at_[hidden])
Date: 2014-07-31 22:04:28


Second related issue:

Can/should examples/hello_usempif08.f90 be extended to use more of the
module such that it would have illustrated the bug found with Tetsuya's
example code? I don't know about MTT, but my scripts for testing a
release candidate includes running "make" in the example subdir.

-Paul

On Thu, Jul 31, 2014 at 6:17 PM, Jeff Squyres (jsquyres) <jsquyres_at_[hidden]
> wrote:

> Many thanks guys, this thread was most helpful in finding the fix.
>
> Paul H. nailed 80% of it on the head in the post where he identified the
> Makefile.am change. That Makefile.am change was due to three things:
>
> 1. Fixing a real bug (elsewhere in that commit)
> 2. My misunderstanding of how module files work in Fortran
> 3. The fact that gfortran, Absoft, and ifort *don't* require you to link
> in the .o files generated by modules, but apparently pgfortran *does*
>
> Blarg.
>
> That led to the duplicate symbol issue which Paul also encountered when he
> tried to fix the original problem, so I fixed that, too (which was a direct
> consequence of the first fix).
>
> Should be fixed in the trunk now; we tested with pgfortran on Craig
> Rasmussen's cluster (many thanks, Craig!).
>
> CMR is https://svn.open-mpi.org/trac/ompi/ticket/4519.
>
>
>
>
> On Jul 31, 2014, at 7:27 AM, Paul Hargrove <phhargrove_at_[hidden]> wrote:
>
> > Gilles,
> >
> >
> > Just as you speculate, PGI is creating a _-suffixed reference to the
> module name:
> >
> > $ pgf90 -c test.f90
> > $ nm -u test.o | grep f08
> > U mpi_f08_sizeof_
> > U mpi_f08_sizeof_mpi_sizeof_real_s_4_
> >
> >
> >
> > You suggested the following work-around in a previous email:
> >
> > $ INST/bin/mpifort ../test.f
> ./BLD/ompi/mpi/fortran/use-mpi-f08/.libs/libforce_usempif08_internal_modules_to_be_built.a
> >
> > That works fine. That doesn't surprise me, because I had already
> identified that file as having been removed from libmpi_usempif08.so
> between 1.8.1 and 1.8.2rc2. It includes the symbol for the module names
> plus trailing '_'.
> >
> > -Paul
> >
> >
> > On Thu, Jul 31, 2014 at 1:07 AM, Gilles Gouaillardet <
> gilles.gouaillardet_at_[hidden]> wrote:
> > Paul,
> >
> > in .../ompi/mpi/fortran/use-mpi-f08, can you create the following dumb
> > test program,
> > compile and run nm | grep f08 on the object :
> >
> > $ cat foo.f90
> > program foo
> > use mpi_f08_sizeof
> >
> > implicit none
> >
> > real :: x
> > integer :: size, ierror
> >
> > call MPI_Sizeof_real_s_4(x, size, ierror)
> >
> > stop
> > end program
> >
> >
> > with intel compiler :
> > $ ifort -c foo.f90
> > $ nm foo.o | grep f08
> > U mpi_f08_sizeof_mp_mpi_sizeof_real_s_4_
> >
> > i am wondering whether PGI compiler adds an additional undefined
> > reference to mpi_f08_sizeof_ ...
> >
> > Cheers,
> >
> > Gilles
> >
> > _______________________________________________
> > devel mailing list
> > devel_at_[hidden]
> > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel
> > Link to this post:
> http://www.open-mpi.org/community/lists/devel/2014/07/15390.php
> >
> >
> >
> > --
> > Paul H. Hargrove PHHargrove_at_[hidden]
> > Future Technologies Group
> > Computer and Data Sciences Department Tel: +1-510-495-2352
> > Lawrence Berkeley National Laboratory Fax: +1-510-486-6900
> > _______________________________________________
> > devel mailing list
> > devel_at_[hidden]
> > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel
> > Link to this post:
> http://www.open-mpi.org/community/lists/devel/2014/07/15391.php
>
>
> --
> Jeff Squyres
> jsquyres_at_[hidden]
> For corporate legal information go to:
> http://www.cisco.com/web/about/doing_business/legal/cri/
>
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel
> Link to this post:
> http://www.open-mpi.org/community/lists/devel/2014/07/15415.php
>

-- 
Paul H. Hargrove                          PHHargrove_at_[hidden]
Future Technologies Group
Computer and Data Sciences Department     Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900