Summary of Discussions about Implementation Issues

[These comments were supplied by Baljinder Ghotra, who coordinated the PTR effort until Spring of 1996]


During the last couple of months there have been a number of questions about the design and implementation of the Portable Timing Routines. These questions and my answers to these questions are listed here, in the hope that others can use these and more importantly give me feedback about these questions/issues.


For a summary of the discussion about the header files click here.

Some implementation related questions

  1. The purpose of opt_ticksize as an argument for PTR_init_wall_timer.
    The opt_ticksize argument is used to supply a value for tick period (as defined in the header file), a value that the user may have calculated, or 0 is supplied if the user wishes to calculate the value at runtime. I am currently storing the value in a static variable for internal use by the routines (especially during interval calculation).

  2. The need to distinguish Fortran bindings and C bindings, in case vendors want to provide Fortran wrappers for C bindings.
    Currently all the Fortran subroutine names are in all caps. Whereas the C routines have the first character capitalized (after the PTR_ prefix) and all the rest of the characters are lower case.

    For the Fortran version it might be a good idea to make them all lowercase since the compiler does this anyway. But this has to be agreed upon by the group as a whole.

  3. The need for timer constants to be thread private variables.
    According to my understanding we are not doing anything about threads at this point. I guess we can bring up this point with the working group as a whole.

  4. The difference between tick value and the resolution.
    Here is the definition of Resolution as presented in the PTR Overview.

    The minimal time unit that can be measured with confidence. It will be at least as coarse as the tick period, and probably coarser since many timers operate as step, rather than continuous functions. This value will be nominal (i.e., supplied by the vendor) indicating the number of bits that should be considered valid when calculating elapsed time.

  5. What is to be measured as overhead?
    The amount of time it taken by the routines that get the timer value, i.e., PTR_Get_???_time.

  6. Agreement on return values.
    The return type of all the subroutines is void.

    All status information is returned using the PTR_???_stat arguments (the last argument on the initialization and interval calculating routines). The PTR_Get_???_time routines don't return any status information.

    All information supplied by or returned by the routines is of type "double". This does not include the opaque timer values, those are of type PTR_???_timer_val (defined in the header files).

    Fortran types will be specified in the "ftimer.h" header file.


Post comments to the working group at ptools-ptr@ptools.org.