He needs to write the info to the file for the clients to know where the server is
"I don't know ahead of time on what node it will run." .... "write the result to a file along with the port number etc., which is then read by clients when they launch." 2006/11/19, June Kim <[EMAIL PROTECTED]>:
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
-- Björn Helgason, Verkfræðingur Fugl&Fiskur ehf, Þerneyjarsund 23, Box 127 801 Grímsnes ,t-póst: [EMAIL PROTECTED] Skype: gosiminn, gsm: +3546985532 Landslags og skrúðgarðagerð, gröfuþjónusta http://groups.google.com/group/J-Programming Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans góður kennari getur stigið á tær án þess að glansinn fari af skónum /|_ .-----------------------------------. ,' .\ / | Með léttri lund verður | ,--' _,' | Dagurinn í dag | / / | Enn betri en gærdagurinn | ( -. | `-----------------------------------' | ) | (\_ _/) (`-. '--.) (='.'=) `. )----' (")_(")
---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
