#2721: Cactus does not detect `gettimeofday` timer
| Reporter: | Erik Schnetter |
| Status: | new |
| Milestone: | |
| Version: | |
| Type: | bug |
| Priority: | major |
| Component: |
Comment (by Roland Haas):
The current code works for me (e.g. on the Delta Cluster at UIUC, and also on Summit). I get:
/* Timing stuff */ #define HAVE_TIME_GETTIMEOFDAY 1 #define GETTIMEOFDAY_NEEDS_TIMEZONE 1 #define HAVE_TIME_GETRUSAGE 1
in cctk_Config.h for both. On my M1 based macOS testing system with Homebrew it does indeed fail:
/* Timing stuff */ /* #undef HAVE_TIME_GETTIMEOFDAY */ /* #undef GETTIMEOFDAY_NEEDS_TIMEZONE */ #define HAVE_TIME_GETRUSAGE 1
So, since we have just entered code freeze for the release in May, I would not want to touch anything in configure if possible. While the change looks harmless, and indeed:
#include <sys/time.h> int main(void) { gettimeofday(0,0); return 0; }
is much nicer code (and closer to how the actual arguments to TRY_LINK are defined) than
int main(void) { #include <sys/time.h> gettimeofday(0,0); --
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2721/cactus-does-not-detect-gettimeofday-timer