How Haskell handles parallel computing on a multi-core machine / cluster

I am considering a new language to study the days that will be used in high-performance computing on the computer cluster that we have, among these languages, I am considering Haskell.

I read something about Haskell, but there are still questions about using Haskell in high-performance and distributed computing, which the language is known for, but I read some debate about Haskell, not very good for these types of systems because of laziness. I can generalize my questions in the following lines:

  • Haskell uses green threads, which is great for handling a large number of concurrent connections, but what happens when one of the tasks takes longer than the average and blocks the rest, the entire flow block (Node.js style), move the next task to another processor / thread (Golang), use a reduction technique (Erlang) that pushes the task out of the processing context after a predetermined number of ticks, or?

  • In a distributed computing environment, what happens to lazily evaluated functions, do they need to be strictly enforced?

  • If one function / module requires strict evaluation, but it depends on other lazy functions / modules, I must change the code of other functions / modules to make them strict, or the compiler will handle me and make everything in this chain be strict or lazy.

  • When processing a very large sequence of data, how Haskell handles parallel processing is to use some kind of implicit map reduction technology, or I do it myself.

  • Is there a clustering abstract in the language that processes the processing power for me, which automatically redirects the next task to a free processor, wherever it is, whether on the same computer or another computer in the same cluster.

  • How Haskell provides a fair share of the work is evenly distributed across all available cores on the same computer or in an accessible cluster.

+4
source share
2 answers

Multithreading

SMP p arallelism Haskell . , . , parallelism; , .
, , , .. - , Haskell .

, : GHC , . , , , , , - . - . parallelism ; , , "" . - .

, parallelism ( - - , ), , Haskell ; repa.

Cloud Haskell , Erlang . : - Haskell, , ( Haskell , , ).

, Haskell , , . Erlang - , , .

, . , , , Cloud Haskell; . HPC (, , ) MPI, MPI, , , .

MPI Haskell , FORTRAN , . Haskell ( !), , , Haskell. - /, ; ++, Python Julia.

MPI- C ++ Haskell. Paraiso - , .

, , Haskell. , , . , , - , , Haskell . . , , , . , , , , .

, MPI, ​​ . .

, .


concurrency ( , ), , , ?
+6

Haskell . , GHC .

+7

Source: https://habr.com/ru/post/1678636/


All Articles