[gambit-list] Node constraints for Termite?

andrew cooke andrew at acooke.org
Wed Sep 26 21:19:42 EDT 2007


Are there constraints on the number of *active* nodes in Termite?

The reason I ask is that while I can create many nodes on the same
machine, I can only remote-spawn to one other node (I am using a dual core
machine).

For example, using the code included (which is a bit odd because I have
pulled code out of libraries to make a simple demo), the following is ok
(with a single node)

: gsi test.scm
((1 a) (2 b) (3 c) (1 d))
("acp-make-nodes" #<node #2 ip: "localhost" port: 30000> ok)
("acp-map spawn" #<node #2 ip: "localhost" port: 30000>)
("acp-map spawn" #<node #2 ip: "localhost" port: 30000>)
("acp-map spawn" #<node #2 ip: "localhost" port: 30000>)
("acp-map spawn" #<node #2 ip: "localhost" port: 30000>)
("acp-map recv" #<thread #3>)
("acp-map recv" #<thread #4>)
("acp-map recv" #<thread #5>)
("acp-map recv" #<thread #6>)
(2 3 4 5)

but with two nodes created i see:

: gsi test.scm
((1 a) (2 b) (3 c) (1 d))
("acp-make-nodes" #<node #2 ip: "localhost" port: 30000> ok)
("acp-make-nodes" #<node #3 ip: "localhost" port: 30001> ok)
("acp-map spawn" #<node #3 ip: "localhost" port: 30001>)
("acp-map spawn" #<node #2 ip: "localhost" port: 30000>)
------------- REPL is now in #<thread #4> -------------
*** INTERRUPTED IN ##wait-for-io!

(where I hit Ctrl-C after it hung)

Any help appreciated - the enclosed file should run the first case above. 
To see the second change the appropriate line to
  (nodes (acp-make-nodes (list "localhost") 30000 2 #f)))
- ie the penultimate arg is the number of nodes.

Thanks,
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.scm
Type: text/x-scheme
Size: 2419 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20070926/737e9c39/attachment.bin>


More information about the Gambit-list mailing list