# PR to Merge Multicore OCaml

**URL:** <https://forum.devtalk.com/t/pr-to-merge-multicore-ocaml/33687>\
**Category:** Backend In The News\
**Tags:** ocaml\
**Created:** [21 December 2021 19:31 UTC](https://forum.devtalk.com/t/pr-to-merge-multicore-ocaml/33687 "2021-12-21T19:31:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CommunityNews](https://forum.devtalk.com/user_avatar/forum.devtalk.com/communitynews/32/1113_2.png) [@CommunityNews](https://forum.devtalk.com/u/CommunityNews)\
**Post date:** [21 December 2021 19:31 UTC](https://forum.devtalk.com/t/pr-to-merge-multicore-ocaml/33687/1 "2021-12-21T19:31:29Z")

</div>

> Multicore OCaml by kayceesrk · Pull Request #10831 · ocaml/ocaml.  
> This PR adds support for shared-memory parallelism through domains and direct-style concurrency through effect handlers (without syntactic support). It intends to have backwards compatibility - in …

Read in full here:

> <https://github.com/ocaml/ocaml/pull/10831>
>
> This PR adds support for shared-memory parallelism through domains and direct-st…yle concurrency through effect handlers (without syntactic support). It intends to have backwards compatibility in terms of language features, C API, and also the performance of single-threaded code.
> 
> \## For users
> 
> If you want to learn more about Multicore OCaml, please have a look at the \[multicore wiki\](https://github.com/ocaml-multicore/ocaml-multicore/wiki) for papers, talks, tutorials and blog posts. 
> 
> If you are interested in using Multicore OCaml, we suggest having a look at the following work-in-progress libraries:
> 
> 1. \[domainslib\](https://github.com/ocaml-multicore/domainslib) -- a library for nested task parallelism
> 2. \[eio\](https://github.com/ocaml-multicore/eio) -- asynchronous io in direct-style
> 
> Here is a snapshot of the multicore scalability results on parallel benchmarks from \[sandmark\](https://github.com/ocaml-bench/sandmark) on a 2 processor AMD EPYC 7551 server with 64 cores in total:
> 
> !\[\](https://i.imgur.com/QzBcTf9.png)
> 
> The number in the parenthesis next to the benchmark name is the time (in seconds) taken by the sequential baseline of the corresponding benchmark.
> 
> \## Review process
> 
> This PR comes at the back of asynchronous code reviews by the OCaml core developers followed by a week-long synchronous code review session. The summary of the discussions is available in the \[November multicore monthly\](https://discuss.ocaml.org/t/multicore-ocaml-november-2021-with-results-of-code-review/8934/5#core-team-code-review-1).
> 
> As mentioned in the November multicore monthly, this PR constitutes the minimum viable product (MVP) for Multicore OCaml. The "pre-MVP" tasks have been completed, and the "post-MVP for 5.00" tasks are yet to be done. The aim is that these tasks, and the ones that follow, can be completed on ocaml/ocaml Github repo, through the usual OCaml PR review process rather than on the Multicore OCaml repo. 
> 
> Given that the PR is quite large, if you spot major breakages and functionality gaps, we suggest that you make separate issues on ocaml/ocaml Github repo. This will help keep the discussion threads readable. Feel free to comment on minor issues (typos, formatting edits, etc) directly in this PR, and we shall be happy to fix those.
> 
> \## What's in the box
> 
> The only supported backend is \`amd64\` on Linux and macOS; \`arm64\` is in the works. The following features are not implemented:
> 
> \* statmemprof
> \* compilation with frame pointers
> \* ocamldebug
> \* AFL support
> \* flambda
> 
> \## Acknowledgements
> 
> Multicore OCaml has been a long running project. We would like to thank all those who have helped find issues, debugged issues, reviewed code and contributed code along the way. 
> 
> \-- The Multicore OCaml team

_This thread was posted by one of our members via one of our news source trackers._

---

<div class="post-metadata">

**Author:** ![OvermindDL1](https://forum.devtalk.com/user_avatar/forum.devtalk.com/overminddl1/32/52_2.png) [@OvermindDL1](https://forum.devtalk.com/u/OvermindDL1)\
**Post date:** [7 January 2022 15:28 UTC](https://forum.devtalk.com/t/pr-to-merge-multicore-ocaml/33687/3 "2022-01-07T15:28:35Z")

</div>

Been waiting for this so so so so long! So excited!

Effect Handlers in OCaml is even such a larger thing than just multicore too!! But even then it’s such a _brilliant_ way to setup multicore. I just hope it’s not too late for OCaml’s relevance in the wider view at this point…
