Date: Fri, 19 Apr 2024 08:29:52 +0100 From: Nuno Teixeira <eduardo@freebsd.org> To: FreeBSD Mailing List <freebsd-ports@freebsd.org>, Joseph Mingrone <jrm@freebsd.org> Subject: R: size of long on all supported arches Message-ID: <CAFDf7UKA_fZC=WO3-8VTiGUBvSnrZagNb9mwEcNAc-6Gnwa3zw@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
--0000000000005c342906166e0ed6 Content-Type: text/plain; charset="UTF-8" Hello all, I'm testing a fix for tests on a R port (math/R-cran-RcppArmadillo): https://github.com/RcppCore/RcppArmadillo/issues/408 Resuming: test is failing because "tolerance" needs to get adjusted to work: ---- FAILED[data]: test_cube.R<44--45> call| expect_equivalent(cx_fcube_test(cplx_cube), (cplx_cube^2), tolerance = critTol) diff| Mean relative Mod difference: 1.512537e-07 ----- FAILED[data]: test_cube.R<81--82> call| expect_equivalent(as_cx_fcube(cplx_cube), (cplx_cube^2), tolerance = critTol) diff| Mean relative Mod difference: 1.512537e-07 Error: 2 out of 314 tests failed is fixed by patching: .onWindows <- .Platform$OS.type == "windows" -critTol <- if (.onWindows) 1.0e-6 else 1.5e-7 +critTol <- if (.onWindows || .Machine$sizeof.long == 4 || .Machine$sizeof.long == 8) 1.0e-6 else 1.5e-7 i.e., setting "tolerance" to 1.0e-6 value, test is ok (on systems bellow) With my hardware i7 and rpi4 I noted that long are: amd64 .Machine$sizeof.long == 8 i386 .Machine$sizeof.long == 4 aarch64 .Machine$sizeof.long == 8 armv7 .Machine$sizeof.long == 4 and suppose that is the same to all 32/64 bit supported systems? Upstream are sugesting using OS agnostic check to fix test, so, any better approach or sugestion is welcome. Thanks :) -- Nuno Teixeira FreeBSD Committer (ports) --0000000000005c342906166e0ed6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Hello all,</div><div><br></div><div>I'm testing a= fix for tests on a R port (math/R-cran-RcppArmadillo):</div><div><a href= =3D"https://github.com/RcppCore/RcppArmadillo/issues/408">https://github.co= m/RcppCore/RcppArmadillo/issues/408</a></div><div><br></div><div>Resuming: = test is failing because "tolerance" needs to get adjusted to work= :<br></div><div><br></div><div><pre class=3D"gmail-notranslate"><code class= =3D"gmail-notranslate">---- FAILED[data]: test_cube.R<44--45> call| expect_equivalent(cx_fcube_test(cplx_cube), (cplx_cube^2), toleran= ce =3D critTol) diff| Mean relative Mod difference: 1.512537e-07 ----- FAILED[data]: test_cube.R<81--82> call| expect_equivalent(as_cx_fcube(cplx_cube), (cplx_cube^2), tolerance= =3D critTol) diff| Mean relative Mod difference: 1.512537e-07 Error: 2 out of 314 tests failed<br><br></code></pre>is fixed by patching= :</div><div><br></div><div>=C2=A0.onWindows <- .Platform$OS.type =3D=3D = "windows"<br>-critTol <- if (.onWindows) 1.0e-6 else 1.5e-7<br= >+critTol <- if (.onWindows || .Machine$sizeof.long =3D=3D 4 || .Machine= $sizeof.long =3D=3D 8) 1.0e-6 else 1.5e-7</div><div><br></div><div>i.e., se= tting "tolerance" to 1.0e-6 value, test is ok (on systems bellow)= <br></div><div><br></div><div>With my hardware i7 and rpi4 I noted that lon= g are:</div><div><br></div><div>amd64 =C2=A0 .Machine$sizeof.long =3D=3D 8<= br>i386 =C2=A0 =C2=A0.Machine$sizeof.long =3D=3D 4<br>aarch64 .Machine$size= of.long =3D=3D 8<br>armv7 =C2=A0 .Machine$sizeof.long =3D=3D 4</div><div><b= r></div><div>and suppose that is the same to all 32/64 bit supported system= s?</div><div><br></div><div>Upstream are sugesting using OS agnostic check = to fix test, so, any better approach or sugestion is welcome.<br><br></div>= <div>Thanks :)<br></div><div><br><span class=3D"gmail_signature_prefix">-- = </span><br><div dir=3D"ltr" class=3D"gmail_signature" data-smartmail=3D"gma= il_signature"><div dir=3D"ltr"><span style=3D"color:rgb(102,102,102)">Nuno = Teixeira<br>FreeBSD Committer (ports)</span></div></div></div></div> --0000000000005c342906166e0ed6--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7UKA_fZC=WO3-8VTiGUBvSnrZagNb9mwEcNAc-6Gnwa3zw>