Newsgroups: comp.parallel.pvm
From: rbarrett@ranger.lanl.gov (Richard Barrett)
Subject: Re: psend and precv nonheterogeneous?
Organization: Los Alamos National Laboratory
Date: 7 Feb 1996 15:01:11 GMT
Message-ID: <4faern$qon@newshost.lanl.gov>

It's necessary to distinguish between the various definitions of heterogeneous.
Sun Sparc, IBM RS6K, SGI Indy are different machines (i.e. heterogeneous), 
but use the same internal representation of data, so encoding is not necessary.
(Homogeneous from a data standpoint.)  However, if you are
passing structs, they are heterogeneous in terms of padding, so structs must
be packed by data type. In fact, it's possible that two machines of the same
type (with different compiler versions) would be heterogeneous based on how 
they deal with structs. (These situations can be determined by writing a
simple test program.)

Anyway, we get around this somewhat by defining two global variables, 
DataEncoding and DataEncodingContiguous, which are passed to pvm_initsend.
At the beginning of a run, pvm_config is called, and a comparison of the
participating machines is made, then these globals are set to either
PvmDataDefault or PvmDataRaw, and PvmDataDefault or PvmDataInPlace, resp.

You know, PvmDataDefault is really an unfortunate choice of word (default).
"Default" is such a soothing word to many. How about renaming it?
PvmDataEncode? (Encode has a desirable scary effect to many.) PvmDataBummer?
PvmDataWhyCantIGetJustOneMoreRS6K?

So pvm_psend/precv can, in a sense, force your code into nonportability.
Or maybe #if def _MPP
         pvm_psend
         #else
         pvm_pack
         pvm_send

Richard

In article <4f4i2i$4eo@sunsystem5.informatik.tu-muenchen.de>, Norbert Froehlich <ntf> writes:
|> On a homogeneous system you don't need the costly overhead of using a special
|> protocol for beeing able to transfer data between different architectures.
|> pvm_psend() is a special sending routine for leaving out this protocol if you
|> run your application on identical machines. On a heterogeneous system you have
|> to use the packing routines and to do a pvm_send() afterwards.
|> -- 
|> 
|> ------------------------------------------------------------------------------
|> Norbert Froehlich                    )     ntf@regent.e-technik.tu-muenchen.de
|> Institute of                          )      Phone:     +49 - 89 / 2105 - 3671
|>  Electronic Design Automation         )        FAX :    +49 - 89 / 2105-6-3671
|> Technical University of Munich      ----         Mail: D-80290 Munich, Germany
|>                     http://www.regent.e-technik.tu-muenchen.de/people/ntf.html
|> 

