[Geneticd-devel] latest news about parallel programming
Status: Alpha
Brought to you by:
jonnymind
|
From: Jonny M. <jon...@ni...> - 2002-02-16 15:43:44
|
Now Start, Stop, rele (release) and slim (set time share) are working in parallel mode. Just create a master engine (be it an intseq, a gfunc or an engine of your own); set maximum population (maxp) and food/competitivness (samb). If your engine needs a learning set (like gfunc does) load it with the lset command, or compile it from a ascii file with ldat. Now prep the master engine. With the slav command, you can enslave another GeneticDaemon (or the same daemon), and create a new GEInABox of the same type of the Master Engine. The learning set will be transferred to the newly born engne. Now, if you start the master engine, all the slaves will be started... I still need some useful commands, as engine mangling (kill or load an agent), dumping the whole slave engines population, serializing the master and things like that... But now it's only a matter of time... We need also a command to talk directly with slaves (ie "quote <master-id> <slave-id> ........."), but the semi-fixed structure of the command we have now could be a problem. Moreover, I need to specialize the "print" method of the GDClient class to make it try to recover died connections transparently (i.e. dued to timeouts). I put a "sync" flag in the SlaveDef class: if a slave engine gets an error of some kind (both hard, if the daemon falls or soft, if the engine gets an error in doing something). If an engine goes "out of sync", i would leave this situation to the user/client to handle. I also corrected a lot of small errors that I left behind in the hurry to have a working parallel algorithm. One last concern. When you compile this version, it should be better to use the -DPARANOID switch, althrough this is not needed: host% CFLAGS="-DPARANOID" ./configure host% make this should work fine. Bye, Giancarlo. |