Issues with BGP Timers (May 2009)

From Tau Wiki
Revision as of 23:30, 8 May 2009 by Amorris (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

We have been having a lot of trouble with the -BGPTIMERS option in TAU recently, there are numerous bugs in linking depending on the compiler and options that we are trying to work around.

First, some things that we know:

BGPTIMERS can be used statically with XLC.

Given two files. bgwtime.c:

/* bgwtime.c */

#include <common/bgp_personality.h>
#include <common/bgp_personality_inlines.h>
#include <spi/kernel_interface.h>

/* return time in seconds */
double bg_wtime() {
 static double bgp_clockspeed = 0.0;

 if (bgp_clockspeed == 0.0) {
   _BGP_Personality_t mybgp;
   Kernel_GetPersonality(&mybgp, sizeof(_BGP_Personality_t));
   bgp_clockspeed = 1.0/(double)BGP_Personality_clockMHz(&mybgp);
 }
 return (_bgp_GetTimeBase() * bgp_clockspeed);
}