Skip to content

Commit b09300d

Browse files
committed
hotfix: Update log path handling to support multiple log paths and ensure consistency
1 parent 4b1a58f commit b09300d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Diff for: drishti/handlers/handle_darshan.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ def handler():
116116

117117
insights_start_time = time.time()
118118

119-
log = darshanll.log_open(args.log_path)
119+
darshan_log_path = args.log_paths[0]
120+
log = darshanll.log_open(darshan_log_path)
120121

121122
modules = darshanll.log_get_modules(log)
122123

@@ -129,8 +130,8 @@ def handler():
129130
library_version = darshanll.get_lib_version()
130131

131132
# Make sure log format is of the same version
132-
filename = args.log_path
133-
# check_log_version(console, args.log_path, log_version, library_version)
133+
filename = darshan_log_path
134+
# check_log_version(console, darshan_log_path, log_version, library_version)
134135

135136
darshanll.log_close(log)
136137

@@ -752,7 +753,7 @@ def handler():
752753
job['exe'].split()[0]
753754
),
754755
' [b]DARSHAN[/b]: [white]{}[/white]'.format(
755-
os.path.basename(args.log_path)
756+
os.path.basename(darshan_log_path)
756757
),
757758
' [b]EXECUTION TIME[/b]: [white]{} to {} ({:.2f} hours)[/white]'.format(
758759
job_start,
@@ -794,7 +795,7 @@ def handler():
794795
display_footer(console, insights_start_time, insights_end_time)
795796

796797
# Export to HTML, SVG, and CSV
797-
trace_name = os.path.basename(args.log_path).replace('.darshan', '')
798+
trace_name = os.path.basename(darshan_log_path).replace('.darshan', '')
798799
out_dir = args.export_dir if args.export_dir != "" else os.getcwd()
799800

800801
export_html(console, out_dir, trace_name)

0 commit comments

Comments
 (0)