From nobody Fri Apr 19 08:11:08 2024 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VLS5g6ljfz5J4w2 for ; Fri, 19 Apr 2024 08:11:19 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VLS5g4P4Lz4Zvg; Fri, 19 Apr 2024 08:11:19 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713514279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KZsbCveoB031N/Mfhb1PWXDUYqEvRdvQvIFfuOXUndk=; b=yLl2t+GEq/DCjkJLEZC4K5dspOCQHcO70ftWppflG9kRHEx0cuV1VYvRxLtMhtY8NW/i94 0YwtgubuQ9WNak5B7o5+xqe/nZwTnSfSDlb22NbXdsXikvTF+pPLVPb908k+Ai7VYL15DM qEhlc7oeSs7Bh10Ldn49/2EBlBB4S8dKpE11KKrIoGHWPoGs0JoKM1E4Ow5TRyprmQW1EH qcZgVp9inR2szq6mzHAwcRk9WQA5b4ne4wq6km+7QCk2KFfrPQ2IsH8VvpjJpXdpoy5SxX pXJXqAjloZbFLcmDU+tCh/UMJGExHFUc/BP9zd5M4vZsk+KlSnJEMvqmE9FKZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713514279; a=rsa-sha256; cv=none; b=H/mcjreQ4C1+UNdUmA/YgRCfIOn2fISAMbqf6onQQ1GIODztKg/MLhjCy0dJClPyU+QNmB FlkJ1AYRvQlSyVdEZt58HWokXv6fOahR6tY26j/sgDSTuL9CxpZ42K8yz8wTVcpaFuCxq+ QOwhTF6w/9QZqx+3JkseN8xckzNHdYKLMbzp/4LN94IcxCcx08/GmBQC0JIfqsl++mxz+u nztU2o7n4Eal6PCsO79EDa4sBsfYk5oRsYPlywKXVUpi1WCTozIP+sVyPeSdIvRKdxOq6o DTNYpBLBBPbkVIVdzdx6mbRkgwO0yFzpscyDppbGKVquaw1LEPflyfEvBt+tNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713514279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KZsbCveoB031N/Mfhb1PWXDUYqEvRdvQvIFfuOXUndk=; b=wrcQdrB52i0kU7nBGWTnnzqQAs3TbOwYnrrvwJBbZYlHHBXLFqCqQ3cSlOxQCmkkyY8OCA xlj1q7rBIavAMG2vbVe6f5Xjt2lpfRH1t7CkEx9aAiXTStHqtdscx/vJXudNmYtENRiAbb pxrGsrxZznFskOdepuSYS0EWY0hijUJjR0PMhnQ9hhKQFrEQkVcoNfYBwZyVWBa+f5htdm nQzbSWvL4uY25yeFnGIE6gSo3m8CVv7hho97w5tkxEqngfnyZrhkSy7ZohWL5cVbf7pNTg +3GPRYUvBkCrZCW41ouj6nZ1SAgxf7VxfJqA2g5X6yIFqk7/BoPgZ33Khth09g== Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VLS5g3zN7zVWW; Fri, 19 Apr 2024 08:11:19 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-434c3d21450so8838941cf.0; Fri, 19 Apr 2024 01:11:19 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUZMoB7zEsGLIywqJfD6ytjqpnqMzEph5wE9dbcB4msSDdO+aAxKuuki9WXEIwuDjruk9zTK9rUjRfvcmoOZCM= X-Gm-Message-State: AOJu0YwRBG1wWKuJTfdG3SRs0L7/IJ3JqoLpr/W4F1ZS8B8JkjfrGgn3 MnyL5tveNB0ki9YAoS0PDQkS8CArDlMR5BvpVFd2LwXxsnrGvkGIC8g1AS3ATzRhAVxvlYb/MBO 3jvnXn2tErf71EmPOQZf9c3Iq/VM= X-Google-Smtp-Source: AGHT+IHlaGV1QXCrrCFFvHRoXR7LQDbZ6yC+9lPVHUW6H5FoEAKnhZkNRhs3xe+e+qOJwiFdMuyxuZEHr1RqNkeuwwk= X-Received: by 2002:a05:622a:13d3:b0:437:aca0:d82a with SMTP id p19-20020a05622a13d300b00437aca0d82amr1140144qtk.67.1713514279052; Fri, 19 Apr 2024 01:11:19 -0700 (PDT) List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ports@freebsd.org Sender: owner-freebsd-ports@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Nuno Teixeira Date: Fri, 19 Apr 2024 09:11:08 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: size of long on all supported arches To: FreeBSD Mailing List , Joseph Mingrone Content-Type: multipart/alternative; boundary="000000000000ebb72606166ea1e3" --000000000000ebb72606166ea1e3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable (...) If anyone wants to test, I've included patch in commit: https://cgit.freebsd.org/ports/commit/?id=3D89e4a1f2c1d1997b8414e2e648c7b4b= 7c829b63e Nuno Teixeira escreveu (sexta, 19/04/2024 =C3=A0(s) 0= 8:29): > 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), toler= ance =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), toleran= ce =3D critTol) > diff| Mean relative Mod difference: 1.512537e-07 > Error: 2 out of 314 tests failed > > is fixed by patching: > > .onWindows <- .Platform$OS.type =3D=3D "windows" > -critTol <- if (.onWindows) 1.0e-6 else 1.5e-7 > +critTol <- if (.onWindows || .Machine$sizeof.long =3D=3D 4 || > .Machine$sizeof.long =3D=3D 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 =3D=3D 8 > i386 .Machine$sizeof.long =3D=3D 4 > aarch64 .Machine$sizeof.long =3D=3D 8 > armv7 .Machine$sizeof.long =3D=3D 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 bette= r > approach or sugestion is welcome. > > Thanks :) > > -- > Nuno Teixeira > FreeBSD Committer (ports) > --=20 Nuno Teixeira FreeBSD UNIX: Web: https://FreeBSD.org --000000000000ebb72606166ea1e3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
(...)

If anyone wants to tes= t, I've included patch in commit:

Nuno Teixeira <ed= uardo@freebsd.org> escreveu (sexta, 19/04/2024 =C3=A0(s) 08:29):
=
Hello all,

I'm testing a fix for tests on a= R port (math/R-cran-RcppArmadillo):

Resuming: tes= t 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), 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

is fixed by patching= :

=C2=A0.onWindows <- .Platform$OS.type =3D=3D = "windows"
-critTol <- if (.onWindows) 1.0e-6 else 1.5e-7+critTol <- if (.onWindows || .Machine$sizeof.long =3D=3D 4 || .Machine= $sizeof.long =3D=3D 8) 1.0e-6 else 1.5e-7

i.e., se= tting "tolerance" to 1.0e-6 value, test is ok (on systems bellow)=

With my hardware i7 and rpi4 I noted that lon= g are:

amd64 =C2=A0 .Machine$sizeof.long =3D=3D 8<= br>i386 =C2=A0 =C2=A0.Machine$sizeof.long =3D=3D 4
aarch64 .Machine$size= of.long =3D=3D 8
armv7 =C2=A0 .Machine$sizeof.long =3D=3D 4
and suppose that is the same to all 32/64 bit supported system= s?

Upstream are sugesting using OS agnostic check = to fix test, so, any better approach or sugestion is welcome.

=
Thanks :)

-- =
Nuno Teixeira
FreeBSD Committer (port= s)


--
Nuno Teixeira
FreeBSD UNIX:=C2=A0 <eduardo@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 https://Fr= eeBSD.org
--000000000000ebb72606166ea1e3--