Newsgroups: comp.parallel.mpi
From: William Saphir <wcs@best.com>
Reply-To: wcs@best.com
Subject: Re: Fortran 90 kinds and MPI
Date: Thu, 02 Oct 1997 22:29:11 -0700
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <3434829C.AFAA58DC@best.com>

Roberto Lionello wrote:
> 
> Hello,
> 
> I'm porting a Fortran code developed on the Cray C90 to the Cray T3E.
> Let's suppose I want to declare a variable as
> 
> real (selected_ral_kind(12,9)) :: foobar
> 
> Is it possible to build an MPI type to communicate foobar?
> It seems to me you can't do it with mpi_type_contiguous.
> Thank you, kind people!
> 

In MPI-1, you should use MPI_REAL8. Technically this is not portable, 
but in practice it will work. 

In MPI-2, you can use the function MPI_TYPE_CREATE_F90_REAL(12, 9, newtype, ierr)
to get the correct MPI datatype. See the spec at www.mpi-forum.org for
more info. Unfortunately there aren't any MPI-2 implementations yet. 

Bill Saphir
Lawrence Berkeley National Laboratory
wcs@nersc.gov

