Skip to content

Commit 97b2f7f

Browse files
committed
Marks --mpi as deprecated
1 parent c535b3a commit 97b2f7f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

scorep/__main__.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import scorep.instrumenter
55
import scorep.subsystem
66
import scorep.helper
7-
from scorep.helper import print_err
7+
from scorep.helper import get_scorep_version, print_err
88

99

1010
def _err_exit(msg):
@@ -13,13 +13,12 @@ def _err_exit(msg):
1313

1414

1515
def print_help():
16-
print("""
16+
print("""\
1717
Usage: python -m scorep [options] [--] <script> [args]
1818
1919
Score-P Python instrumentation wrapper. The following options control how the program is instrumented and executed. Any unknown option are passed directly to 'scorep-config'.
2020
2121
--help Show this help message and exit.
22-
--mpi Enable MPI instrumentation (equivalent to --mpp=mpi).
2322
--keep-files Keep temporary files after execution.
2423
--verbose, -v Enable verbose output for debugging and tracing.
2524
--nopython Disable instrumentation of Python code.
@@ -30,7 +29,7 @@ def print_help():
3029
--instrumenter-file=<file>
3130
Path to a Python script that is executed before the application.
3231
Allows instrumentation of specific modules and functions without modifying their source code.
33-
-- Stop parsing Score-P options; pass following args to your script.
32+
-- Stop parsing Score-P options; interpret all following arguments verbatim as the program with its arguments.
3433
3534
Other options starting with '-' are passed directly to 'scorep-config'.
3635
To view all available Score-P configuration options, run: scorep-config --help
@@ -43,7 +42,7 @@ def print_help():
4342
if configured.
4443
You can enable Python instrumentation manually from within your application's source code,
4544
e.g., by calling 'scorep.instrumenter.enable()'.
46-
""")
45+
""") # noqa: E501
4746

4847

4948
def scorep_main(argv=None):
@@ -73,6 +72,8 @@ def scorep_main(argv=None):
7372
show_help = True
7473
break
7574
elif elem == "--mpi":
75+
print_err(f"scorep: Warning: The option '{elem}' is deprecated "
76+
"and will be removed in future.")
7677
scorep_config.append("--mpp=mpi")
7778
elif elem == "--keep-files":
7879
keep_files = True
@@ -82,7 +83,7 @@ def scorep_main(argv=None):
8283
no_instrumenter = True
8384
elif elem == "--noinstrumenter":
8485
no_instrumenter = True
85-
elif elem in ["--io=runtime:posix", "--io=posix"]:
86+
elif elem in ["--io=runtime:posix", "--io=posix"] and get_scorep_version() >= 9.0:
8687
print_err(f"scorep: Warning: The option '{elem}' is deprecated.")
8788
if "SCOREP_IO_POSIX" in os.environ:
8889
print_err(" Will not overwrite existing value for environment variable "

0 commit comments

Comments
 (0)