From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id kFYcG3JulGQVewAASxT56A (envelope-from ) for ; Thu, 22 Jun 2023 17:53:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id +IcKG3JulGQ0cgAA9RJhRA (envelope-from ) for ; Thu, 22 Jun 2023 17:53:22 +0200 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 091FFCD68 for ; Thu, 22 Jun 2023 17:53:22 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=KPlE7ZuL; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1687449202; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: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=BKLSOe03WjqB9Tg1GzTxn2Grh/M1D9CqDAFoSGTgjaE=; b=O/Sjo7zZvPX5/LvA7FE+J1v5vdzCT0N4Mlz7R0t4Khgoh3SgW3Jfbbx2licF6KLuhzbr+0 QtrZKnn5vWxB8z7+GBKswdWJKVrDCO0Keb2u7XMwRVLEATB3vRLSI2l6/IHu1ykdEYuyw6 whz5fjfygXwn/X5rjgcQvqu30q3ThC4w52mhe8Oq1Ow9gPmukI7cpzNftZxqTmBRbCu/X3 r2FDww0pM5pqKuByv3ycEtWzJq3kUgphhMMBUGB+CozLik/QUJi06RVxI4S8I3eAQr3F6f rMvmIcqQqSTAg/rOvjlx2/Fhd0sZqdFc/ZbZqphpTsvfN3B3PsJJBJlyJcmzRg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=KPlE7ZuL; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1687449202; a=rsa-sha256; cv=none; b=iLeEqbteCHaLn+qGvqwnWyaKXsHw1QRelXAHwcpzRu1nH60c00AfRXsvVQZswt5dCW/4qq ZUYITXSfYD4yjc64kre7WdnBV1+UPlhvWwajJXgXN8iPbWQRdA2O8k9m5wEFV4LtRhH5g2 iU+ipmc1FIV0B74TP4nQSNHlxgMzv8XDiKrF3O+mblJIQWRyKG7wFhscE/PfB+3LJeOEER Mm7esL1V6ihTp2uTJo7JDwVud8zJX7Nx+wnsLWtr2lARvoM11F8X1KfDsEtbCnJO5liURV e4gEwvmVimwm+Z+EcqBuw4sALn32Mo+KWKuxamsZAs7VOFspeH/jdekmMJpPnQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCMcJ-0001r1-EN; Thu, 22 Jun 2023 11:53:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCMcI-0001qp-8u for bug-guix@gnu.org; Thu, 22 Jun 2023 11:53:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qCMcI-0005rn-0g for bug-guix@gnu.org; Thu, 22 Jun 2023 11:53:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qCMcH-0000oh-ST for bug-guix@gnu.org; Thu, 22 Jun 2023 11:53:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63986: Julia is very slow Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 22 Jun 2023 15:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63986 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: csantosb@inventati.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= , 63986@debbugs.gnu.org, Nicolas Graves , Efraim Flashner Received: via spool by 63986-submit@debbugs.gnu.org id=B63986.16874491473087 (code B ref 63986); Thu, 22 Jun 2023 15:53:01 +0000 Received: (at 63986) by debbugs.gnu.org; 22 Jun 2023 15:52:27 +0000 Received: from localhost ([127.0.0.1]:36539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCMbj-0000ni-75 for submit@debbugs.gnu.org; Thu, 22 Jun 2023 11:52:27 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:39372) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCMbg-0000nO-PA for 63986@debbugs.gnu.org; Thu, 22 Jun 2023 11:52:25 -0400 Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-3110e74bf3cso1678063f8f.1 for <63986@debbugs.gnu.org>; Thu, 22 Jun 2023 08:52:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687449139; x=1690041139; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :from:to:cc:subject:date:message-id:reply-to; bh=BKLSOe03WjqB9Tg1GzTxn2Grh/M1D9CqDAFoSGTgjaE=; b=KPlE7ZuLhzjp57HkSVd+E8aZnMnzf5ml6YhCJ/I1h/hzD7CYes5YW/05w8yRT+gdFd 2iKNMEyIheq14rTghrbyUpvmr0+Pt8eL1tj5s19juq+RS6EzmwNVooHr/ONKvUbGfeKf +6nGvhmWbBAN3ABk2ZwSUbaMvF++xmYI+bXw0rl9V2D15lHlP4YlTxEerrPhjsbVV6+N QviQz6kN7bWwmat5WXTdVfUTerEWTiJfSRS1L1zrANAQeXoLFyGFAdZNZoDRX9nFzp7R sCF97L4zeX738yXaAbBE01RrQ3VhAkOzflvuc4ESYVda0/Nnn1W/UvA3nd4HXgNATon+ I5Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687449139; x=1690041139; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BKLSOe03WjqB9Tg1GzTxn2Grh/M1D9CqDAFoSGTgjaE=; b=KYp/nm9Rsa8NE+cqb5ymovVcP3s/MQcihogrHq3Qc1IS88rQPxDhwhmSaV+ldbe8cB Utk6fnugySVMhYwwLKU1HSE+y26cXAPTvrPWBZPRLRLwBuU0sB8Fs8Kjxs7J9trHjb+A RWs7ocdDwZSBSlFLRxNgR/eRe/xkzufXjRxZ79BCbTCacXbqgrh+9tZBYLzqcGMVQtvq e4jtIdwhPjtdp00xwoAZSJXnGDvPX8NIHSgfzDrSQGmbgVjdnB2jabEYGCeAwf9LxSnZ iNev/aYGWsZyyQmxuIlwXedhJ+loSWuK9ASeL9e+xiNRaal0IUWL1k178kYQfq8pTj3n cpWQ== X-Gm-Message-State: AC+VfDzWrVrLiHDqVhiX2Xuc7BM+7Zox1bx7S0xzQJ59x6HU8axeEIhA Ytas82v4gOOs2jb9zlmvCt4= X-Google-Smtp-Source: ACHHUZ6hjmeEwzHMGeWnBCWR9OAyOUb2lCBUWhsbDwphFg2TzcsXx1pL5H+DrOqeXXP+Ign1nKRONQ== X-Received: by 2002:a5d:66d0:0:b0:311:166b:b3b0 with SMTP id k16-20020a5d66d0000000b00311166bb3b0mr13746627wrw.7.1687449138772; Thu, 22 Jun 2023 08:52:18 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id w7-20020a5d6807000000b003127741d7desm7342098wru.58.2023.06.22.08.52.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 08:52:18 -0700 (PDT) From: Simon Tournier In-Reply-To: <87wmzvmxt8.fsf@inventati.org> References: <87legsl3cm.fsf@inventati.org> <87jzw6rq48.fsf@gnu.org> <871qi7a0qr.fsf@gmail.com> <87pm5o7uh9.fsf@gnu.org> <87ttv0mth3.fsf@inventati.org> <87wmzvmxt8.fsf@inventati.org> Date: Thu, 22 Jun 2023 17:52:15 +0200 Message-ID: <87h6qz8pg0.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -1.15 X-Spam-Score: -1.15 X-Migadu-Queue-Id: 091FFCD68 X-TUID: o9DkcQKLLm7c --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, On Thu, 22 Jun 2023 at 15:26, Cayetano Santos via Bug reports for GNU Guix = wrote: >> Are we following all instructions here ? >> >> https://docs.julialang.org/en/v1.8/devdocs/build/distributing/#Notes-o= n-BLAS-and-LAPACK [...] > Base.USE_BLAS64 > > gives "true" when running fast. Guix julia gives "false". When I try USE_BLAS64=3D1, then I get: --8<---------------cut here---------------start------------->8--- =E2=94=8C Error: No loaded BLAS libraries were built with ILP64 support =E2=94=94 @ LinearAlgebra.BLAS /tmp/guix-build-julia-1.8.3.drv-0/julia-1.8.= 3/usr/share/julia/stdlib/v1.8/LinearAlgebra/src/blas.jl:155 Quitting. --8<---------------cut here---------------end--------------->8--- And from the documentation above, it reads: [...] while on 64-bit architectures, Julia builds OpenBLAS to use 64-bit integers (ILP64). It is essential that all Julia functions that call BLAS and LAPACK API routines use integers of the correct width. Well using the patch attached, I get: 6.884 ms (2 allocations: 7.63 MiB) compared to the previous 494.345 ms (2 allocations: 7.63 MiB) WDYT about this patch? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-gnu-julia-Use-openblas-with-ILP64-support.patch Content-Description: p.patch >From 024c92fac091f59dcdbd3a78eb6ea77bb15b2170 Mon Sep 17 00:00:00 2001 Message-Id: <024c92fac091f59dcdbd3a78eb6ea77bb15b2170.1687449033.git.zimon.toutoune@gmail.com> From: Simon Tournier Date: Thu, 22 Jun 2023 17:45:50 +0200 Subject: [PATCH] gnu: julia: Use openblas with ILP64 support. Fixes . Reported by Cayetano Santos . * gnu/packages/julia.scm (julia)[arguments]<#:make-flags>: Use OpenBLAS with ILP64 support. [inputs]: Replace openblas by openblas-ilp64. --- gnu/packages/julia.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm index ba54175822..a034cbf543 100644 --- a/gnu/packages/julia.scm +++ b/gnu/packages/julia.scm @@ -481,10 +481,10 @@ (define-public julia ,@(if (target-aarch64?) `("USE_BLAS64=0") - '()) + `("USE_BLAS64=1")) - "LIBBLAS=-lopenblas" - "LIBBLASNAME=libopenblas" + "LIBBLAS=-lopenblas_ilp64" + "LIBBLASNAME=libopenblas_ilp64" (string-append "UTF8PROC_INC=" (assoc-ref %build-inputs "utf8proc") @@ -513,7 +513,7 @@ (define-public julia ("llvm" ,llvm-julia) ("mbedtls-apache" ,mbedtls-apache) ("mpfr" ,mpfr) - ("openblas" ,openblas) + ("openblas" ,openblas-ilp64) ("openlibm" ,openlibm) ("p7zip" ,p7zip) ("pcre2" ,pcre2) base-commit: 37c2e94cec6cb8b5e0e93e7b6c712c3b187ca5db -- 2.38.1 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Well, I need to do more tests but I guess that=E2=80=99s the good direction= . :-) Cheers, simon --=-=-=--