Newsgroups: comp.sys.transputer From: Daniel Scheurell Reply-To: daniel.j.scheurell@boeing.com Subject: Re: HELP NEEDED! Transputer & Parallell C!! Organization: Boeing D+SG -- AWACS Advanced Products Date: Wed, 12 Feb 1997 15:51:52 GMT Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <3301E718.F98@boeing.com> rolf.moholth@hibu.no wrote: > > I'm trying to run 3 processes on 3 separate transputers, but the communication between processes doesn't seem to work. > ... [etc] ... > printf( "Svoooossj!\n" ); > /* Send a number to the workers */ > ChanOut( pTo1, &nStart1, sizeof(int) ); > printf( "Sviiiisj!\n" ); > ChanOut( *pTo2, &nStart2, sizeof(int) ); > printf( "Svusj!\n" ); > ChanIn( *pFrom1, &nSum1, sizeof(int) ); > printf( "Svisj!\n" ); > ChanOut( *pTo2, &nStart2, sizeof(int) ); > > /* Wait for results from both workers */ > ChanIn( *pFrom1, &nSum1, sizeof(int) ); > ChanIn( *pFrom2, &nSum2, sizeof(int) ); ... [etc] ... > > Rolf Moholth > Buskerud College > Department of Computer Science > N-3600 KONGSBERG > NORWAY The channel pointer arguments to the ChanIn/Out functions have been dereferenced. The functions want the pointer itself (e.g. pFrom2, as in the first call using pTo1), and not the Channel pointed to (*pFrom2). All else seems OK. Do your students read this newsgroup? ;) -- Daniel Scheurell Boeing Defense & Space Group -- AWACS Advanced Products vmail: 206-657-5154 email: daniel.j.scheurell@boeing.com