From owner-sc22wg5@open-std.org  Wed Dec 17 20:24:33 2008
Return-Path: <owner-sc22wg5@open-std.org>
X-Original-To: sc22wg5-dom7
Delivered-To: sc22wg5-dom7@www2.open-std.org
Received: by www2.open-std.org (Postfix, from userid 521)
	id 0762FC56CF8; Wed, 17 Dec 2008 20:24:33 +0100 (CET)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from nspiron-2.llnl.gov (nspiron-2.llnl.gov [128.115.41.82])
	by www2.open-std.org (Postfix) with ESMTP id 37EAAC178DE
	for <sc22wg5@open-std.org>; Wed, 17 Dec 2008 20:24:31 +0100 (CET)
X-Attachments: None
Received: from cyrus2.llnl.gov ([128.15.97.105])
  by nspiron-2.llnl.gov with ESMTP; 17 Dec 2008 11:24:29 -0800
From: Aleksandar Donev <donev1@llnl.gov>
Organization: LLNL
To: mpi3-fortran@lists.mpi-forum.org
Subject: Re: [MPI3 Fortran] Please tell me I'm wrong
Date: Wed, 17 Dec 2008 11:24:29 -0800
User-Agent: KMail/1.9.4
Cc: Craig Rasmussen <crasmussen@lanl.gov>, WG5 <sc22wg5@open-std.org>
References: <71DC5DE2-391C-4057-B808-C5CD6E93E177@lanl.gov>
In-Reply-To: <71DC5DE2-391C-4057-B808-C5CD6E93E177@lanl.gov>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Message-Id: <200812171124.29718.donev1@llnl.gov>
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

Craig,

You should read last-week's WG5 messages concerning the Interop TR=20
(especially mine :-). Reinhold Bader already identified this as a=20
problem. The cause of it is the *generic* interface for MPI_Recv.

If you declared the non-generic interface:

subroutine MPI_Recv(buf, count, datatype, source, tag, comm,
   status, err) real, dimension(*), intent(out) =A0:: buf

then you could do

 real :: message(:,:)
  call MPI_Recv(message, 2, MPI_INTEGER, 1, 1, MPI_COMM_WORLD,=20
MPI_STATUS_IGNORE)

and it would work as expected. If "message" is not contiguous a copy=20
in/out would occur.

There is no way to have a generic interface and use "sequence=20
association" argument passing, which is what you are trying to do. That=20
does indeed require help from WG5.

Best,
Aleks
