tau icon indicating copy to clipboard operation
tau copied to clipboard

problem in tauClock under cygwin

Open ellisonch opened this issue 9 months ago • 0 comments

I've never used tau before, but decided to give it a shot today. In order to get it to work, I'm just including it in a test file and compiling, but I'm getting a warning:

In file included from tests/test_lists.c:2:
vendor/tau/tau/tau.h: In function ‘tauClock’:
vendor/tau/tau/tau.h:272:1: warning: no return statement in function returning non-void [-Wreturn-type]
  272 | }
      | ^

Despite the warning, when I run the test, it does run successfully, and if I introduce an error, it does fail successfully. However, the timing functions aren't working. Even when I introduce a 2 second delay, the times are being reported as 0:

SUCCESS: 2 test suites passed in -0.00s

I took a look at the source code of tauClock, and it looks like there are a number of checks trying to figure out what to return based on which architecture I'm on, but I suppose it isn't exhaustive. FWIW, I'm compiling with gcc version 11.4.0 (GCC) on Cygwin on Windows 10. I think it's Cygwin that's giving tau the problem. I tried everything under WSL on the same machine and it works fine with no warning, and it provides correct timings.

ellisonch avatar Sep 14 '23 19:09 ellisonch