Re: [OMPI devel] Empty-initializer problems w/ PGI

2015-08-29 Thread Jeff Squyres (jsquyres)
Fixed; thanks.

> On Aug 27, 2015, at 12:16 AM, Paul Hargrove  wrote:
> 
> I am pretty sure we fixed something very similar a couple months back.
> The following is from "make check" with a recent (Tuesday night?) master 
> tarball.
> 
>   CC   unpack_ooo.o
> PGC-S-0155-Empty initializer not supported  
> (/global/homes/h/hargrove/GSCRATCH/OMPI/openmpi-master-linux-x86_64-pgi-13.10/openmpi-dev-2371-gea935df/test/datatype/unpack_ooo.c:
>  34)
> PGC-S-0155-Empty initializer not supported  
> (/global/homes/h/hargrove/GSCRATCH/OMPI/openmpi-master-linux-x86_64-pgi-13.10/openmpi-dev-2371-gea935df/test/datatype/unpack_ooo.c:
>  39)
> PGC/x86-64 Linux 13.10-0: compilation completed with severe errors
> 
> Running "make -k check" shows no other errors.
> 
> -Paul
> 
> -- 
> Paul H. Hargrove  phhargr...@lbl.gov
> Computer Languages & Systems Software (CLaSS) Group
> Computer Science Department   Tel: +1-510-495-2352
> Lawrence Berkeley National Laboratory Fax: +1-510-486-6900
> ___
> devel mailing list
> de...@open-mpi.org
> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel
> Link to this post: 
> http://www.open-mpi.org/community/lists/devel/2015/08/17875.php


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/



Re: [OMPI devel] fortran calling MPI_* instead of PMPI_*

2015-08-29 Thread Jeff Squyres (jsquyres)
On Aug 27, 2015, at 3:25 AM, Gilles Gouaillardet  wrote:
> 
> I am lost ...

Fortran does that to ya.  ;-)

> from ompi/mpi/fortran/mpif-h/profile/palltoall_f.c
> 
> void ompi_alltoall_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
>char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype,
>MPI_Fint *comm, MPI_Fint *ierr)
> {
>[...]
>c_ierr = MPI_Alltoall(sendbuf,
>  OMPI_FINT_2_INT(*sendcount),
>  c_sendtype,
>  recvbuf,
>  OMPI_FINT_2_INT(*recvcount),
>  c_recvtype, c_comm);
>[...]
> }
> 
> $ nm ompi/mpi/fortran/mpif-h/profile/.libs/palltoall_f.o | grep MPI_Alltoall
> U MPI_Alltoall
>  W MPI_Alltoall_f
>  W MPI_Alltoall_f08
>  W PMPI_Alltoall_f
>  W PMPI_Alltoall_f08
> 
> ompi_alltoall_f() calls MPI_Alltoall()
> 
> 
> the "natural" way of writing a tool is to write mpi_alltoall_ (that calls 
> pmpi_alltoall_)
> *and* MPI_Alltoall (that calls PMPI_Alltoall)

Sidenote: the only correct way to write a tool that intercepts Fortran MPI API 
calls is to write those interceptions *in Fortran*.  I.e., the tool should 
provide MPI_ALLTOALL as a Fortran subroutine.  I realize that this is not the 
point of what you are saying :-), but everyone always gets this point wrong, so 
I feel the need to keep pointing this out.

> since ompi_alltoall_f invokes MPI_Alltoall (and not PMPI_Alltoall), the tool 
> is invoked twice, by both the Fortran and C wrapper.

I didn't think that this was true, but I just confirmed it by looking at "gcc 
-E" output in the mpif-h/profile directory.

I don't think that it was the intent.  See below.

> my initial question was
> "why does ompi_alltoall_f invokes MPI_Alltoall instead of PMPI_Alltoall ?"
> 
> /* since we share the same source code when building with or without mpi 
> profiling,
> that means we would need to
> #define MPI_Alltoall PMPI_Alltoall
> when ompi is configure'd with --enable-mpi-profile
> */

I'm guessing that the complexity in the build system to support environments 
without and with weak symbols (i.e., OS X vs. just about everyone else) have 
made this get lost over time.

Can you supply a patch?

-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/