smanders / externpro

build external projects with cmake
MIT License
13 stars 12 forks source link

wirehair failures #334

Closed smanders closed 2 years ago

smanders commented 2 years ago

wirehair was added to externpro 21.01

wirehair built as part of externpro fails (executable using wirehair library crashes, but only on one specific system) -- a wirehair patch was made to attempt to remove AVX2 dependencies from the code

the executable using the library still crashes

commits

smanders commented 2 years ago

failure/issue is reproducible

copying the unit_test executable from the build system to the runtime system (which fails)

scp xpbase/Build/wirehair_Release/unit_test root@172.31.67.25:~

and then running it on the 172.31.67.25 system

[root@dde-dev1 ~]# ./unit_test
Illegal instruction
smanders commented 2 years ago

there have been a number of commits/fixes upstream since the 2020.11.21 commit the current build is based on - up to the current HEAD of master (a 2021.07.31 commit) https://github.com/catid/wirehair/compare/9e8923a200045c7bdb9e89b449692dbfed6b6de0...6d84fad40cbbbb29d4eb91204750ddffe0dcacfe

one commit in particular provides the "fix" - an option to not build with -march=native https://github.com/catid/wirehair/commit/c18bef6e1f6ef853c371d1c0c3624d64a14ab331

smanders commented 2 years ago

21.07.31 patch https://github.com/catid/wirehair/compare/6d84fad40cbbbb29d4eb91204750ddffe0dcacfe...smanders:xp21.07.31

completed with commit referenced above used in dde and dde_lib

and unit_test runs on 172.31.67.25 system

[root@dde-dev1 ~]# ./unit_test
For N = 12 packets of 1300 bytes:
+ Average wirehair_encoder_create() time: 51 usec (305.882 MBPS)
+ Average wirehair_encode() time: 0 usec (4011 MBPS)
+ Average wirehair_decode() time: 4 usec (290.089 MBPS)
+ Average overhead piece count beyond N = 0.0145
+ Average wirehair_recover() time: 3 usec (3920.09 MBPS)
For N = 32 packets of 1300 bytes:
+ Average wirehair_encoder_create() time: 98 usec (424.49 MBPS)
+ Average wirehair_encode() time: 0 usec (3374.85 MBPS)
+ Average wirehair_decode() time: 3 usec (401.745 MBPS)
+ Average overhead piece count beyond N = 0.0195
+ Average wirehair_recover() time: 11 usec (3698.27 MBPS)
For N = 102 packets of 1300 bytes:
+ Average wirehair_encoder_create() time: 310 usec (427.742 MBPS)
+ Average wirehair_encode() time: 0 usec (3196.99 MBPS)
+ Average wirehair_decode() time: 3 usec (420.391 MBPS)
+ Average overhead piece count beyond N = 0.0185
+ Average wirehair_recover() time: 40 usec (3273.95 MBPS)
For N = 134 packets of 1300 bytes:
+ Average wirehair_encoder_create() time: 416 usec (418.75 MBPS)
+ Average wirehair_encode() time: 0 usec (2768.49 MBPS)
+ Average wirehair_decode() time: 3 usec (409.033 MBPS)
+ Average overhead piece count beyond N = 0.0225
+ Average wirehair_recover() time: 53 usec (3258.21 MBPS)
For N = 169 packets of 1300 bytes:
+ Average wirehair_encoder_create() time: 495 usec (443.838 MBPS)
+ Average wirehair_encode() time: 0 usec (2728.08 MBPS)
+ Average wirehair_decode() time: 3 usec (419.69 MBPS)
+ Average overhead piece count beyond N = 0.02
+ Average wirehair_recover() time: 68 usec (3188.24 MBPS)
For N = 201 packets of 1300 bytes:
+ Average wirehair_encoder_create() time: 638 usec (409.561 MBPS)
+ Average wirehair_encode() time: 0 usec (3041.68 MBPS)
+ Average wirehair_decode() time: 3 usec (410.796 MBPS)
+ Average overhead piece count beyond N = 0.0225
+ Average wirehair_recover() time: 94 usec (2763.19 MBPS)
For N = 294 packets of 1300 bytes:
+ Average wirehair_encoder_create() time: 841 usec (454.459 MBPS)
+ Average wirehair_encode() time: 0 usec (2735.88 MBPS)
+ Average wirehair_decode() time: 2 usec (437.357 MBPS)
+ Average overhead piece count beyond N = 0.011
+ Average wirehair_recover() time: 127 usec (2988.88 MBPS)
For N = 359 packets of 1300 bytes:
+ Average wirehair_encoder_create() time: 1071 usec (435.761 MBPS)
+ Average wirehair_encode() time: 0 usec (2948.11 MBPS)
+ Average wirehair_decode() time: 3 usec (432.796 MBPS)
+ Average overhead piece count beyond N = 0.0415
+ Average wirehair_recover() time: 161 usec (2897.25 MBPS)
...