Skip to content

Commit 9364d5a

Browse files
committed
wip
1 parent 2c59a82 commit 9364d5a

File tree

5 files changed

+420
-6
lines changed

5 files changed

+420
-6
lines changed

projects/rocprofiler-sdk/external/otf2/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ externalproject_add(
5959
CONFIGURE_COMMAND
6060
${CMAKE_COMMAND} -E env CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER}
6161
<SOURCE_DIR>/configure -q --enable-silent-rules --prefix=${_otf2_root}
62-
--libdir=${_otf2_root}/${CMAKE_INSTALL_LIBDIR} CFLAGS=-fPIC\ -O3\ -g
63-
CXXFLAGS=-fPIC\ -O3\ -g LDFLAGS= PYTHON=: SPHINX=:
64-
BUILD_COMMAND ${MAKE_COMMAND} install -s
62+
--libdir=${_otf2_root}/${CMAKE_INSTALL_LIBDIR} CFLAGS=-fPIC\ -O0\ -g
63+
CXXFLAGS=-fPIC\ -O0\ -g LDFLAGS= PYTHON=: SPHINX=:
64+
BUILD_COMMAND ${MAKE_COMMAND} install
6565
BUILD_BYPRODUCTS "${_otf2_build_byproducts}"
6666
INSTALL_COMMAND "")
6767

projects/rocprofiler-sdk/source/lib/python/rocpd/otf2.py

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,44 @@
2626
from .importer import RocpdImportData
2727
from .time_window import apply_time_window
2828
from . import output_config
29-
from . import libpyrocpd
29+
from .otf2_writer import write_otf2 as py_write_otf2
3030

3131

3232
def write_otf2(importData, config):
33-
return libpyrocpd.write_otf2(importData, config)
33+
py_write_otf2(importData, config)
34+
35+
# Read back the written OTF2 file and print its contents
36+
# from pathlib import Path
37+
# import importlib.util
38+
# import os
39+
40+
# otf2_reader_path = os.path.join(
41+
# os.path.dirname(__file__),
42+
# "..",
43+
# "..",
44+
# "..",
45+
# "..",
46+
# "tests",
47+
# "pytest-packages",
48+
# "rocprofiler_sdk",
49+
# "pytest_utils",
50+
# "otf2_reader.py",
51+
# )
52+
# otf2_reader_path = os.path.abspath(otf2_reader_path)
53+
# spec = importlib.util.spec_from_file_location("otf2_reader", otf2_reader_path)
54+
# otf2_reader = importlib.util.module_from_spec(spec)
55+
# spec.loader.exec_module(otf2_reader)
56+
# OTF2Reader = otf2_reader.OTF2Reader
57+
58+
# trace_dir = getattr(config, "output_path", "./otf_traces")
59+
# trace_file = f"{getattr(config, "output_file", "traces")}_results"
60+
# otf2_path = f"{trace_dir}/{trace_file}.otf2"
61+
## Read and print contents
62+
# import pdb
63+
64+
# pdb.set_trace()
65+
# df, _ = OTF2Reader(otf2_path).read()
66+
# print(f"\nOTF2Reader DataFrame:\n{df}")
3467

3568

3669
def execute(input, config=None, window_args=None, **kwargs):

0 commit comments

Comments
 (0)