On Mon, Feb 8, 2010 at 2:51 AM, Muthiah Annamalai <[email protected]> wrote: > Hello Luca Favatella, and friends, > > Octave can be used in ways Matlab cannot be, for example > in problems which have data-parallelism ( same problem solved > for different initial conditions/ data ) Octave gives a large speedup > factors. > > A master Octave can spawn several Octave processess whose parameters > are written in a disk and then wait for all of them to end, and pickup > the resulting data > from known saved files. So this would easily allow throwing > multicore resources at a problem which allows data parallelism, which > otherwise > would run as just a single Octave serial process. > > In a GA toolbox we evaluate same function/program for different > data and this can make use of the data parallelism. > > Under the assumptions of having a Fitness functions (f(x)) to be > specified as a string, and > [ncores] has to be the number of cores to be used in the GA fitness > evaluation, > specified as an attribute to GA problem structure, we can do this by creating > replacing __ga_scores__.m script with the following pair of scripts, > > __ga_multicore_scores__.m > __ga_multicore_helper__.m > > You can test these scripts by, running test_multicore.m . > > (please see attachments. ) > > We need fitness functions as a string, since child processess donot share > memory with the parent/master process. >
If you're working in UNIX-based environment (Linux, FreeBSD etc), an alternative is to install the general package and do results = parcellfun (number_of_cores, @my_function, pop, arg1,...). -- RNDr. Jaroslav Hajek, PhD computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Octave-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/octave-dev
