2006/11/19, Ronan Reilly <[EMAIL PROTECTED]>:
Just a little further clarification on the host/ip issue.
I'm using the very useful simple socket client-server framework to run an
evolutionary algorithm written in J on an 80 node unix cluster. The clients
evolve separate populations, the server propagates the current fittest
member across all the clients. The tricky bit is that I have to launch the
server as a batch job, so I don't know ahead of time on what node it will
run. I then launch the clients who each open a socket to the server.
However, the clients have to know the location of the server (so
sdgethostbyname won't work).
[snip]
I don't quite get it. Why wouldn't sdgethost(by)name work for you?
Run the following on the server side:
load 'socket'
coinsert 'jsocket'
sdgethostname ''
+-+-------+
|0|thehost|
+-+-------+
sdgethostbyname ''
+-+-+---------------+
|0|2|222.118.155.210|
+-+-+---------------+
Then you can pass this information to the clients.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm