libriscv icon indicating copy to clipboard operation
libriscv copied to clipboard

STREAM with compressed instructions misbehaving

Open fwsGonzo opened this issue 2 years ago • 1 comments

The STREAM benchmark compiled with GCC 10 and compressed instructions hits a FUTEX deadlock.

>>> Machine exception 10: FUTEX deadlock (data: 0xB78E5D8)
-> [0] 0x000000000001AF10 + 0x024: __lll_lock_wait_private
-> [1] 0x0000000000015FCE + 0x13c: puts
>>> Program exited, exit code = 0 (0x0)
Instructions executed: 12881
Pages in use: 9 (36 kB memory)

fwsGonzo avatar Mar 30 '22 17:03 fwsGonzo

This might be a false alarm, as it works with all bells and whistles, except flat memory mode.

$ ./rvlinux ../binaries/STREAM/rv64gc-stream 
-------------------------------------------------------------
STREAM version $Revision: 5.10 $
-------------------------------------------------------------
This system uses 8 bytes per array element.
-------------------------------------------------------------
Array size = 8000000 (elements), Offset = 0 (elements)
Memory per array = 61.0 MiB (= 0.1 GiB).
Total memory required = 183.1 MiB (= 0.2 GiB).
Each kernel will be executed 10 times.
 The *best* time for each kernel (excluding the first iteration)
 will be used to compute the reported bandwidth.
-------------------------------------------------------------
Your clock granularity/precision appears to be 1 microseconds.
Each test below will take on the order of 177641 microseconds.
   (= 177641 clock ticks)
Increase the size of the arrays if this shows that
you are not getting at least 20 clock ticks per test.
-------------------------------------------------------------
WARNING -- The above is only a rough guideline.
For best results, please be sure you know the
precision of your system timer.
-------------------------------------------------------------
Function    Best Rate MB/s  Avg time     Min time     Max time
Copy:            1267.7     0.101957     0.100974     0.104163
Scale:            620.8     0.208323     0.206186     0.212074
Add:              583.9     0.330938     0.328839     0.334552
Triad:            586.3     0.329872     0.327471     0.331506
-------------------------------------------------------------
Solution Validates: avg error less than 1.000000e-13 on all three arrays
-------------------------------------------------------------
>>> Program exited, exit code = 0 (0x0)
Instructions executed: 3196159430
Pages in use: 46883 (187532 kB memory)

fwsGonzo avatar Apr 24 '22 21:04 fwsGonzo

Haven't seen it again. Also STREAM is verified in the unit tests on each run.

fwsGonzo avatar Nov 10 '22 21:11 fwsGonzo