Projects
OpenHPC3:3.0:Factory
mvapich2-gnu12
_service:extract_file:mvapich2-get_cycles.patch
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:extract_file:mvapich2-get_cycles.patch of Package mvapich2-gnu12
--- a/src/mpid/ch3/channels/common/include/mv2_clock.h 2018-07-24 07:30:00.000000000 -0700 +++ b/src/mpid/ch3/channels/common/include/mv2_clock.h 2018-07-31 15:49:19.000000000 -0700 @@ -94,8 +94,22 @@ } #else -#warning get_cycles not implemented for this architecture: attempt asm/timex.h -#include <asm/timex.h> +#warning get_cycles not implemented for this architecture: using gettimeofday() fallback +#include <stddef.h> +#include <sys/time.h> + +typedef unsigned long long cycles_t; +static inline cycles_t get_cycles() +{ + cycles_t ret; + struct timeval tv = { 0 }; + + if (gettimeofday(&tv, NULL) != 0) + return 0; + ret = ((((cycles_t)(tv.tv_sec)) * 1000000ULL) + ((cycles_t)(tv.tv_usec))); + return ret; +} + #endif extern double get_cpu_mhz(void);
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.