Open barracuda156 opened 1 year ago
This looks like the code is not considering Big-endian platforms? Hopefully this can be fixed.
Also, failing a test because CPU is not LE is crazy :)
10/282 Test: hash_functions
Command: "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_fortran-stdlib/fortran-stdlib/work/build/test/hash_functions/test_hash_functions" "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_fortran-stdlib/fortran-stdlib/work/build/test/hash_functions"
Directory: /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_fortran-stdlib/fortran-stdlib/work/stdlib-1243ad93cc3a6f228cbf9544e84aa0d9c14caeee/test/hash_functions
"hash_functions" start time: Feb 20 03:48 CST
Output:
----------------------------------------------------------
# Testing: hash_functions
Starting little_endian ... (1/6)
... little_endian [FAILED]
Message: The processor is not Little-Endian
Starting nmhash32 ... (2/6)
... nmhash32 [FAILED]
Message: NMHASH32 failed
Starting nmhash32x ... (3/6)
... nmhash32x [FAILED]
Message: NMHASH32X failed
Starting water_hash ... (4/6)
... water_hash [FAILED]
Message: WATER_HASH failed
Starting pengy_hash ... (5/6)
... pengy_hash [PASSED]
Starting spooky_hash ... (6/6)
... spooky_hash [PASSED]
4 test(s) failed!
ERROR STOP
Error termination. Backtrace:
#0 0xf19db
<end of output>
Test time = 0.07 sec
----------------------------------------------------------
Test Failed.
"hash_functions" end time: Feb 20 03:48 CST
"hash_functions" time elapsed: 00:00:00
30/282 Testing: specialfunctions_gamma
30/282 Test: specialfunctions_gamma
Command: "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_fortran-stdlib/fortran-stdlib/work/build/test/specialfunctions/test_specialfunctions_gamma" "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_fortran-stdlib/fortran-stdlib/work/build/test/specialfunctions"
Directory: /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_fortran-stdlib/fortran-stdlib/work/stdlib-1243ad93cc3a6f228cbf9544e84aa0d9c14caeee/test/specialfunctions
"specialfunctions_gamma" start time: Feb 20 03:49 CST
Output:
----------------------------------------------------------
# Testing: Gamma special function
Starting log_factorial_iint8 ... (1/77)
... log_factorial_iint8 [PASSED]
Starting log_factorial_iint8 ... (2/77)
... log_factorial_iint8 [PASSED]
Starting log_factorial_iint16 ... (3/77)
... log_factorial_iint16 [PASSED]
Starting log_factorial_iint32 ... (4/77)
... log_factorial_iint32 [PASSED]
Starting log_factorial_iint64 ... (5/77)
... log_factorial_iint64 [PASSED]
Starting gamma_iint8 ... (6/77)
... gamma_iint8 [PASSED]
Starting log_gamma_iint8 ... (7/77)
... log_gamma_iint8 [PASSED]
Starting gamma_iint16 ... (8/77)
... gamma_iint16 [PASSED]
Starting log_gamma_iint16 ... (9/77)
... log_gamma_iint16 [PASSED]
Starting gamma_iint32 ... (10/77)
... gamma_iint32 [PASSED]
Starting log_gamma_iint32 ... (11/77)
... log_gamma_iint32 [PASSED]
Starting gamma_iint64 ... (12/77)
... gamma_iint64 [PASSED]
Starting log_gamma_iint64 ... (13/77)
... log_gamma_iint64 [PASSED]
Starting gamma_csp ... (14/77)
... gamma_csp [PASSED]
Starting log_gamma_csp ... (15/77)
... log_gamma_csp [PASSED]
Starting gamma_cdp ... (16/77)
[Fatal] Uncaught error
Code: 1 Message: Complex kind dp failed
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_UNDERFLOW_FLAG
ERROR STOP
Error termination. Backtrace:
#0 0xf19db
<end of output>
Test time = 0.03 sec
----------------------------------------------------------
Test Failed.
"specialfunctions_gamma" end time: Feb 20 03:49 CST
"specialfunctions_gamma" time elapsed: 00:00:00
And then some complex num tests here:
55/282 Testing: stdlib_math
55/282 Test: stdlib_math
Command: "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_fortran-stdlib/fortran-stdlib/work/build/test/math/test_stdlib_math" "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_fortran-stdlib/fortran-stdlib/work/build/test/math"
Directory: /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_fortran-stdlib/fortran-stdlib/work/stdlib-1243ad93cc3a6f228cbf9544e84aa0d9c14caeee/test/math
"stdlib_math" start time: Feb 20 03:49 CST
Output:
----------------------------------------------------------
# Testing: stdlib-math
Starting clip-int8 ... (1/49)
... clip-int8 [PASSED]
Starting clip-int8-bounds ... (2/49)
... clip-int8-bounds [PASSED]
Starting clip-int16 ... (3/49)
... clip-int16 [PASSED]
Starting clip-int16-bounds ... (4/49)
... clip-int16-bounds [PASSED]
Starting clip-int32 ... (5/49)
... clip-int32 [PASSED]
Starting clip-int32-bounds ... (6/49)
... clip-int32-bounds [PASSED]
Starting clip-int64 ... (7/49)
... clip-int64 [PASSED]
Starting clip-int64-bounds ... (8/49)
... clip-int64-bounds [PASSED]
Starting clip-real-single ... (9/49)
... clip-real-single [PASSED]
Starting clip-real-single-bounds ... (10/49)
... clip-real-single-bounds [PASSED]
Starting clip-real-double ... (11/49)
... clip-real-double [PASSED]
Starting clip-real-double-bounds ... (12/49)
... clip-real-double-bounds [PASSED]
Starting clip-real-quad ... (13/49)
... clip-real-quad [SKIPPED]
Message: Quadruple precision is not enabled
Starting clip-real-quad-bounds ... (14/49)
... clip-real-quad-bounds [SKIPPED]
Message: Quadruple precision is not enabled
Starting arg-cmplx-sp ... (15/49)
... arg-cmplx-sp [PASSED]
Starting argd-cmplx-sp ... (16/49)
... argd-cmplx-sp [PASSED]
Starting argpi-cmplx-sp ... (17/49)
... argpi-cmplx-sp [PASSED]
Starting arg-cmplx-dp ... (18/49)
... arg-cmplx-dp [PASSED]
Starting argd-cmplx-dp ... (19/49)
... argd-cmplx-dp [PASSED]
Starting argpi-cmplx-dp ... (20/49)
... argpi-cmplx-dp [PASSED]
Starting arg-cmplx-xdp ... (21/49)
... arg-cmplx-xdp [FAILED]
Message: test_nonzero_scalar
Starting argd-cmplx-xdp ... (22/49)
... argd-cmplx-xdp [FAILED]
Message: test_nonzero_scalar
Starting argpi-cmplx-xdp ... (23/49)
... argpi-cmplx-xdp [FAILED]
Message: test_nonzero_scalar
Starting is_close-real-sp ... (24/49)
... is_close-real-sp [PASSED]
Starting is_close-cmplx-sp ... (25/49)
... is_close-cmplx-sp [PASSED]
Starting all_close-real-sp ... (26/49)
... all_close-real-sp [PASSED]
Starting all_close-cmplx-sp ... (27/49)
... all_close-cmplx-sp [PASSED]
Starting is_close-real-dp ... (28/49)
... is_close-real-dp [PASSED]
Starting is_close-cmplx-dp ... (29/49)
... is_close-cmplx-dp [PASSED]
Starting all_close-real-dp ... (30/49)
... all_close-real-dp [PASSED]
Starting all_close-cmplx-dp ... (31/49)
... all_close-cmplx-dp [PASSED]
Starting is_close-real-xdp ... (32/49)
... is_close-real-xdp [PASSED]
Starting is_close-cmplx-xdp ... (33/49)
... is_close-cmplx-xdp [PASSED]
Starting all_close-real-xdp ... (34/49)
... all_close-real-xdp [PASSED]
Starting all_close-cmplx-xdp ... (35/49)
... all_close-cmplx-xdp [PASSED]
Starting diff-real-sp ... (36/49)
... diff-real-sp [PASSED]
Starting diff-real-dp ... (37/49)
... diff-real-dp [PASSED]
Starting diff-real-xdp ... (38/49)
... diff-real-xdp [PASSED]
Starting diff-int-int8 ... (39/49)
... diff-int-int8 [PASSED]
Starting diff-int-int16 ... (40/49)
... diff-int-int16 [PASSED]
Starting diff-int-int32 ... (41/49)
... diff-int-int32 [PASSED]
Starting diff-int-int64 ... (42/49)
... diff-int-int64 [PASSED]
Starting arange-real-sp ... (43/49)
... arange-real-sp [PASSED]
Starting arange-real-dp ... (44/49)
... arange-real-dp [PASSED]
Starting arange-real-xdp ... (45/49)
... arange-real-xdp [PASSED]
Starting arange-int-int8 ... (46/49)
... arange-int-int8 [PASSED]
Starting arange-int-int16 ... (47/49)
... arange-int-int16 [PASSED]
Starting arange-int-int32 ... (48/49)
... arange-int-int32 [PASSED]
Starting arange-int-int64 ... (49/49)
... arange-int-int64 [PASSED]
3 test(s) failed!
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG
ERROR STOP
Error termination. Backtrace:
#0 0xf19db
<end of output>
Test time = 0.01 sec
----------------------------------------------------------
Test Failed.
"stdlib_math" end time: Feb 20 03:49 CST
"stdlib_math" time elapsed: 00:00:00
This looks like the code is not considering Big-endian platforms? Hopefully this can be fixed.
Also, failing a test because CPU is not LE is crazy :)
10/282 Test: hash_functions Command: "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_fortran-stdlib/fortran-stdlib/work/build/test/hash_functions/test_hash_functions" "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_fortran-stdlib/fortran-stdlib/work/build/test/hash_functions" Directory: /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_fortran-stdlib/fortran-stdlib/work/stdlib-1243ad93cc3a6f228cbf9544e84aa0d9c14caeee/test/hash_functions "hash_functions" start time: Feb 20 03:48 CST Output: ---------------------------------------------------------- # Testing: hash_functions Starting little_endian ... (1/6) ... little_endian [FAILED] Message: The processor is not Little-Endian Starting nmhash32 ... (2/6) ... nmhash32 [FAILED] Message: NMHASH32 failed Starting nmhash32x ... (3/6) ... nmhash32x [FAILED] Message: NMHASH32X failed Starting water_hash ... (4/6) ... water_hash [FAILED] Message: WATER_HASH failed Starting pengy_hash ... (5/6) ... pengy_hash [PASSED] Starting spooky_hash ... (6/6) ... spooky_hash [PASSED] 4 test(s) failed! ERROR STOP Error termination. Backtrace: #0 0xf19db <end of output> Test time = 0.07 sec ---------------------------------------------------------- Test Failed. "hash_functions" end time: Feb 20 03:48 CST "hash_functions" time elapsed: 00:00:00
Following the doc:
...
The code was designed for little-endian compilers, and will give different results on big-endian compilers, but the hash quality on those compilers is probably just as good.
...
Therefore, the tests have not been developed for Big-Endian.
And then some complex num tests here:
55/282 Testing: stdlib_math 55/282 Test: stdlib_math Command: "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_fortran-stdlib/fortran-stdlib/work/build/test/math/test_stdlib_math" "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_fortran-stdlib/fortran-stdlib/work/build/test/math" Directory: /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_fortran-stdlib/fortran-stdlib/work/stdlib-1243ad93cc3a6f228cbf9544e84aa0d9c14caeee/test/math "stdlib_math" start time: Feb 20 03:49 CST Output: ---------------------------------------------------------- # Testing: stdlib-math Starting clip-int8 ... (1/49) ... clip-int8 [PASSED] Starting clip-int8-bounds ... (2/49) ... clip-int8-bounds [PASSED] Starting clip-int16 ... (3/49) ... clip-int16 [PASSED] Starting clip-int16-bounds ... (4/49) ... clip-int16-bounds [PASSED] Starting clip-int32 ... (5/49) ... clip-int32 [PASSED] Starting clip-int32-bounds ... (6/49) ... clip-int32-bounds [PASSED] Starting clip-int64 ... (7/49) ... clip-int64 [PASSED] Starting clip-int64-bounds ... (8/49) ... clip-int64-bounds [PASSED] Starting clip-real-single ... (9/49) ... clip-real-single [PASSED] Starting clip-real-single-bounds ... (10/49) ... clip-real-single-bounds [PASSED] Starting clip-real-double ... (11/49) ... clip-real-double [PASSED] Starting clip-real-double-bounds ... (12/49) ... clip-real-double-bounds [PASSED] Starting clip-real-quad ... (13/49) ... clip-real-quad [SKIPPED] Message: Quadruple precision is not enabled Starting clip-real-quad-bounds ... (14/49) ... clip-real-quad-bounds [SKIPPED] Message: Quadruple precision is not enabled Starting arg-cmplx-sp ... (15/49) ... arg-cmplx-sp [PASSED] Starting argd-cmplx-sp ... (16/49) ... argd-cmplx-sp [PASSED] Starting argpi-cmplx-sp ... (17/49) ... argpi-cmplx-sp [PASSED] Starting arg-cmplx-dp ... (18/49) ... arg-cmplx-dp [PASSED] Starting argd-cmplx-dp ... (19/49) ... argd-cmplx-dp [PASSED] Starting argpi-cmplx-dp ... (20/49) ... argpi-cmplx-dp [PASSED] Starting arg-cmplx-xdp ... (21/49) ... arg-cmplx-xdp [FAILED] Message: test_nonzero_scalar Starting argd-cmplx-xdp ... (22/49) ... argd-cmplx-xdp [FAILED] Message: test_nonzero_scalar Starting argpi-cmplx-xdp ... (23/49) ... argpi-cmplx-xdp [FAILED] Message: test_nonzero_scalar Starting is_close-real-sp ... (24/49) ... is_close-real-sp [PASSED] Starting is_close-cmplx-sp ... (25/49) ... is_close-cmplx-sp [PASSED] Starting all_close-real-sp ... (26/49) ... all_close-real-sp [PASSED] Starting all_close-cmplx-sp ... (27/49) ... all_close-cmplx-sp [PASSED] Starting is_close-real-dp ... (28/49) ... is_close-real-dp [PASSED] Starting is_close-cmplx-dp ... (29/49) ... is_close-cmplx-dp [PASSED] Starting all_close-real-dp ... (30/49) ... all_close-real-dp [PASSED] Starting all_close-cmplx-dp ... (31/49) ... all_close-cmplx-dp [PASSED] Starting is_close-real-xdp ... (32/49) ... is_close-real-xdp [PASSED] Starting is_close-cmplx-xdp ... (33/49) ... is_close-cmplx-xdp [PASSED] Starting all_close-real-xdp ... (34/49) ... all_close-real-xdp [PASSED] Starting all_close-cmplx-xdp ... (35/49) ... all_close-cmplx-xdp [PASSED] Starting diff-real-sp ... (36/49) ... diff-real-sp [PASSED] Starting diff-real-dp ... (37/49) ... diff-real-dp [PASSED] Starting diff-real-xdp ... (38/49) ... diff-real-xdp [PASSED] Starting diff-int-int8 ... (39/49) ... diff-int-int8 [PASSED] Starting diff-int-int16 ... (40/49) ... diff-int-int16 [PASSED] Starting diff-int-int32 ... (41/49) ... diff-int-int32 [PASSED] Starting diff-int-int64 ... (42/49) ... diff-int-int64 [PASSED] Starting arange-real-sp ... (43/49) ... arange-real-sp [PASSED] Starting arange-real-dp ... (44/49) ... arange-real-dp [PASSED] Starting arange-real-xdp ... (45/49) ... arange-real-xdp [PASSED] Starting arange-int-int8 ... (46/49) ... arange-int-int8 [PASSED] Starting arange-int-int16 ... (47/49) ... arange-int-int16 [PASSED] Starting arange-int-int32 ... (48/49) ... arange-int-int32 [PASSED] Starting arange-int-int64 ... (49/49) ... arange-int-int64 [PASSED] 3 test(s) failed! Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG ERROR STOP Error termination. Backtrace: #0 0xf19db <end of output> Test time = 0.01 sec ---------------------------------------------------------- Test Failed. "stdlib_math" end time: Feb 20 03:49 CST "stdlib_math" time elapsed: 00:00:00
Do these tests pass if you compile without enabling XDP?
Following the doc:
... The code was designed for little-endian compilers, and will give different results on big-endian compilers, but the hash quality on those compilers is probably just as good. ...
Therefore, the tests have not been developed for Big-Endian.
I guess those should be skipped as unsupported rather than failed. It is a failure of the ones who wrote tests, after all.
Disabling XDP, stdlib_math
test passes.
99% tests passed, 2 tests failed out of 282
Label Time Summary:
quadruple_precision = 0.01 sec*proc (2 tests)
Total Test time (real) = 24.68 sec
The following tests did not run:
1 - always_skip (Skipped)
101 - check4 (Skipped)
The following tests FAILED:
10 - hash_functions (Failed)
30 - specialfunctions_gamma (Failed)
@awvwgk would it be possbile to set up a CI with a Big-Endian computer?
I guess those should be skipped as unsupported rather than failed. It is a failure of the ones who wrote tests, after all.
As I partly wrote these tests, I will take this responsability ;) Best would be to write tests for Big-Endian, instead of skipping them. But I have no access to such a computer.
would it be possbile to set up a CI with a Big-Endian computer?
Unless somebody donates runtime on a BE machine, I'm not aware of freely available CI which offers this option. The only PPC providers I know of provide ppc64le. Maybe we could run via QEMU, but that requires cross-compilation to not have a super slow CI.
But I have no access to such a computer.
If I can assist with testing, I will be happy to do it. Normally I have access to PPC machines daily (even if I travel, I can test in Rosetta).
Unless somebody donates runtime on a BE machine, I'm not aware of freely available CI which offers this option. The only PPC providers I know of provide ppc64le. Maybe we could run via QEMU, but that requires cross-compilation to not have a super slow CI.
Another option, easy and perhaps with negligible marginal cost, is running 10.6.8 Server with Rosetta on an Intel Mac in VM. It is totally usable.
@awvwgk AFAIK all Power cpus are bi-endian, so as long as this is not specific to MacOS PowerPC, you could perhaps reproduce this on FreeBSD or some Linux.
Qemu should also work fine, at least with Linux.
Description
Expected Behaviour
Ideally we would want everything pass.
Version of stdlib
Github
Platform and Architecture
macOS 10.6 ppc
Additional Information
gcc 12.2.0