Skip to content

Save to text produces bogus results #26

@rodarima

Description

@rodarima

When using the "Save > Text ..." feature (which exports to a tab separated file, even if the file is called CSV), the events at the edges are not cut properly.

Here is an example PRV:

#Paraver (19/01/38 at 03:14):2000_ns:0:1:1(1:1)
2:0:1:1:1:0000:99:0
2:0:1:1:1:1010:99:1
2:0:1:1:1:1020:99:2
2:0:1:1:1:1030:99:3
2:0:1:1:1:1090:99:5
2:0:1:1:1:2000:99:0

And an example CFG:

#ParaverCFG
ConfigFile.Version: 3.4
ConfigFile.NumWindows: 1
ConfigFile.BeginDescription

ConfigFile.EndDescription

################################################################################
< NEW DISPLAYING WINDOW Test >
################################################################################
window_name Test
window_type single
window_id 1
window_position_x 135
window_position_y 175
window_width 600
window_height 150
window_comm_lines_enabled true
window_flags_enabled false
window_noncolor_mode true
window_custom_color_enabled false
window_semantic_scale_min_at_zero false
window_logical_filtered true
window_physical_filtered false
window_intracomms_enabled true
window_intercomms_enabled true
window_comm_fromto true
window_comm_tagsize true
window_comm_typeval true
window_units Nanoseconds
window_maximum_y 5.000000000000
window_minimum_y 1.000000000000
window_compute_y_max false
window_level thread
window_scale_relative 0.550000000000
window_end_time_relative 0.550000000000
window_object appl { 1, { All } }
window_begin_time_relative 0.500000000000
window_open true
window_drawmode draw_randnotzero
window_drawmode_rows draw_randnotzero
window_pixel_size 1
window_labels_to_draw 1
window_object_axis_position 0
window_selected_functions { 14, { {cpu, Active Thd}, {appl, Adding}, {task, Adding}, {thread, Last Evt Val}, {node, Adding}, {system, Adding}, {workload, Adding}, {from_obj, All}, {to_obj, All}, {tag_msg, All}, {size_msg, All}, {bw_msg, All}, {evt_type, =}, {evt_value, All} } }
window_compose_functions { 9, { {compose_cpu, As Is}, {compose_appl, As Is}, {compose_task, As Is}, {compose_thread, As Is}, {compose_node, As Is}, {compose_system, As Is}, {compose_workload, As Is}, {topcompose1, As Is}, {topcompose2, As Is} } }
window_filter_module evt_type 1 99
window_filter_module evt_type_label 1 "Unknown"

Which when loaded in Paraver show:

Image

Notice how the axis is zoomed to 1000 and 1100 ns. When exported to text, the output file is (headers added for clarity):

# obj	start	length	val
1.1.1	0.00	1010.00	0.00
1.1.1	1010.00	10.00	1.00
1.1.1	1020.00	10.00	2.00
1.1.1	1030.00	60.00	3.00
1.1.1	1090.00	910.00	5.00

The duration of the first event (value 0) goes from 0 to 1010 ns, however, the cut region only starts at 1000 ns. Similarly the end event (value 5) should stop at 1100 ns, but continues to 1090 + 910.

This is causing bogus results when using these values to compute other statistics from traces. Additionally, the information of where the cut happened is not stored anywhere, so we cannot fix it ourselves.

This is the expected result:

# obj	start	length	val
1.1.1	1000.00	10.00	0.00
1.1.1	1010.00	10.00	1.00
1.1.1	1020.00	10.00	2.00
1.1.1	1030.00	60.00	3.00
1.1.1	1090.00	10.00	5.00

Notice the sum of the event duration is the same as the time range, 100 ns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions