Skip to content

Introduce backwards compatible infrastructure for parallelism #1708

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.

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

Merged
merged 27 commits into from
May 15, 2025

Conversation

arkocal
Copy link
Contributor

@arkocal arkocal commented Mar 11, 2025

This contains the rather harmless parts. As discussed, all variations of modules have been implemented using domain_shims and the select stanza in dune. ppx_optcomp is not involved anymore.

The PR is rather large, but can be reviewed commit-by-commit.

arkocal and others added 7 commits March 11, 2025 10:16
In order to maintain backwards compatibility, we need to provide
stubs for functionality needed for parallelism when no libraries
provide this. Also, to keep possibly diverging parts to a minimum,
the utilities for parallelism are kept in a separate module.
This works async in Ocaml4 and truly parallel in OCaml5
fix printing issue by using BatFormat in messages.ml
This is a high level abstraction AND a backward compat. wrapper
Possibly, this could be needed elsewhere, where state is involved
Make stack DLS and initialize for each domain
Actually implemented by Felix Krayer
@arkocal arkocal force-pushed the parallelism_backwards_compat_1 branch from 522315f to 80cac2a Compare March 11, 2025 09:36
@arkocal arkocal force-pushed the parallelism_backwards_compat_1 branch from 80cac2a to 3f7d226 Compare March 11, 2025 09:38
@arkocal arkocal added the parallel Parallel Goblint label Mar 11, 2025
@arkocal
Copy link
Contributor Author

arkocal commented Mar 11, 2025

Turns out introducing domain_shims breaks GobView. The application than outputs

Uncaught TypeError: runtime.caml_thread_self is not a function

on the console and hangs indefinitely.

@sim642 sim642 self-requested a review March 11, 2025 12:52
@michael-schwarz
Copy link
Member

Turns out introducing domain_shims breaks GobView. The application than outputs

Do you know where this call happens? Is it something we can safely stub to just return unit or somehow avoid these calls when in Gobview mode?

@michael-schwarz
Copy link
Member

I guess we either need to turn the gobview job into an unlocked one, or provide a different lockfile for the gobview job somehow?

@sim642 sim642 added the setup Dependencies, CI, releasing label Mar 26, 2025
@michael-schwarz michael-schwarz requested a review from Copilot April 8, 2025 22:32
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 8 out of 25 changed files in this pull request and generated 1 comment.

Files not reviewed (17)
  • dune-project: Language not supported
  • goblint.opam: Language not supported
  • goblint.opam.locked: Language not supported
  • src/cdomain/value/cdomains/mutexAttrDomain.ml: Language not supported
  • src/cdomain/value/dune: Language not supported
  • src/common/util/messages.ml: Language not supported
  • src/config/options.schema.json: Language not supported
  • src/dune: Language not supported
  • src/goblint_lib.ml: Language not supported
  • src/lifters/wideningTokenLifter.ml: Language not supported
  • src/solver/dune: Language not supported
  • src/util/parallel/domainsafeLazy.ml: Language not supported
  • src/util/parallel/domainsafeLazy.mli: Language not supported
  • src/util/parallel/dune: Language not supported
  • src/util/parallel/gobMutex.domainslib.ml: Language not supported
  • src/util/parallel/gobMutex.no-domainslib.ml: Language not supported
  • src/util/parallel/threadpool.domainslib.ml: Language not supported
Comments suppressed due to low confidence (1)

.github/workflows/unlocked.yml:255

  • [nitpick] Consider using consistent capitalization for 'GobView' across workflow configurations to align with the documentation.
gobview:

@sim642
Copy link
Member

sim642 commented Apr 9, 2025

Looks like the Copilot reviews won't be too useful for us right now since it doesn't want to review .ml files.

@sim642 sim642 self-requested a review April 9, 2025 06:50
@michael-schwarz michael-schwarz self-requested a review May 6, 2025 10:30
@sim642 sim642 self-requested a review May 13, 2025 07:05
@sim642 sim642 added this to the v2.6.0 milestone May 14, 2025
@arkocal arkocal merged commit e134fca into goblint:master May 15, 2025
11 checks passed
@sim642 sim642 mentioned this pull request May 21, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parallel Parallel Goblint setup Dependencies, CI, releasing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants