Skip to content

Adds support for --help option #170

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Adds support for --help option #170

wants to merge 4 commits into from

Conversation

NanoNabla
Copy link
Collaborator

Fixes #165

@NanoNabla NanoNabla requested a review from bertwesarg July 7, 2025 12:04
@NanoNabla NanoNabla requested a review from bertwesarg July 31, 2025 10:54
@NanoNabla NanoNabla force-pushed the pr_165 branch 2 times, most recently from 74ba099 to 07a34a2 Compare July 31, 2025 15:21
--instrumenter-type=<t> Specify custom instrumenter type (e.g., cProfile).
--instrumenter-file=<f> Path to a Python script that is executed before the application.
Allows instrumentation of specific modules and functions without modifying their source code.
-- Stop parsing Score-P options; pass following args to your script.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
-- Stop parsing Score-P options; pass following args to your script.
-- Stop parsing Score-P options; pass following args to your script.

that could be understood that --foo -- --baz ./bar --arg will be ./bar --arg --baz

"; interpret all following arguments verbatim as the program with its arguments"

--nocompiler Disable compiler-based instrumentation.
--nopython Disable instrumentation of Python code.
Instrumentation can still be enabled later from within the application's source code.
--noinstrumenter Same as --nopython.
Copy link
Member

Choose a reason for hiding this comment

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

time to deprecate that option?

Copy link
Member

Choose a reason for hiding this comment

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

add --instrumenter-type=none in the future? and make --noinstrumenter an alias?

--help Show this help message and exit.
--mpi Enable MPI instrumentation (equivalent to --mpp=mpi).
--keep-files Keep temporary files after execution.
--verbose, -v Enable verbose output for debugging and tracing.
Copy link
Member

Choose a reason for hiding this comment

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

what means "tracing" in this context?

Score-P Python instrumentation wrapper. The following options control how the program is instrumented and executed:

--help Show this help message and exit.
--mpi Enable MPI instrumentation (equivalent to --mpp=mpi).
Copy link
Member

Choose a reason for hiding this comment

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

is this already marked as deprecated?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

--mpi is a wrapper for --mpp=mpi in the bindings, designed to make it more intuitive for Python users. I get the point why to mark it deprecated

Copy link
Member

Choose a reason for hiding this comment

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

the code does not support your claim. if so, --mpp=mpi should be handled by Python too, but its not, and --mpi just passes --mpp=mpi to scorep-config. The README uses --mpp=mpi and notes that "The traditional --mpi does still work". so advertising it in the --help does not make sense to me. --mpp=mpi should, and thats why I suggested to add a "Common options to Score-P"-section, which should also mention --thread=pthread or --thread=ompt, if thats supported by Score-P

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

--mpp-mpi is passed directly to scorep-config and works without any special handling of Python. Therefore I didn't mention it here.

If you really want to, we can deprecate --mpi and remove it in the near future. From my point of view, it's currently being used mainly for convenience.
Alternatively, we could just update the README.

I’ve deliberately avoided listing scorep-config options so far and instead referred to scorep-config --help, because I don’t want to maintain that across different Score-P versions.
For example --io=runtime:posix works in older Score-P versions regardless of the bindings.

Allows instrumentation of specific modules and functions without modifying their source code.
-- Stop parsing Score-P options; pass following args to your script.

Other options starting with '-' are passed directly to 'scorep-config'.
Copy link
Member

Choose a reason for hiding this comment

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

that needs to be more prominent at the beginning

Comment on lines +22 to +24
--mpi Enable MPI instrumentation (equivalent to --mpp=mpi).
--keep-files Keep temporary files after execution.
--verbose, -v Enable verbose output for debugging and tracing.
Copy link
Member

Choose a reason for hiding this comment

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

maybe put these into its own section name "Common options from scorep-config"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

All 3 parameters are specific to the bindings and do not originate directly from scorep-config.

Copy link
Member

Choose a reason for hiding this comment

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

--mpi:

            elif elem == "--mpi":
                scorep_config.append("--mpp=mpi")

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is passing something to scorep_config but it is not an option which originate directly from scorep-config

$ scorep-config --help | grep -- '--mpi'
   --mpicc    Prints the MPI C compiler name.
   --mpicxx   Prints the MPI C++ compiler name.
   --mpifc    Prints the MPI Fortran compiler name.
   --mpilibtool  

That are common options for scorep-config as well as --mpp=mpi but not --mpi

Copy link
Member

Choose a reason for hiding this comment

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

--mpi does not show up in --help as it is marked deprecated

NanoNabla and others added 2 commits August 4, 2025 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Score-P help breaks Python binding workflow
2 participants