Newsgroups: comp.sys.transputer
From: ifunltd@xs4all.hacktic.nl (ifunltd)
Subject: Re: Large link transfers
Organization: Hack-Tic, networking for the masses
Date: 26 Jul 1994 00:40:17 GMT
Message-ID: <311m24$jhv@news4all.hacktic.nl>

Dieter Froning (froning@aps.rwth-aachen.de) wrote:
: Reading the Performance Improvement Manual of the OCCAM 2 Toolset we 
: changed in a test programm the following lines

: out.channel ! 101 
: out.channel ! 102 
: out.channel ! 103 

: to the construct described in chapter 8.2 "Large Link transfers"

: out.channel ! 101; 102; 103

: and received the compiler error message "Too many items in I/O-List".
: The receiving process expected three inputs :

: in.channel ? testvar1
: in.channel ? testvar2
: in.channel ? testvar3

: So there occurs the question if it is possible to send a data list (e.g. 
: protocol type any) down a channel like an array ("out.channel ! [array FROM
: 0 TO 100]")?

No, you cannot expect the compiler to accept this: reading one testvar at a
time is different from sending three consecutive testvars (no, not 
physically, but conceptually there is a BIG difference !). I am not sure
whether you can use this 'trick' when switching off usage checking. What
does work is NOT using a CHAN OF ANY (this is called an anarchic protocol,
and the Occam designers had their reasons for this name), but mapping your
data list onto an array on both sides of the channel. If the array then
has variable size during runtime, you use the famous length:array protocol,
again on both sides of the link.

By the way, if you do succeed (by disabling some checking mechanisms) in
sending one type/length of data and reading in multiple pieces of different
lengths/types of data, beware to not try this on 'soft channels' (on the
same transputer) or on virtual links: that will kill your progam for sure!

If you use Occam, you will have to learn to behave !!!


