[Pkg-opencl-devel] Bug#1030298: pyopencl: FTBFS on i386: = 1 failed, 304 passed, 7 skipped, 1 deselected, 2 xfailed, 31 warnings in 736.25s (0:12:16) =
Andreas Beckmann
anbe at debian.org
Wed Feb 15 02:58:24 GMT 2023
Followup-For: Bug #1030298
minimized reproducer (needs only python3-pyopencl):
=====
import math
import numpy as np
import pyopencl.array as cl_array
import pyopencl as cl
import pyopencl.clmath as clmath
context = cl.Context()
queue = cl.CommandQueue(context)
for s in [10]:
a = cl_array.arange(queue, s, dtype=np.float32)/10
a2 = cl_array.arange(queue, s, dtype=np.float32)/45.2 + 0.1
b = clmath.fmod(a, a2)
a = a.get()
a2 = a2.get()
b = b.get()
for i in range(s):
f=math.fmod(a[i], a2[i])
d=b[i] - f # should be zero
print("i=", i, " a[i]=", a[i], " a2[i]=", a2[i], " b[i]=clmath.fmod(a, a2)[i]=", b[i],
" fmod(a[i], a2[i])=", f, " diff=", d);
#assert math.fmod(a[i], a2[i]) == b[i]
=====
output on testing/i386:
# python3 test_1030298.py
i= 0 a[i]= 0.0 a2[i]= 0.1 b[i]=clmath.fmod(a, a2)[i]= 0.0 fmod(a[i], a2[i])= 0.0 diff= 0.0
i= 1 a[i]= 0.1 a2[i]= 0.1221239 b[i]=clmath.fmod(a, a2)[i]= 0.1 fmod(a[i], a2[i])= 0.10000000149011612 diff= 0.0
i= 2 a[i]= 0.2 a2[i]= 0.14424779 b[i]=clmath.fmod(a, a2)[i]= 0.055752218 fmod(a[i], a2[i])= 0.0557522177696228 diff= 0.0
i= 3 a[i]= 0.3 a2[i]= 0.16637167 b[i]=clmath.fmod(a, a2)[i]= 0.13362834 fmod(a[i], a2[i])= 0.13362833857536316 diff= 0.0
i= 4 a[i]= 0.4 a2[i]= 0.18849558 b[i]=clmath.fmod(a, a2)[i]= 0.023008853 fmod(a[i], a2[i])= 0.02300885319709778 diff= 0.0
i= 5 a[i]= 0.5 a2[i]= 0.21061948 b[i]=clmath.fmod(a, a2)[i]= 0.07876104 fmod(a[i], a2[i])= 0.0787610411643982 diff= 0.0
i= 6 a[i]= 0.6 a2[i]= 0.23274335 b[i]=clmath.fmod(a, a2)[i]= 0.13451332 fmod(a[i], a2[i])= 0.13451331853866577 diff= 0.0
i= 7 a[i]= 0.7 a2[i]= 0.25486726 b[i]=clmath.fmod(a, a2)[i]= 0.19026548 fmod(a[i], a2[i])= 0.1902654767036438 diff= 0.0
i= 8 a[i]= 0.8 a2[i]= 0.27699116 b[i]=clmath.fmod(a, a2)[i]= 0.2460177 fmod(a[i], a2[i])= 0.2460176944732666 diff= 0.0
i= 9 a[i]= 0.9 a2[i]= 0.29911503 b[i]=clmath.fmod(a, a2)[i]= 0.0026548803 fmod(a[i], a2[i])= 0.0026548802852630615 diff= 0.0
output on sid/i386:
# python3 test_1030298.py
i= 0 a[i]= 0.0 a2[i]= 0.1 b[i]=clmath.fmod(a, a2)[i]= 0.0 fmod(a[i], a2[i])= 0.0 diff= 0.0
i= 1 a[i]= 0.1 a2[i]= 0.1221239 b[i]=clmath.fmod(a, a2)[i]= 0.1 fmod(a[i], a2[i])= 0.10000000149011612 diff= 0.0
i= 2 a[i]= 0.2 a2[i]= 0.14424779 b[i]=clmath.fmod(a, a2)[i]= 0.055752218 fmod(a[i], a2[i])= 0.0557522177696228 diff= 0.0
i= 3 a[i]= 0.3 a2[i]= 0.16637167 b[i]=clmath.fmod(a, a2)[i]= 0.13362834 fmod(a[i], a2[i])= 0.13362833857536316 diff= 0.0
i= 4 a[i]= 0.4 a2[i]= 0.18849558 b[i]=clmath.fmod(a, a2)[i]= 0.023008853 fmod(a[i], a2[i])= 0.02300885319709778 diff= 0.0
i= 5 a[i]= 0.5 a2[i]= 0.21061948 b[i]=clmath.fmod(a, a2)[i]= 0.07876104 fmod(a[i], a2[i])= 0.0787610411643982 diff= 0.0
i= 6 a[i]= 0.6 a2[i]= 0.23274335 b[i]=clmath.fmod(a, a2)[i]= 0.13451329 fmod(a[i], a2[i])= 0.13451331853866577 diff= -2.9802322387695312e-08
i= 7 a[i]= 0.7 a2[i]= 0.25486726 b[i]=clmath.fmod(a, a2)[i]= 0.19026548 fmod(a[i], a2[i])= 0.1902654767036438 diff= 0.0
i= 8 a[i]= 0.8 a2[i]= 0.27699116 b[i]=clmath.fmod(a, a2)[i]= 0.24601772 fmod(a[i], a2[i])= 0.2460176944732666 diff= 2.9802322387695312e-08
i= 9 a[i]= 0.9 a2[i]= 0.29911503 b[i]=clmath.fmod(a, a2)[i]= 0.0026548505 fmod(a[i], a2[i])= 0.0026548802852630615 diff= -2.9802322387695312e-08
output on sid/amd64:
# python3 test_1030298.py
i= 0 a[i]= 0.0 a2[i]= 0.1 b[i]=clmath.fmod(a, a2)[i]= 0.0 fmod(a[i], a2[i])= 0.0 diff= 0.0
i= 1 a[i]= 0.1 a2[i]= 0.1221239 b[i]=clmath.fmod(a, a2)[i]= 0.1 fmod(a[i], a2[i])= 0.10000000149011612 diff= 0.0
i= 2 a[i]= 0.2 a2[i]= 0.14424779 b[i]=clmath.fmod(a, a2)[i]= 0.055752218 fmod(a[i], a2[i])= 0.0557522177696228 diff= 0.0
i= 3 a[i]= 0.3 a2[i]= 0.16637167 b[i]=clmath.fmod(a, a2)[i]= 0.13362834 fmod(a[i], a2[i])= 0.13362833857536316 diff= 0.0
i= 4 a[i]= 0.4 a2[i]= 0.18849558 b[i]=clmath.fmod(a, a2)[i]= 0.023008853 fmod(a[i], a2[i])= 0.02300885319709778 diff= 0.0
i= 5 a[i]= 0.5 a2[i]= 0.21061948 b[i]=clmath.fmod(a, a2)[i]= 0.07876104 fmod(a[i], a2[i])= 0.0787610411643982 diff= 0.0
i= 6 a[i]= 0.6 a2[i]= 0.23274335 b[i]=clmath.fmod(a, a2)[i]= 0.13451332 fmod(a[i], a2[i])= 0.13451331853866577 diff= 0.0
i= 7 a[i]= 0.7 a2[i]= 0.25486726 b[i]=clmath.fmod(a, a2)[i]= 0.19026548 fmod(a[i], a2[i])= 0.1902654767036438 diff= 0.0
i= 8 a[i]= 0.8 a2[i]= 0.27699116 b[i]=clmath.fmod(a, a2)[i]= 0.2460177 fmod(a[i], a2[i])= 0.2460176944732666 diff= 0.0
i= 9 a[i]= 0.9 a2[i]= 0.29911503 b[i]=clmath.fmod(a, a2)[i]= 0.0026548803 fmod(a[i], a2[i])= 0.0026548802852630615 diff= 0.0
Andreas
More information about the Pkg-opencl-devel
mailing list