https://github.com/ocaml/ocaml/pull/10831 Skip to content Sign up * Why GitHub? + Features + Mobile + Actions + Codespaces + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Learning Lab + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} ocaml / ocaml Public * Notifications * Fork 832 * Star 3.5k * * Code * Issues 261 * Pull requests 211 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights New issue Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Pick a username [ ] Email Address [ ] Password [ ] [ ] Sign up for GitHub By clicking "Sign up for GitHub", you agree to our terms of service and privacy statement. We'll occasionally send you account related emails. Already on GitHub? Sign in to your account Jump to bottom Multicore OCaml #10831 Open kayceesrk wants to merge 3,976 commits into ocaml:trunk base: trunk Choose a base branch [ ] Branches Tags Could not load branches Branch not found: {{ refName }} {{ refName }} default Could not load tags Nothing to show {{ refName }} default Are you sure you want to change the base? Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated. Change base from ocaml-multicore:multicore-pr Open Multicore OCaml #10831 kayceesrk wants to merge 3,976 commits into ocaml:trunk from ocaml-multicore:multicore-pr +24,207 -15,148 Conversation 3 Commits 250 Checks 9 Files changed 578 Conversation This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters @kayceesrk Copy link Contributor @kayceesrk kayceesrk commented Dec 21, 2021 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 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 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 -- a library for nested task parallelism 2. eio -- asynchronous io in direct-style Here is a snapshot of the multicore scalability results on parallel benchmarks from sandmark on a 2 processor AMD EPYC 7551 server with 64 cores in total: [6874747073] 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. 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 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 The text was updated successfully, but these errors were encountered: 23 176 [?] 73 58 23 sadiqj and others added 30 commits Oct 25, 2021 @sadiqj move cpu relax to reflect updates on 5.00 28ce236 @sadiqj UINTNAX -> UINTNAT bdebafb @sadiqj move to an atomic counter for fragment number 54832c2 @sadiqj fix the random number generation 448afaa @sadiqj simplify code in bottom level skiplist remove 8a70a8f @sadiqj @maranget Strengthen parallel tests by checking for the absence of marked nodes ... 185b6ec after Domain.join Co-authored-by: Luc Maranget @sadiqj @avsm Make comment clearer ... 187b083 Co-authored-by: Anil Madhavapeddy @sadiqj sort out some of the multi-line comments 8dadd5b @ctk21 Merge pull request ocaml#672 from sadiqj/codefrag ... cdec020 Codefrag thread safety @ctk21 Tighten code comments in minor_gc.c de9912c @kayceesrk Improve ephemerons compatibility with testsuite 898bd06 @ctk21 @kayceesrk Updated minor_gc.c comments from review ... c0cebb8 Co-authored-by: KC Sivaramakrishnan @bikallem fix make install 8dab7e4 @ctk21 Merge pull request ocaml#721 from bikallem/make-install-fix ... cdda7ab fix `make install` @Engil runtime: remove unused fields from io.h 8516631 @Engil check-typo 86d3fc7 @ctk21 Merge pull request ocaml#724 from Engil/cleanup_io ... d4f00e0 runtime: remove unused fields from io.h @kayceesrk Merge pull request ocaml#717 from ctk21/clarify_minor_gc_ephe ... ba50413 Tighten code comments in minor_gc.c @kayceesrk Update version number a599ce8 @sadiqj introduce caml_process_pending_signals which raises if exceptional 9788473 @Sudha247 Merge pull request ocaml#727 from ocaml-multicore/ opam_variant_update... ... 13a6be2 ..._version Update version number @jmid reset child's lock under afl-instrumentation following 1a2c612 6726edd @jmid print error when mmap fails, rather than NULL-deref Caml_state in fai... ... 8a93d45 ...l_nat.c @jmid Fix 80-column overflow 0fa0157 @Engil Merge pull request ocaml#729 from sadiqj/caml_process_pending_signals ... bb2a920 introduce caml_process_pending_signals which raises if exceptional adding minor_gc globals(caml_young_alloc_start and caml_young_alloc_e... ... ead769e ...nd) for retro compatibility fix check-typo d0b88af fix check-typo 570f635 @kayceesrk Merge pull request ocaml#720 from ocaml-multicore/ ephemeron_improvements ... 379f052 Improve ephemerons compatibility with testsuite @jmid add caml_domain_alone guard of fork a2e4e7a 194 hidden items Load more... ctk21 added 26 commits Dec 20, 2021 @ctk21 Merge commit '98e16f0334d3cb74e50e6c9073398b049438b2f6' into 5.00_reb... ... c9fac00 ...ase_to_pr @ctk21 Merge commit '0b3f8dd77d7569208f21bcbd67b85260eed65076' into 5.00_reb... ... 0e6b660 ...ase_to_pr @ctk21 Merge commit 'c9375900719a7945fbbaf8ee548181322c2b9bb7' into 5.00_reb... ... 37192e6 ...ase_to_pr @ctk21 Merge commit 'a7bf9cbaf368f178b606e7cf38ede4a22984a9da' into 5.00_reb... ... 9d89ef6 ...ase_to_pr @ctk21 fix for Pfield usage in native/topeval ff7eab9 @ctk21 Merge commit '7fb10211f65d0d558d7b0c69e5ea427621f25e09' into 5.00_reb... ... 3f0fcaa ...ase_to_pr @ctk21 Merge commit '2250fd8a2218796c07b0a25f184cdc682e4695ba' into 5.00_reb... ... 0c25f7e ...ase_to_pr @ctk21 Merge commit '18c4d16b3b80388f5b77dcc5a268c33eceb37ebe' into 5.00_reb... ... e37f431 ...ase_to_pr @ctk21 remove deprecated clashes with domain_state.tbl from compatibility.h 7168f1f @ctk21 Merge commit '2bcef4bc172f476217f253d24cb3311eaca504bf' into 5.00_reb... ... ae03f02 ...ase_to_pr @ctk21 Merge commit 'e23ec809c39fc5ed7a91f7ec9ac8d663597ff5af' into 5.00_reb... ... b20047b ...ase_to_pr @ctk21 Merge commit 'f310f749bdb2979424e9e8caed6ef97afe3ccf9c' into ... 5801e52 5.00_rebase_to_pr (Update magic numbers for 4.14) @ctk21 Merge commit '15ea9fe535562c8cebd8edf2669ba98f24d65845' into ... 0f7c825 5.00_rebase_to_pr (first commit after branching 4.14) @ctk21 Merge commit 'edf0075888ec27a50c4f50f76dba46f730797651' into 5.00_reb... ... 5e3183c ...ase_to_pr @ctk21 Merge commit '17561dc1cf9127e53485721d0f16f73aa436680e' into 5.00_reb... ... b3230d2 ...ase_to_pr @ctk21 Fix testsuite reference output for tests/shapes bb29ba4 @ctk21 Merge commit 'b4c5d7a55d9ec25693ba741a613d81f2c3ef66bc' into 5.00_reb... ... 96b23c3 ...ase_to_pr @ctk21 Merge commit '7a0e1d2c7631764ce49081a9f204b55884214e2b' into 5.00_reb... ... 0331894 ...ase_to_pr @ctk21 Merge commit '35af4cddfd31129391f904167236270a004037f8' into 5.00_reb... ... 07f521c ...ase_to_pr @ctk21 Remove unnecessary old_ephemeron_api tags on ephemeron tests e8aa487 @ctk21 Add tools/check-symbol-names to ci/actions/runner.sh 4cade9c @ctk21 Remove unused symbols in memory; static scope for symbols picked up b... ... 536994d ...y check-symbol-names @ctk21 Restore stock README 34c7ccc @ctk21 Update Changes for multicore OCaml PR 59e1b04 @ctk21 Revert github ISSUE_TEMPLATE to ocaml/ocaml version 316db3a @ctk21 Revert to ocaml/ocaml for various .git* noise; README.md in Makefile ... ... 9e388fe ...and revert workflows/hygiene.yml @gasche Copy link Member @gasche gasche commented Dec 21, 2021 Congratulations! Github is completely unusable for changes this big. What tooling did you use to check that the diff is as we expect, and can you show the corresponding outputs when relevant? In particular I wonder about the "small things" that were not part of the review discussions: * what are the changes to the testsuite? * are there changes to the CI setup, if yes, why? * are there changes to the documentation, the README/HACKING/ CONTRIBUTING? * are there changes to the manual? (I'm planning to look at a local checkout of the branch eventually, but I would guess that some study of the actual patchset content was made when preparing the monster-PR.) Sorry, something went wrong. revskill10 revskill10 approved these changes Dec 21, 2021 View changes Copy link @revskill10 revskill10 left a comment LGTM Sorry, something went wrong. @gadmm gadmm mentioned this pull request Dec 21, 2021 Synchronization of refcount fields in bigarray.h/io.h #10832 Open @gadmm Copy link Contributor @gadmm gadmm commented Dec 21, 2021 * [ ] #10832 (Please moderate/avoid spam in this PR, to avoid having to limit who can contribute.) 2 Sorry, something went wrong. Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Reviewers @revskill10 revskill10 Assignees No one assigned Labels None yet Projects None yet Milestone No milestone Linked issues Successfully merging this pull request may close these issues. None yet 13 participants @kayceesrk @gasche @gadmm @revskill10 @sadiqj @ctk21 @bikallem @Engil @Sudha247 @jmid @yallop @xavierleroy @dra27 Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.