diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 2de9876..4eb284e 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ["3.8", "3.9", "3.10", "3.11", "3.12", 'pypy-2.7', 'pypy-3.7', 'pypy-3.9', 'pypy-3.10'] + python: ["3.9", "3.10", "3.11", "3.12", "3.13", 'pypy-2.7', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10', 'pypy-3.11'] fail-fast: false steps: @@ -22,7 +22,7 @@ jobs: key: ${{ runner.os }}-pip - name: Add Score-P repo - run: sudo add-apt-repository ppa:andreasgocht/scorep + run: sudo add-apt-repository ppa:score-p/releases - name: Install Score-P run: sudo apt-get -y install scorep diff --git a/README.md b/README.md index 40c9f47..0dae8fc 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ scorep is a module that allows tracing of python scripts using [Score-P](https:/ You need at least Score-P 5.0, build with `--enable-shared` and the gcc compiler plugin. Please make sure that `scorep-config` is in your `PATH` variable. -For Ubuntu LTS systems there is a non-official ppa of Score-P available: https://launchpad.net/~andreasgocht/+archive/ubuntu/scorep . +The Score-P community provides an unofficial PPA for Ubuntu LTS systems: https://launchpad.net/~score-p/+archive/ubuntu/releases . Then install the package from PyPI diff --git a/pyproject.toml b/pyproject.toml index ff96c9f..83fc169 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] requires = [ - "setuptools >= 40.9.0", + "setuptools >= 68.0.0", ] -build-backend = "setuptools.build_meta:__legacy__" \ No newline at end of file +build-backend = "setuptools.build_meta:__legacy__" diff --git a/scorep/__main__.py b/scorep/__main__.py index f192920..0cc4b88 100644 --- a/scorep/__main__.py +++ b/scorep/__main__.py @@ -21,7 +21,6 @@ def scorep_main(argv=None): keep_files = False verbose = False - no_default_threads = False no_default_compiler = False no_instrumenter = False if scorep.instrumenter.has_c_instrumenter(): @@ -40,9 +39,6 @@ def scorep_main(argv=None): keep_files = True elif elem == "--verbose" or elem == '-v': verbose = True - elif "--thread=" in elem: - scorep_config.append(elem) - no_default_threads = True elif elem == "--nocompiler": scorep_config.append(elem) no_default_compiler = True @@ -50,6 +46,14 @@ def scorep_main(argv=None): no_instrumenter = True elif elem == "--noinstrumenter": no_instrumenter = True + elif elem in ["--io=runtime:posix", "--io=posix"]: + print_err(f"scorep: Warning: The option '{elem}' is deprecated.") + if "SCOREP_IO_POSIX" in os.environ: + print_err(" Will not overwrite existing value for environment variable " + f"'SCOREP_IO_POSIX={os.environ['SCOREP_IO_POSIX']}'.") + else: + print_err(" The environment variable 'SCOREP_IO_POSIX=true' is set and will be used.") + os.environ["SCOREP_IO_POSIX"] = "true" elif "--instrumenter-type" in elem: param = elem.split("=") instrumenter_type = param[1] @@ -64,9 +68,6 @@ def scorep_main(argv=None): else: prog_argv.append(elem) - if not no_default_threads: - scorep_config.append("--thread=pthread") - if not no_default_compiler: scorep_config.append("--compiler") diff --git a/setup.py b/setup.py index 33d2a63..d391c3b 100644 --- a/setup.py +++ b/setup.py @@ -27,6 +27,8 @@ ) +install_requires= ["setuptools>=68.0.0"] + cmodules = [] (include, _, _, _, _) = scorep.helper.generate_compile_deps([]) src_folder = os.path.abspath("src") @@ -76,6 +78,7 @@ Besides this, it uses the traditional python-tracing infrastructure. """, packages=["scorep", "scorep._instrumenters"], + install_requires=install_requires, ext_modules=cmodules, classifiers=[ "Development Status :: 5 - Production/Stable", @@ -83,16 +86,11 @@ "Intended Audience :: Developers", "Topic :: Software Development :: Testing", "Topic :: Software Development :: Quality Assurance", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Operating System :: POSIX", diff --git a/test/test_scorep.py b/test/test_scorep.py index 01aa21c..228c8de 100755 --- a/test/test_scorep.py +++ b/test/test_scorep.py @@ -375,6 +375,7 @@ def test_threads(scorep_env, instrumenter): @foreach_instrumenter def test_io(scorep_env, instrumenter): trace_path = get_trace_path(scorep_env) + scorep_env["SCOREP_IO_POSIX"] = "true" print("start") std_out, std_err = utils.call_with_scorep( @@ -383,7 +384,6 @@ def test_io(scorep_env, instrumenter): "--nocompiler", "--instrumenter-type=" + instrumenter, "--noinstrumenter", - "--io=runtime:posix", ], env=scorep_env, ) @@ -397,8 +397,9 @@ def test_io(scorep_env, instrumenter): # print_regex = "STDOUT_FILENO" ops = { - "open": {"ENTER": "open64", "IO_CREATE_HANDLE": file_regex, "LEAVE": "open64"}, - "seek": {"ENTER": "lseek64", "IO_SEEK": file_regex, "LEAVE": "lseek64"}, + # CPython calls "int open64( const char*, int, ... )" but PyPy calls "int open( const char*, int, ... )" + "open": {"ENTER": "open(64)?", "IO_CREATE_HANDLE": file_regex, "LEAVE": "open(64)?"}, + "seek": {"ENTER": "lseek(64)?", "IO_SEEK": file_regex, "LEAVE": "lseek(64)?"}, "write": { "ENTER": "write", "IO_OPERATION_BEGIN": file_regex, @@ -439,7 +440,7 @@ def test_io(scorep_env, instrumenter): for _, details in ops.items(): for event, data in details.items(): - regex_str = '{event:}[ ]*[0-9 ]*[0-9 ]*(Region|Handle): "{data:}"'.format( + regex_str = '{event:}[ ]*[0-9 ]*[0-9 ]*(Region|Handle): ".*{data:}.*"'.format( event=event, data=data ) print(regex_str)