NAME

Parallel::Simple::Dynamic - dynamically splits a big list of data into several parts for processing them in parallel

VERSION

This document describes Parallel::Simple::Dynamic version 0.0.4

SYNOPSIS

        use Parallel::Simple::Dynamic;

        # A list of items
        my @list;
        
        # Create a new object
        my $psd = Parallel::Simple::Dynamic->new();

        # Splits a list of data into 4 segments and then processes them (call_back subroutine) in parallel 
        my @result = $psd->drun( { call_back => \&call_back, parts => 4, list => \@list } );

        exit;
        

DESCRIPTION

There are some problems in bioinformatics and other fields that can be separated into a number of parts with no dependency between them (embarrassingly parallel problems). Parallel processing of these partitions may remarkably reduce time for solving this kind of problems.

Parallel::Simple::Dynamic is an object-oriented module that can dynamically divide a list of data into separate parts and process all of them in parallel on multiple processor system. Parallel processing is implemented by using Parallel::Simple module by Ofer Nave (Parallel::Simple).

METHODS

drun

Processes each segment of data-set in parallel on separate processor (see Parallel::Simple). There are three properties of drun method needs to be specified:

  • list is a set of data that needs to be processed

  • call_back is a subroutine that needs to be executed on this set of data

  • parts is a number of processors what you want to use. We assign each instance to a default of 2 parts:

            my $parts=defined $arg_ref->{parts}?$arg_ref->{parts}:2;
partition

Identifies the elements for each data-segment

calc_segments

Splits the set of data into separate independent segments

DEPENDENCIES

        Class::Std;
        Class::Std::Utils;
        Parallel::Simple;
        POSIX;

AUTHORS

        Aleksandra Markovets, <marsa@cpan.org>
        Roger A Hall, <rogerhall@cpan.org>

BUGS

Please report any bugs or feature requests to bug-parallel-simple-dynamic at rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

LICENSE AND COPYRIGHT

Copyright 2011 Aleksandra Markovets.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information