10 #define _XOPEN_SOURCE 700
29 #if defined(_SION_BGP) && defined(SION_MPI)
31 #include <spi/kernel_interface.h>
32 #include <common/bgp_personality.h>
33 #include <common/bgp_personality_inlines.h>
36 static double clockspeed = 1.0e-6 / 850.0;
38 double bgp_wtime(
void)
40 return (_bgp_GetTimeBase() * clockspeed);
43 #elif defined(_SION_BGQ) && defined(SION_MPI)
45 #include <firmware/include/personality.h>
46 #include <spi/include/kernel/process.h>
47 #include <spi/include/kernel/location.h>
49 #include <hwi/include/bqc/A2_inlines.h>
51 #include <hwi/include/common/uci.h>
53 static double clockspeed = 1.0e-6 / 850.0;
55 double bgq_wtime(
void)
58 return ( __mftb() * elg_clockspeed );
59 #elif defined __GNUC__
60 return ( GetTimeBase() * elg_clockspeed );
62 #error "Platform BGQ: cannot determine timebase"
72 #if defined(_SION_BGQ) && defined(SION_MPI)
74 #elif defined(_SION_BGP) && defined(SION_MPI)
78 gettimeofday (&tp, (
struct timezone *)NULL);
79 return tp.tv_sec + tp.tv_usec/1000000.0;
97 DPRINTFP((32,
"TIMINGS", rank,
" step=%-18s timestamp=%18.8f AA \n", desc,
_sion_get_time()));
int sion_print_time_stamp(int rank, char *desc)
Prints a sion time stamp.
double _sion_get_time(void)
Returns the current time as a double.