From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 05 12:38:10 2021 Received: (at 51536) by debbugs.gnu.org; 5 Nov 2021 16:38:10 +0000 Received: from localhost ([127.0.0.1]:46981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mj2EE-00059T-7o for submit@debbugs.gnu.org; Fri, 05 Nov 2021 12:38:10 -0400 Received: from mail-qt1-f180.google.com ([209.85.160.180]:38443) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mj2EC-00059D-4x for 51536@debbugs.gnu.org; Fri, 05 Nov 2021 12:38:08 -0400 Received: by mail-qt1-f180.google.com with SMTP id c12so3036278qtd.5 for <51536@debbugs.gnu.org>; Fri, 05 Nov 2021 09:38:08 -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=LWhQH8Ucu0hHEII6fjTYInLvf7oAs70nh+x2G1CRWLw=; b=IBsE0/R83EyhU9IDXLQGaywt1StIYBza6+DK3qYdovMDCJNtcDfBp0XVv5DLWxOMHm W/iwuFnDD6PV0lMqBgD4P1CFkLvOMNOhm72d7GDQWI09TquKvPBupzzz/PfeQ/A1WGCj JYaNh8h/I+eYtHtiWWuQ7kMt2X+QUeE64fLP8xSVqnsr8/XhnmE3OE4gM0bvaS57YCQF N42tQ0bLrqdBDGkfTaLr649C38ljqs3rRjZ+WFkd0XBm7NCtHE+G0fFcZdhxjPSY0NhU XaY8dDc3tqP2CNcEyzgEhL1bXEAc9FZtchb79ornSrrYTJqOz8LBbmsoJ3SetSkUpe73 Gdcw== 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=LWhQH8Ucu0hHEII6fjTYInLvf7oAs70nh+x2G1CRWLw=; b=5v1515yYrf0r1FL5AqVTAyf9bJs4HwBuPziCHnmB7UhD4LRzz9ZeA00U5GPAs0lm2c CwK1HOa9V5TIWNu8zcBcjWRVeeOYNM3iwxBIMs5FBJrLOFPRIAL8pkzIB/6SE0FS6T8n d9jYR+YbUD/v6QgPb031aNJOZCCJtR4+g29ZS+EEA1AA2fzAKbfy67lId/9axjuW5qc1 X9RiY5UU3Pid8jxXy8XNYYi2QMAeihqf2K76oJYp9UDp+3ZHWPymbn7Br+VO70639Oic 3sLe5th80MvmSE/5Y8zYddX5zB8OxgEGil7YvZFG2id94Eg831OLvSNvgnWMRSBezn6k 8nqg== X-Gm-Message-State: AOAM533mEUWvxNj9fQYSYGFwCqTHIhPmcbsXQewKQUrPAuPW/VEkG8dc vVzwzUCTjfqiFaAQmKkPJKEhx3d9RywsIg== X-Google-Smtp-Source: ABdhPJz6V2jr8O0Ic/j015Q2tIFjL0BAneGSqEq1U50QSgn/fzid/yTkXzEt9DSmgrrXja2O4Bb5WA== X-Received: by 2002:ac8:7059:: with SMTP id y25mr62010966qtm.404.1636130282270; Fri, 05 Nov 2021 09:38:02 -0700 (PDT) Received: from hurd (dsl-156-19.b2b2c.ca. [66.158.156.19]) by smtp.gmail.com with ESMTPSA id k2sm5755958qtg.35.2021.11.05.09.38.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 09:38:01 -0700 (PDT) From: Maxim Cournoyer To: Efraim Flashner Subject: Re: bug#51536: openblas builds not reproducible on different x86_64 machines References: <87h7cw7ewb.fsf@gmail.com> Date: Fri, 05 Nov 2021 12:38:00 -0400 In-Reply-To: (Efraim Flashner's message of "Mon, 1 Nov 2021 10:54:23 +0200") Message-ID: <87v91636dz.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-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51536 Cc: 51536@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Efraim! Efraim Flashner writes: [...] > 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. DYNAMIC_OLDER is probably a good idea (it'll inflate the binary size a bit), but I doubt it's the culprit here, as my problematic CPU is a Q6700 from the CORE2 family, already supposed to be covered by DYNAMIC_ARCH=3D1 on x86 (c.f. Makefile.system): --8<---------------cut here---------------start------------->8--- ifeq ($(DYNAMIC_ARCH), 1) ifeq ($(ARCH), x86) DYNAMIC_CORE =3D KATMAI COPPERMINE NORTHWOOD PRESCOTT BANIAS \ CORE2 PENRYN DUNNINGTON NEHALEM ATHLON OPTERON OPTERON_SSE3 BARCELO= NA BOBCAT ATOM NANO endif --8<---------------cut here---------------end--------------->8--- From that same Makefile, TARGET=3DGENERIC seems to only do: --8<---------------cut here---------------start------------->8--- ifdef TARGET GETARCH_FLAGS :=3D -DFORCE_$(TARGET) GETARCH_FLAGS +=3D -DUSER_TARGET ifeq ($(TARGET), GENERIC) ifeq ($(DYNAMIC_ARCH), 1) override NO_EXPRECISION=3D1 export NO_EXPRECiSION endif endif endif --8<---------------cut here---------------end--------------->8--- I.e. it sets NO_EXPRECISION to 1 and exports it (with a typo!). Perhaps good to fix that typo and try it! > 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've rebuilt core-updates-frozen-batched-changes so many times now I'm not too afraid of it anymore ;-). > 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. Seems this could be done easily by someone already rewriting their Guix packages graph. To be continued... Maxim