MCE - Many-core Engine for Perl. Provides parallel processing capabilities.
This document describes MCE version 1.504
Many-core Engine (MCE) for Perl helps enable a new level of performance by maximizing all available cores. MCE spawns a pool of workers and therefore does not fork a new process per each element of data. Instead, MCE follows a bank queuing model. Imagine the line being the data and bank-tellers the parallel workers. MCE enhances that model by adding the ability to chunk the next n elements from the input stream to the next available worker.
Chunking and input data are optional in MCE. One can simply use MCE to have many workers run in parallel.
Three packages make up the core engine in MCE. New to the 1.5 release is the inclusion of the bounds_only, gather and time interval features. In addition, the core has an overall faster IPC engine when compared to prior releases.
Provides the core API for Many-core Engine.
Temporary directory creation/cleanup & signal handling.
Public and private utility functions.
Provides a hybrid queuing implementation for MCE supporting normal queues and priority queues from a single module. This module exchanges data via the core engine to enable queueing to work for both children (spawned via fork) and threads.
Exports functions mapped directly to MCE's methods, e.g. mce_wid. The module allows 3 options, e.g. :manager, :worker, :getter.
MCE 1.5 introduces 5 models for automation behind the scene in generating the MCE instance and auto-tuning chunk_size and max_workers. The models configure MCE, spawn plus shutdown workers when the script terminates.
The models take Many-core Engine to a new level for ease of use.
Provides a parallel loop utilizing MCE for building creative loops.
A parallel flow model for building creative applications. This makes use of user_tasks in MCE. The author has full control when utilizing this model. MCE::Flow is similar to MCE::Loop, but allows for multiple code blocks to run simultaneously with slight change to syntax.
Provides a parallel grep implementation similar to the native grep function.
Provides a parallel map model similar to the native map function.
Provides an efficient parallel implementation for chaining multiple maps and greps together through the use of user_tasks and MCE::Queue. Like with MCE::Flow, MCE::Stream can run multiple code blocks simultaneously with slight change to syntax from MCE::Map and MCE::Grep.
A placeholder for the examples included with the distribution.
Perl 5.8.0 or later. PDL::IO::Storable is required in scripts running PDL and using MCE for parallelization.
The source is hosted at http://code.google.com/p/many-core-engine-perl/
Mario E. Roy, <marioeroy AT gmail DOT com>
Copyright (C) 2012-2013 by Mario E. Roy
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.