HELP! * GREY=local LOCAL HTML version of Foils prepared July 6,1995

Foil 38 TCE -- Implementation -- 16: Creating Ports

From Master Foils for Threads with TCE in detail CPS600 Spring Semester95 -- April 1995. by Janusz Niemiec and Geoffrey Fox * Important Information in IMAGE

Ports are obtained while a new process is created or by receiving them as a message. In the following example the SendingPorts array will be filled out by ports created as a result of starting NumOfNodes copies of the SlaveName program on Nodes nodes.
#define NumOfNodes 8
#define SlaveName "/usr/janusz/slave_program"
TCE_Port *SendingPorts[NumOfNodes];
TCE_Chn *Channels[NumOfNodes];
...
n = tce_exec(SendingPorts,Nodes,SlaveName,TCE_InPort,NumOfNodes);
tce_chn_init(Channels,TCE_InPort,SendingPorts,n);
for(i = 0; i < n; i++)
  • tce_chn_snd(Channels[i],SendingPorts,n,FMT_Port);
...
Using those ports the parent process can now establish a dedicated channel to each of its children by calling tce_chn_init. Through the channels it can pass the sending ports to all its children (tce_chn_snd).



Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Tue Feb 18 1997