all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Efraim Flashner <efraim@flashner.co.il>
Cc: 51536@debbugs.gnu.org
Subject: bug#51536: openblas builds not reproducible on different x86_64 machines
Date: Fri, 05 Nov 2021 12:38:00 -0400	[thread overview]
Message-ID: <87v91636dz.fsf@gmail.com> (raw)
In-Reply-To: <YX+rP5R0uFQPj5ym@3900XT> (Efraim Flashner's message of "Mon, 1 Nov 2021 10:54:23 +0200")

Hi Efraim!

Efraim Flashner <efraim@flashner.co.il> writes:

[...]

> I compared our build flags with Debian's¹ (which is also what I often do
> when working on other architectures) and it looks like they have
> DYNAMIC_OLDER=1 and TARGET=GENERIC. From looking through Makefile.system
> it looks like TARGET=GENERIC makes it more portable, and DYNAMIC_OLDER=1
> 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=1 on x86 (c.f. Makefile.system):

--8<---------------cut here---------------start------------->8---
ifeq ($(DYNAMIC_ARCH), 1)
ifeq ($(ARCH), x86)
DYNAMIC_CORE = KATMAI COPPERMINE NORTHWOOD PRESCOTT BANIAS \
	       CORE2 PENRYN DUNNINGTON NEHALEM ATHLON OPTERON OPTERON_SSE3 BARCELONA BOBCAT ATOM NANO
endif
--8<---------------cut here---------------end--------------->8---

From that same Makefile, TARGET=GENERIC seems to only do:

--8<---------------cut here---------------start------------->8---
ifdef TARGET
GETARCH_FLAGS := -DFORCE_$(TARGET)
GETARCH_FLAGS += -DUSER_TARGET
ifeq ($(TARGET), GENERIC)
ifeq ($(DYNAMIC_ARCH), 1)
override NO_EXPRECISION=1
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=1 TARGET=GENERIC 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=openblas=openblas-native, where
> openblas-native just adds -march=native and turns off substitutability.

Seems this could be done easily by someone already rewriting their Guix
packages graph.

To be continued...

Maxim




  reply	other threads:[~2021-11-05 16:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-01  3:07 bug#51536: openblas builds not reproducible on different x86_64 machines Maxim Cournoyer
2021-11-01  8:54 ` Efraim Flashner
2021-11-05 16:38   ` Maxim Cournoyer [this message]
2021-11-07  2:33   ` Maxim Cournoyer
2021-11-03 15:03 ` zimoun
2022-02-02 23:13 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v91636dz.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=51536@debbugs.gnu.org \
    --cc=efraim@flashner.co.il \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.