What are some scenarios for which MPI is a better fit than MapReduce?

Almost any scientific code — finite differences, finite elements, etc. Which kind of leads to the circular answer, that any distributed program which doesn’t easily map to MapReduce would be better implemented with a more general MPI model. Not sure that’s much help to you, I’ll downvote this answer right after I post it.

Is it possible for a Dictionary in .Net to cause dead lock when reading and writing to it in parallel?

So your code is executing Dictionary.FindEntry. It’s not a deadlock – a deadlock happens when two threads block in a way which makes them wait for one another to release a resource, but in your case you’re getting two seemingly infinite loops. The threads aren’t locked. Let’s take a look at this method in the … Read more

Python: Something like `map` that works on threads [closed]

There is a map method in multiprocessing.Pool. That does multiple processes. And if multiple processes aren’t your dish, you can use multiprocessing.dummy which uses threads. import urllib import multiprocessing.dummy p = multiprocessing.dummy.Pool(5) def f(post): return urllib.urlopen(‘http://stackoverflow.com/questions/%u’ % post) print p.map(f, range(3329361, 3329361 + 5))

What type of problems can mapreduce solve?

In Map-Reduce for Machine Learning on Multicore Chu et al describe “algorithms that fit the Statistical Query model can be written in a certain “summation form,” which allows them to be easily parallelized on multicore computers.” They specifically implement 10 algorithms including e.g. weighted linear regression, k-Means, Naive Bayes, and SVM, using a map-reduce framework. … Read more

How do laziness and parallelism coexist in Haskell?

Yes, GHC’s RTS uses thunks to implement non-strict evaluation, and they use mutation under the hood, so they require some synchronisation. However, this is simplified due to the fact that most heap objects are immutable and functions are referentially transparent. In a multithreaded program, evaluation of a thunk proceeds as follows: The thunk is atomically† … Read more