Skip to content

Adding scanner plugin for paraprof scanner#600

Open
anderkve wants to merge 7 commits into
masterfrom
paraprof_plugin
Open

Adding scanner plugin for paraprof scanner#600
anderkve wants to merge 7 commits into
masterfrom
paraprof_plugin

Conversation

@anderkve
Copy link
Copy Markdown
Collaborator

@anderkve anderkve commented May 21, 2026

This PR adds a ScannerBit python scanner plugin for the paraprof scanner: https://github.com/anderkve/paraprof

It also deletes the plugin to the older binminpy scanner, which was a precursor to paraprof, and which is no longer actively developed.

To test GAMBIT with paraprof:

  • Install paraprof: pip install git+https://github.com/anderkve/paraprof.git
  • Build GAMBIT with a minimal configuration.
    • To run the 5D Rosenbrock test below we should include ObjectivesBit, so add -DBits="ObjectivesBit" to your cmake config.
    • paraprof requires more than one MPI process, so build with -DWITH_MPI=True.
  • Run a test scan of a 5D Rosenbrock function, e.g.: mpiexec -np 5 ./gambit -rf yaml_files/spartan_5d.yaml

(This is our PR number 600! Wohoo!)

anderkve and others added 6 commits May 21, 2026 16:48
…-plugin-UlzKE

Brings in the paraprof-specific changes from the earlier UlzKE branch that
were not present on this branch. The newer gambit_paraprof.py plugin already
on paraprof_plugin is kept verbatim (it tracks the current paraprof API).

Added:
  - cmake/python_scanners.cmake: register paraprof for the Python module
    availability check.
  - yaml_files/spartan_5d.yaml: 5D Rosenbrock paraprof test scan using
    trivial_5d / rosenbrock from ObjectivesBit.
  - yaml_files/plot_spartan_5d_paraprof_2D.py: plotting helper for the 5D
    test's 2D projections.
  - yaml_files/spartan.yaml: paraprof entry alongside the other example
    scanners.

The CMakeLists.txt PYTHONLIBS_FOUND shim from UlzKE is intentionally not
brought over: with PYBIND11_FINDPYTHON=OFF (the default), find_package(pybind11)
falls back to Classic mode, which loads FindPythonLibsNew.cmake and sets
PYTHONLIBS_FOUND itself. The CLAUDE.md / MINIMAL_BUILD.md commits from
UlzKE are also skipped here as they are unrelated to paraprof.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@anderkve
Copy link
Copy Markdown
Collaborator Author

Adding @ChrisJChang and @andrewfowlie as suggested reviewers. No need for two reviews, though – whoever has time first can do it.

Copy link
Copy Markdown
Collaborator

@ChrisJChang ChrisJChang left a comment

Choose a reason for hiding this comment

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

I've tested this and it seems to work very well for me.

I like that it generates plots when you run it. Do you think it would be good to save the plots to the run folder (inside the scanner_plugin folder) instead of the working directory? This way you could do multiple concurrent runs without overlapping plots. No biggie if not, we have other things print to the working directory (e.g. writing hepmc files),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants