Newsgroups: comp.parallel.mpi
From: "Timothy H. Kaiser" <tkaiser@arc.unm.edu>
Reply-To: tkaiser@arc.unm.edu
Subject: Re: MPI_REAL and autodouble
Organization: Albuquerque Resource Center, HPCERC
Date: Wed, 26 Feb 1997 19:48:57 -0700
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <3314F5C1.67C4@arc.unm.edu>

Jeff Nucciarone asks

If I compile using an autodoubling compiler option, thus converting
arrays a and b
from real*4 to real*8, will tasks 0 and 1 send and receive the proper
length of data
or does the MPI_REAL datatype need to be rewritten as MPI_DOUBLE?  If so
I suppose we
could then use a preprocessor definition to substitute the proper
datatype.



Don't count on this working.  Why?  The libraries are normally compiled
by them self with MPI_REAL and MPI_Double as constants.  

What can you do?  There is a very good 
fix to this problem.  Define your own MPI data type such as MY_MPI_REAL
and use
it instead of MPI_REAL and MPI_Double. My_MPI_Real can be set to either
8 or 16 bytes
at run time.

I'm on a short time clock  so I will not go into this here today.

Also, if you use Fortan 90 there is a way to define your own Fortran
data types which can be globally changed between 8 and 16 bytes by
changing
a single line.  If your are interested I can send you the code to do
both of these
but not this second.

Tim Kaiser

