feature(parallel): add parallel plugin execution with resource-aware scheduling#10
Merged
movingpictures83 merged 1 commit intoMay 14, 2026
Conversation
ef26e38 to
e4a8bdd
Compare
…scheduling Introduces explicit Parallel/EndParallel blocks in pipeline config files to run independent plugins concurrently via fork()-based process isolation. Components: - ConfigParser: parses Parallel blocks with workers/memory/gpu/fail options - ResourceBudget: tracks memory, GPU, and worker slot allocation - ParallelScheduler: fork-based dispatch with fail-fast/continue modes - Unit tests (Catch2): 67 tests covering parser, budget, and scheduler - Fuzz targets (libFuzzer): parse_size, parse_config, parse_plugin_task, resource_budget with seed corpus Made-with: Cursor
10a9951 to
8546ecf
Compare
quinnjr
added a commit
to quinnjr/PluMA
that referenced
this pull request
May 21, 2026
Brings the windows-support work onto current master (post PRs FIUBioRG#7, FIUBioRG#8, FIUBioRG#10, FIUBioRG#11, FIUBioRG#13) and reconciles the build configuration. The branch was originally cut from 819d31a, before the SConstruct refactor and the Rust / parallel / venv / build-fix series merged; a direct rebase would have rewritten history beyond recognition, so we instead merge master in and re-apply the windows-specific additions on top of the refactored build files. Resolution strategy: - SConstruct, build_config.py, build_support.py: take master's post-refactor versions wholesale, then layer the windows-only additions on top. - All other files (the Rust loader, the parallel scheduler, the Catch2 tests, the fuzz harness) merge cleanly from master with no intervention. Windows-specific additions preserved: - build_config.py gains is_msvc / is_mingw toolchain detection (alongside the is_windows / is_darwin / is_linux / is_alpine flags master already defines), an is_unix convenience flag, and platform-specific shared_lib_ext / shared_lib_prefix / executable_ext / path_separator constants. Windows overrides lib_search_path and include_search_path because the /lib + /usr/lib + /usr/local/lib convention doesn't apply. - SConstruct's get_platform_config() picks up Windows / MSVC / MinGW branches that set PLUMA_PLATFORM_WINDOWS, WIN32_LEAN_AND_MEAN, and NOMINMAX defines (so src/platform.h selects the LoadLibrary / GetProcAddress code path) and, for MinGW, --export-all-symbols + psapi. - create_base_environment() splits CCFLAGS / CXXFLAGS into MSVC (/EHsc /utf-8 /O2) and gcc-style branches. - src/platform.h is preserved from the original branch and used by src/main.cxx and the language loaders to abstract dlopen / glob / pthread away from POSIX-specific includes. Verified on Linux: clean scons build with --with-rust still produces a pluma binary that imports dlsym (HAVE_RUST wiring intact); the binary has all the upstream PRs' contributions present.
5 tasks
quinnjr
added a commit
to quinnjr/PluMA
that referenced
this pull request
May 21, 2026
…-julia Brings the Julia support work onto current master (post PRs FIUBioRG#7, FIUBioRG#8, FIUBioRG#10, FIUBioRG#11, FIUBioRG#13) and makes Julia strictly opt-in via a new --with-julia SConstruct flag. Resolution strategy: - SConstruct, build_support.py, src/PluGen/{main.cxx,README}, src/PluginManager.h: take master's post-refactor versions, then layer Julia-specific additions on top. - src/languages/Julia.{cxx,h} and src/PluGen/JuliaPluginGenerator.{cxx,h} merge cleanly with no intervention (they did not exist on master). - Everything else (Rust loader, parallel scheduler, plugin venv, Catch2 tests, fuzz harness) merges cleanly from master. Feature-flag gating (new behavior): - New SConstruct option `--with-julia` (default: False) added to OPTIONS. - configure_julia() runs only when the flag is set; it calls detect_julia_config() and, on success, appends CPPPATH, LIBPATH, -ljulia, and the HAVE_JULIA preprocessor define. On failure (libjulia not found despite the flag), it logs a warning and the build continues without Julia rather than aborting. - env["JULIA_ENABLED"] is set from configure_julia()'s return value; build_main_executable() appends "julia" to program_libs only when JULIA_ENABLED is True. - src/PluginManager.h gains an `#ifdef HAVE_JULIA` block that registers the Julia language driver, matching the existing HAVE_JAVA / HAVE_RUST pattern. - The default `scons` invocation (no flag) does NOT require libjulia to be installed: Julia.cxx and Julia.h are already #ifdef HAVE_JULIA guarded internally, so the file compiles to a no-op stub. Julia detection layer (build_support.py): - New JuliaConfig dataclass parallel to the existing JavaConfig. - detect_julia_config() resolution order: $JULIA_HOME, then `julia -e 'print(Sys.BINDIR)'`, then a small list of fallback paths for Arch / Debian / Homebrew / official-binary installs. - CheckJulia() SCons Configure test. Verified on Linux without --with-julia: scons builds pluma cleanly, the binary links against the existing language libs (-lpython / -lperl / -lR / -lRInside / -ljvm) but NOT -ljulia; Julia.cxx is compiled as a no-op stub. With --with-julia and libjulia installed, the binary additionally links -ljulia and registers the Julia driver in PluginManager.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for running independent pipeline plugins concurrently via explicit
Parallel/EndParallelblocks in PluMA configuration files. This enables significant speedups for pipelines with independent processing steps while preserving PluMA's modular plugin architecture.Key features
Parallel/EndParalleldirectives in config files withworkers,memory,gpu, andfailoptionsfail=fast(default) aborts on first error;fail=continueruns all tasksConfig syntax example
Components
src/ParallelTypes.hParallelBlock,PluginTask,ResourceBudget, etc.)src/ConfigParser.{h,cxx}Parallelblocks, size strings, plugin taskssrc/ResourceBudget.{h,cxx}src/ParallelScheduler.{h,cxx}tests/fuzz/Testing
Test plan
ConfigParserandParallelSchedulerintosrc/PluMA.cxxmain loopMade with Cursor