Changes for version 1.499_002 - 2013-09-29

  • 3 items remain before releasing the final MCE 1.5 distribution. Document MCE::Stream, finish MCE::Loop and re-visit MCE::Flow.
    • Am interested in seeing the test results due to the next item mentioned below (actually the main reason for a _002 release).
    • This has turned out to be a very long and tiresome journey for me. Am very glad that this is almost over. MCE 1.5 is very fast. Also like how the models are turning out; MCE::Map, MCE::Grep, MCE::Loop -- will finish that next, plus MCE:Stream and MCE::Flow will become the last two to document, re-visit, finish up.
    • Code-wise, that is 100% completed plus tested.
    • ;) mario
  • The top level MCE.pm file is now mainly an index page (POD wise). The code previously located in MCE.pm (1.4) moved to MCE::Core, some of which went to various files under the Core directory. The documentation, previously MCE.pod, is now placed at the end of MCE::Core with the examples section becoming MCE::Examples going forward.
    • MCE 1.5 is backwards compatible with 1.4 and below.
  • IPC has been enhanced with 8 data channels. Many operations run 3x when compared with MCE 1.4.
  • Five models: MCE::Flow, MCE::Grep, MCE::Loop, MCE::Map, and MCE::Stream.
  • Hybrid queues via MCE::Queue allowing for normal and priority queues.
  • MCE::Subs for exporting functions prefixed with mce_; e.g. mce_wid.
  • All public methods can be called directly using the package name and method e.g. MCE->wid, MCE->run.
    • MCE->new( max_workers => 'auto', user_func => sub { my $wid = MCE->wid; MCE->sendto("STDOUT", "Hello from $wid\n"); } );
    • MCE->run;
  • New options (gather, interval, task_name).
    • The task_end option can now be specified at the top level. See docs for use case.
    • Input_data can be specified inside the first task instead of having to specify this at the top level. Input_data is ignored when specified for tasks other than the first task.
      • user_tasks => [{ input_data => \@list, ... },{ ... }
  • New public methods chunk_id, gather, freeze, thaw, yield, task_name, print, printf, say
  • New example (interval.pl).
  • Optimized the egrep.pl and wc.pl examples. These run much faster. Try these out against large log files. Both examples fly.
  • Barrier synchronization update. Two sockets are utilized instead of 2 lock files. This, now works wonderfully under the Cygwin environment. For threading, the removal of 2 lock files increases the number of threads allowed from about 1/3rd previously to under 1/2 of ulimit, e.g. int(ulimit -n / 2 - 20).
  • Removed the logic for determining MAX_OPEN_FILES and MAX_USER_PROCS. MCE no longer has a constraint on max_workers allowed.
  • Code re-factor work. Added a private method _validate_runstate called by various methods. Organized the code slightly such as placement of methods.
  • Localize the input scalar $_ prior to calling user_func. Folks can use $_ for input_data and sequence of numbers. Added section to docs explaining DEFAULT INPUT SCALAR.

Documentation

A list of examples demonstrating Many-core Engine

Modules

MCE
Many-core Engine for Perl. Provides parallel processing capabilities.
Provides the core API for Many-core Engine
Parallel flow model for building creative applications
Parallel grep model similar to the native grep function
Parallel loop model for building creative loops
Parallel map model similar to the native map function
Hybrid queues (normal including priority) for Many-core Engine
Temporary directory creation/cleanup & signal handling
Parallel stream model for chaining multiple maps and greps
Exports funtions mapped directly to MCE's methods
Public and private utility functions for Many-core Engine

Provides

MCE
in lib/MCE/Core.pm
MCE
in lib/MCE/Core/Input/Generator.pm
MCE
in lib/MCE/Core/Input/Handle.pm
MCE
in lib/MCE/Core/Input/Request.pm
MCE
in lib/MCE/Core/Input/Sequence.pm
MCE
in lib/MCE/Core/Manager.pm
MCE
in lib/MCE/Core/Validation.pm
MCE
in lib/MCE/Core/Worker.pm
in lib/MCE/Core/Input/Generator.pm
in lib/MCE/Core/Input/Handle.pm
in lib/MCE/Core/Input/Request.pm
in lib/MCE/Core/Input/Sequence.pm
in lib/MCE/Core/Manager.pm
in lib/MCE/Core/Validation.pm
in lib/MCE/Core/Worker.pm