[MPI3 Fortran] What if Fortran is the primary interface?
Supalov, Alexander
alexander.supalov at intel.com
Mon Mar 17 15:39:11 CDT 2008
Hi,
Careful: quite a few implementations use INTEGER to represent a handle
as a bit mask, rather than a pointer.
Best regards.
Alexander
-----Original Message-----
From: mpi3-fortran-bounces at lists.mpi-forum.org
[mailto:mpi3-fortran-bounces at lists.mpi-forum.org] On Behalf Of
Aleksandar Donev
Sent: Monday, March 17, 2008 9:04 PM
To: MPI-3 Fortran working group
Subject: Re: [MPI3 Fortran] What if Fortran is the primary interface?
On Monday 17 March 2008 11:54, Hubert Ritzdorf wrote:
> I have an additional question. Is this really guaranteed by the
> Fortran 2003 standard that
> type(MPI_COMM), bind(C), protected :: MPI_COMM_WORLD
> err = MPI_Recv (..., ..., MPI_COMM_WORLD, ...)
> in the same C Pointer such as the MPI_Comm MPI_COMM_WORLD ?
No, it is not.
> My feeling is that it points to a structure containing the C pointer
> MPI_COMM_WORLD.
Exactly. One can put the VALUE attribute on the communicator dummy
argument,
which means that the communicator will be passed in whatever way structs
are
passed by value (presumably put on the stack). Whether that is the same
as
passing the actual pointer (without the enclosing struct) depends on the
ABI,
I believe.
On Monday 17 March 2008 12:53, Jeff Squyres wrote:
> FWIW, I don't think the 2-level indirection is necessary.
Depends on the details of the MPI implementation, and the ABI for
passing
arguments.
> I think
> that Craig was trying to unify everything, but I would agree with
> Hubert: it would be better if MPI_COMM directly referred to whatever
> the Right stuff is in C.
What is the *set of Right things* accross implementations. Is a plain C
pointer (void*) always good enough---then just make the argument
TYPE(C_PTR)
and pass a pointer instead of a struct containing a pointer. Do some
implementations use non-pointers, say a simple integer, for that
argument?
Craig's scheme has two advantages:
1) Uniform interface to MPI accross implementations---put inside the
struct
whatever you need (pointers, integers, etc.).
2) Strong type-checking
BUT, it has the disadvantage that I don't think it is possible to avoid
a
wrapper level of indirection to massage the arguments. Personally, I
don't
see that as a design goal: MPI internally surely will call dozens of
wrappers
until the actual work gets done?
Best,
Aleks
_______________________________________________
mpi3-fortran mailing list
mpi3-fortran at lists.mpi-forum.org
http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-fortran
---------------------------------------------------------------------
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen Germany
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
Registergericht: Muenchen HRB 47456 Ust.-IdNr.
VAT Registration No.: DE129385895
Citibank Frankfurt (BLZ 502 109 00) 600119052
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
More information about the mpiwg-fortran
mailing list