Problem with Using Counters (ITAC)

Problem with Using Counters (ITAC)


I'm using the following code to log the variable momentum whenever its value changes at runtime:

int pd_counter_handle;
int counter_class;
const float boundaries[2]={0,50000};
VT_classdef( "Counters", &counter_class);
VT_countdef( "Pressure Development", counter_class, VT_COUNT_FLOAT|VT_COUNT_VALID_SAMPLE|VT_COUNT_ABSVAL, VT_ME, boundaries,"#",&pd_counter_handle);

if(prev_momentum != momentum)
prev_momentum = momentum;
printf("Momentum on Process %d is %f\n\r", me, momentum);
VT_countval(1, &pd_counter_handle, &momentum);

The above printf(), outputs the following values:

Momentum on Process 0 is 27.242283
Momentum on Process 0 is 89.986145
Momentum on Process 0 is 168.204178
Momentum on Process 0 is 17109.033203
Momentum on Process 0 is 17178.119141
Momentum on Process 0 is 17230.960938

So I expected the same values to be logged, but as can be seen in the attached snapshot, ITAC doesn't even show the vertical number range! Could you please tell me what the problem may be?


Downloadimage/jpeg 80143.jpg4.25 KB
2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Farrokh,

Thanks for posting here. I would actually suggest that you submit an issue for the Intel Trace Analyzer and Collector product at the Intel Premier Support site. When you do so, let us know which version of the tool you're using, as well as provide a short reproducer of the issue (perhaps the app you already have instrumented with the Intel Trace Analyzer and Collector API calls). That willhelp us investigate this further on a local system.

Thanks in advance, and I hope to hear from you soon.


Leave a Comment

Please sign in to add a comment. Not a member? Join today