Hi! Maxim Cournoyer skribis: > Our OpenBLAS package uses DYNAMIC_ARCH=1 to provide optimizations for > all supported targets, at least of x86 and x86_64. In theory that seems > OK, but in practice the builds differ depending on the host CPU. What follows is the log of an investigation that didn’t find the root cause, but perhaps it’ll give us ideas… Right now the build results of ci.guix and bordeaux.guix differ: --8<---------------cut here---------------start------------->8--- $ guix describe Generacio 202 Jan 30 2022 23:57:03 (nuna) guix 43dd34c repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 43dd34c7777a212c99a97da7a2c237158faa9a1b ludo@ribbon ~/src/guix$ guix challenge openblas /gnu/store/ras6dprsw3wm3swk23jjp8ww5dwxj333-openblas-0.3.18 contents differ: no local build for '/gnu/store/ras6dprsw3wm3swk23jjp8ww5dwxj333-openblas-0.3.18' https://ci.guix.gnu.org/nar/lzip/ras6dprsw3wm3swk23jjp8ww5dwxj333-openblas-0.3.18: 0m1jlc26yrwxn8gxwpj8452kw4g84ywclh0hnab93873ifz87s5c https://bordeaux.guix.gnu.org/nar/lzip/ras6dprsw3wm3swk23jjp8ww5dwxj333-openblas-0.3.18: 1d0m9v3kpsqzplpl1law2lfhm6rrbhkkqsvh19dlg9wx45vbbvjb differing file: /lib/libopenblasp-r0.3.18.so 1 store items were analyzed: - 0 (0.0%) were identical - 1 (100.0%) differed - 0 (0.0%) were inconclusive --8<---------------cut here---------------end--------------->8--- To get an idea, I thought we could compare the two build logs: https://ci.guix.gnu.org/log/ras6dprsw3wm3swk23jjp8ww5dwxj333-openblas-0.3.18 https://bordeaux.guix.gnu.org/build/3fab433c-e7d3-498d-86f8-4bcd5da9c4db (Protip: I found the second one via .) The “ar -ru ../libopenblasp-r0.3.18.a …” are apparently the same in both cases, which rules out the simple case of unsorted .o files. The .so on ci.guix is slightly bigger: --8<---------------cut here---------------start------------->8--- $ wget -qO - https://ci.guix.gnu.org/nar/lzip/ras6dprsw3wm3swk23jjp8ww5dwxj333-openblas-0.3.18| lzip -d | guix archive -x /tmp/o1 $ wget -qO - https://bordeaux.guix.gnu.org/nar/lzip/ras6dprsw3wm3swk23jjp8ww5dwxj333-openblas-0.3.18| lzip -d | guix archive -x /tmp/o2 $ ls -l /tmp/{o1,o2}/lib/libopenblasp-r0.3.18.so -r-xr-xr-x 1 ludo users 40538768 Jan 1 1970 /tmp/o1/lib/libopenblasp-r0.3.18.so -r-xr-xr-x 1 ludo users 40436368 Jan 1 1970 /tmp/o2/lib/libopenblasp-r0.3.18.so --8<---------------cut here---------------end--------------->8--- Both have the same symbols though, and in the same order: --8<---------------cut here---------------start------------->8--- $ diff -u <(objdump -T /tmp/o1/lib/libopenblasp-r0.3.18.so |cut -c 60- ) <(objdump -T /tmp/o2/lib/libopenblasp-r0.3.18.so |cut -c60- ) $ echo $? 0 --8<---------------cut here---------------end--------------->8--- … which suggests they include code optimized for the same micro-architectures because symbols include the name of the micro-architecture: --8<---------------cut here---------------start------------->8--- $ objdump -T /tmp/o1/lib/libopenblasp-r0.3.18.so |cut -c 60-|tail -10 csymm3m_RU cgemv_c_BARCELONA csymv_U_HASWELL dtrmm_iltncopy_CORE2 LAPACKE_dsytrs2 openblas_num_threads_env csycon_rook_ csytri_rook_ --8<---------------cut here---------------end--------------->8--- Some of the offsets differ though: