From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id dt3fMSU7h2HIdQEAgWs5BA (envelope-from ) for ; Sun, 07 Nov 2021 03:34:13 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id sI4HLSU7h2EQBwAA1q6Kng (envelope-from ) for ; Sun, 07 Nov 2021 02:34:13 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 77E5E4187 for ; Sun, 7 Nov 2021 03:34:13 +0100 (CET) Received: from localhost ([::1]:57676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjY0a-0004kO-38 for larch@yhetil.org; Sat, 06 Nov 2021 22:34:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40880) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjY0R-0004kE-DT for bug-guix@gnu.org; Sat, 06 Nov 2021 22:34:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39803) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mjY0R-0006u8-4U for bug-guix@gnu.org; Sat, 06 Nov 2021 22:34:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mjY0P-0000pj-TV for bug-guix@gnu.org; Sat, 06 Nov 2021 22:34:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#51536: openblas builds not reproducible on different x86_64 machines Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 07 Nov 2021 02:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51536 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Efraim Flashner Received: via spool by 51536-submit@debbugs.gnu.org id=B51536.16362524083161 (code B ref 51536); Sun, 07 Nov 2021 02:34:01 +0000 Received: (at 51536) by debbugs.gnu.org; 7 Nov 2021 02:33:28 +0000 Received: from localhost ([127.0.0.1]:51346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjXzs-0000ov-6E for submit@debbugs.gnu.org; Sat, 06 Nov 2021 22:33:28 -0400 Received: from mail-qt1-f179.google.com ([209.85.160.179]:35504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjXzo-0000oZ-Sg for 51536@debbugs.gnu.org; Sat, 06 Nov 2021 22:33:27 -0400 Received: by mail-qt1-f179.google.com with SMTP id w4so9714334qtn.2 for <51536@debbugs.gnu.org>; Sat, 06 Nov 2021 19:33:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=yAajPXqHWN1Mk/7wP/RcXL7C2VPveypTugc8vQ6jwgc=; b=OWBav2r0FZeo/hzuBD2CHYzVIuwY00n5oHrKiMdpxH/C0x48Dq9J4R7FaGg3QbSS4s SiLSKknyinS+ZELhcf8KwF5p9h5+nqKSIQ1HMi7M7045jwd7o8nFUquQ8WV9jRqQS+at h0xY2xHF4ucrZEy9EgusxugiZXa7Zxdef+XoPUo/NhdCe5fQCjabERcjBBvYEKhH138j Y5zDGMP0+0rkNTC5hc5J58k3dye5AQoGbg1ex5uxapySVKwwUNtl103JVRW+pL1eGmrl YTbUE27jHUJeC6M85BrWBR+gfWpaPCd0yS1dTWq0vAYNo8EG74F/X1C/EUEYyRWmPECj b3hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=yAajPXqHWN1Mk/7wP/RcXL7C2VPveypTugc8vQ6jwgc=; b=UJnbwbN0HoJlt6SGJ2kUARVhNLer244KOHWW3SSLJN7lxxjr/LrRXXyi/BBh+rpAfq mkYYtfHUbCDnVCovHVS7UhDGN0mYoHuYL5l+yd2IeveY27oZYBBHsc5eOFXiXJLbZUX0 nu5ijj+61ZVcKqLWXpWJRNUse4Ik1EcI37p2m8s58vFwqdbCt4EXdaJhdtnhlK2Uq8Ga 8n6fr+LGLmDoJmzTQWzU8OFO/HVmVyWPzu7bf73qdEI0GZ987oV/+8P1JaqnQeY4YICo 2cPElkY367FiHUArl10Lv1NxjbodUqKd9/5FkDjCdXFRZLh55Sv6lUIUarZydwt7Umxz 7WHQ== X-Gm-Message-State: AOAM533uzeOB99SdkwH1ndL6bm+A8E74DnB6cxtu8a4PWXZCHjFSxAfw 3Kz6b2IiVmN747Hcqm7aBptWw/nYBoCG3Q== X-Google-Smtp-Source: ABdhPJzFgUeK/WtZmh93DhDj0tzcQ2nW2gayxfg09BNJs4tv/eTs/lIvxEkBoRJxoQtqXpcOQxrrMw== X-Received: by 2002:ac8:5904:: with SMTP id 4mr13997249qty.408.1636252399038; Sat, 06 Nov 2021 19:33:19 -0700 (PDT) Received: from hurd (dsl-157-193.b2b2c.ca. [66.158.157.193]) by smtp.gmail.com with ESMTPSA id f1sm1056091qka.77.2021.11.06.19.33.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Nov 2021 19:33:18 -0700 (PDT) From: Maxim Cournoyer References: <87h7cw7ewb.fsf@gmail.com> Date: Sat, 06 Nov 2021 22:33:12 -0400 In-Reply-To: (Efraim Flashner's message of "Mon, 1 Nov 2021 10:54:23 +0200") Message-ID: <87fss83dav.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 51536@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636252453; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=yAajPXqHWN1Mk/7wP/RcXL7C2VPveypTugc8vQ6jwgc=; b=thySmxcbOKOkEDFV8h1oTYmSpyV6iUCE3B1Pwx+6Qva/eXcTmC7aL8fW6MoiFTEY5xQ59A cHRhQIOjyUEOVO7uKwOiprafKvuyeZMqEZ8Gxm0dBKC4RliqvfuF71F36aW54PKGikt4tW DoAUObep100TUisdgrdqdy+e7Uc248ZCcAY83hgu6RHjPdkBI/Au+4w2rN5Vw39aQQInCW UxBhcpRDeZY1JT6BCraHsiCUwTVtCEtNOk/IjWSwQaHH2+7mzMPu8jexAFg5B58kzg/lnk id1MbXjAMRM1LcA1rgqdrRmmul6D/bH6HdJWLE8kR5ssAX9jOBDkCqL6TulL+Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636252453; a=rsa-sha256; cv=none; b=WknFu5lvGuSNB9sR6oHmD1ZXYOg1eCZ+GzlWv4tZP4H/c4W/A3weciEZyx88sce2jx7dY7 gM3fYCTAR8QPLDAKAjfLTSIX2Gt/j8jdy/tlU2TgM+PyEiuBLYcu1EmZkjuBt9/Mxt5wgj eA+1CBXOQv9eHzTjylM7l7WOQqU9HANc29l0FCKuE2VS7o0WNEWmhzgxxQCONHirIT0qSn OuRLc2b5nzEZTCnxTCd9PbCaRU9u5LVw0bRyxsr7o8PeW7ck1eijLWxRHz7Zv7t4eNvRjP /x9PLg1xjELancH2ANst93SJKW0Uh3YNJptYLB0cNnoIjEASctDWsFpXS7DDFg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=OWBav2r0; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: 0.18 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=OWBav2r0; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 77E5E4187 X-Spam-Score: 0.18 X-Migadu-Scanner: scn0.migadu.com X-TUID: HvfrduGMRahU Hi again, Efraim Flashner writes: > On Sun, Oct 31, 2021 at 11:07:00PM -0400, Maxim Cournoyer wrote: >> Hello Guix, [...] > I compared our build flags with Debian's=C2=B9 (which is also what I ofte= n do > when working on other architectures) and it looks like they have > DYNAMIC_OLDER=3D1 and TARGET=3DGENERIC. From looking through Makefile.sys= tem > it looks like TARGET=3DGENERIC makes it more portable, and DYNAMIC_OLDER= =3D1 > adds support for some of the older x86_64 sub-architectures. > If it weren't for the 2k+ packages which depend on openblas I think it'd > be obvious to add the extra flags now. I wonder if we could > unconditionally set DYNAMIC_ARCH=3D1 TARGET=3DGENERIC and then override it > on some architectures, rather than now where each architecture needs its > own flags. > > I also wonder if it's worth it to add a minimal openblas-native for an > easy transform option of --with-graft=3Dopenblas=3Dopenblas-native, where > openblas-native just adds -march=3Dnative and turns off substitutability. > > =C2=B9 https://sources.debian.org/src/openblas/0.3.18+ds-2/debian/rules/#= L19 I've tried this: --8<---------------cut here---------------start------------->8--- modified gnu/packages/maths.scm @@ -4444,13 +4444,13 @@ (define-public openblas ,@(let ((system (or (%current-target-system) (%current-system= )))) (cond ((or (string-prefix? "x86_64" system) - (string-prefix? "i686" system)) - '("DYNAMIC_ARCH=3D1")) - ;; On some of these architectures the CPU can't be detec= ted. - ((or (string-prefix? "powerpc64le" system) + (string-prefix? "i686" system) + (string-prefix? "powerpc64le" system) (string-prefix? "aarch64" system)) - '("DYNAMIC_ARCH=3D1" - "TARGET=3DGENERIC")) + ;; Dynamic older enables a few extra CPU architectures = that + ;; were released before 2010. + '("DYNAMIC_ARCH=3D1" "DYNAMIC_OLDER=3D1" "TARGET=3DGENE= RIC")) + ;; On some of these architectures the CPU can't be detec= ted. ;; On MIPS we force the "SICORTEX" TARGET, as for the ot= her ;; two available MIPS targets special extended instructi= ons ;; for Loongson cores are used. --8<---------------cut here---------------end--------------->8--- And it fixed the illegal instruction problem on my Core 2 Duo CPU (tested by using an offloaded openblas build and building numpy locally with it). But it didn't resolve the reproducibily issue. I'll create a ticket upstream asking for guidance. Thank you, Maxim