Feature request (was "parallel cell executing and wxmaxima")



Let's say that your underlying lisp system has a primitive that looks 
like lisp mapcar,
but "in parallel".  (If you wonder if this is like MapReduce, the answer 
is yes, with the
Reduce step making a list of the answers.)   Let's say the Lisp program 
is called
mapcar-parallel.

Then
:lisp  (defun $evaluate_parallel( &rest L)  (cons '(mlist) 
(mapcar-parallel #'meval  L)))

  defines evaluate_parallel.

To call it from Maxima you would do something like

evaluate_parallel('f(x), 'g(y), 'h(z))

note the quotes:  otherwise f,g,h  would be evaluated BEFORE calling 
evaluate_parallel!

I am sure there is a way to make the quote marks unnecessary.

Of course (a) your lisp may not have mapcar-parallel, or anything even 
remotely like that,
but just calls to some operating system function, or not even that...
and (b) this solves none of the important problems involving shared state,
and (c) it may fail to be faster for any number of reasons,
and (d) it may fail when simply serial evaluation would be fine.

If is our goal to include in Maxima all popular ideas in computing, I 
think that parallel computing is
so "move along, nothing to see here."

  I think anyone with a truly modern outlook would be putting Maxima "in 
the cloud"
Use something like Tilu, sorta like Maxima|Alpha   :)

Why isn't there are Maxima facebook page? {come to think of it, why not? )

What about a voice (Siri-like) input to Maxima on iphone etc?  
{actually, I can help with this:}



RJF


On 6/10/2012 8:16 AM, Rupert Swarbrick wrote:
> Oliver Kullmann<O.Kullmann at swansea.ac.uk>  writes:
>> Hello,
>>
>> it seems to me that whenever some kind of parallelism is discussed then
>> only the highly complicated form of automated parallelism is considered.
>> While just providing some thread-primitives seems to me much simpler and
>> much more useful.
>>
>> If I would implement something (but I don't :-(), then I would start with
>> something like implementing
>>
>> evaluate_parallel(L),
>>
>> where L is a list of expressions, to be evaluated independently,
>> while the return value is the list of evaluation results.
>> The variable
>>    max_cores
>> with default value 1 governs the number of threads to be created.
>> If max_cores=inf, then for every expression in L a thread is created.
>>
>> This just assumes that there is no interaction between the different
>> computations. It is up to the user to make sure that this is the case.
> This is almost impossible at the moment in Maxima because there is so
> much shared state (for example, %o<n>, dummy indices, the assume
> database, ...)
>
> I think that people trying to experiment with parallelism in Emacs lisp
> have the same problem.
>
> There's probably more hope of doing things at the lisp level: if there
> is an algorithm that one knows how to make faster with parallelism then
> one can presumably write a version that calls out via Bordeaux threads
> or whatever but appears to the calling code as a single thread of
> execution. Then (I *think*) you can make more assumptions about shared
> state etc.
>
> Rupert
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima