#13580: Parallel map reduce on SearchForest
-------------------------------------+-------------------------------------
       Reporter:  hivert             |        Owner:  hivert
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.4
      Component:  combinatorics      |   Resolution:
       Keywords:  map-reduce,        |    Merged in:
  days57                             |    Reviewers:  Sébastien Labbé
        Authors:  Florent Hivert,    |  Work issues:
  Nathann Cohen                      |       Commit:
Report Upstream:  N/A                |  98fd9e1c7a085b1ba62d004dba6cca4c89001cd2
         Branch:                     |     Stopgaps:
  u/nthiery/13580/map_reduce         |
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by elixyre):

 Hello and merry christmas every one,

 I have some question on this ticket.

 Firstly, I don't understand the documentation from the line 571:

 {{{
     Decription of the map/reduce operation:

     - ``map_function=f`` -- (default to ``None``)
     - ``reduce_function=red`` -- (default to ``None``)
     - ``reduce_init=init`` -- (default to ``None``)
 }}}

 What means `f`, `red` and `init`? My opinion is that `f`, `red`and `init`
 are irrelevant but an example should be interesting at this point:

 (copy-paste of one in the module documentation)
 {{{
  sage: from sage.parallel.map_reduce import RESetMapReduce
  sage: S = RESetMapReduce(
  ....:   roots = [[]],
  ....:   children = lambda l: [l+[0], l+[1]] if len(l) <= 15 else [],
  ....:   map_function = lambda x : 1,
  ....:   reduce_function = lambda x,y: x+y,
  ....:   reduce_init = 0 )
  sage: S.run()
  131071
 }}}

 Ok, there is the `seealso` which says go to see the documentation of the
 module for examples, but one example there is interesting, no?

 Then it seems there is some useless import (like line 1345 `from
 multiprocessing import current_process`) (I try to compile sage soon and I
 can remove all useless import if you want).

 Finally, I'm not sure to understand the use of `AbortError`. It is used to
 abort the computation and to say to the workers and the thiefs every think
 is done?

 Jean-Baptiste

--
Ticket URL: <http://trac.sagemath.org/ticket/13580#comment:67>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to