From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id qH88ClALk2RXjwAASxT56A (envelope-from ) for ; Wed, 21 Jun 2023 16:38:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 6MoRCVALk2QzHgEAG6o9tA (envelope-from ) for ; Wed, 21 Jun 2023 16:38:08 +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 A1CDE44E4C for ; Wed, 21 Jun 2023 16:38:07 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qByxM-0003Md-D7; Wed, 21 Jun 2023 10:37:12 -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 1qByxC-0003MD-OV for bug-guix@gnu.org; Wed, 21 Jun 2023 10:37:03 -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 1qByxB-0006uc-Uv for bug-guix@gnu.org; Wed, 21 Jun 2023 10:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qByxB-0005yw-QQ for bug-guix@gnu.org; Wed, 21 Jun 2023 10:37:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63986: Julia is very slow Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 21 Jun 2023 14:37: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: Simon Tournier Cc: 63986@debbugs.gnu.org, Nicolas Graves , Cayetano Santos , Efraim Flashner Received: via spool by 63986-submit@debbugs.gnu.org id=B63986.168735820822969 (code B ref 63986); Wed, 21 Jun 2023 14:37:01 +0000 Received: (at 63986) by debbugs.gnu.org; 21 Jun 2023 14:36:48 +0000 Received: from localhost ([127.0.0.1]:33909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBywx-0005yP-Ml for submit@debbugs.gnu.org; Wed, 21 Jun 2023 10:36:47 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:51523) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBywu-0005y5-PR for 63986@debbugs.gnu.org; Wed, 21 Jun 2023 10:36:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version:content-transfer-encoding; bh=6oJnykTpXbWJVw5JZB94cKt571bgz6zmrYXXEBZLtN0=; b=XcRB/JFxkcyYTOZtgq/m8VvAwnU/QFg9OlQt4pCjeqQuOC0R6x66/SLj 5Rw+4uhwqS4Fyz+ANES+2aVOpHqcLA+UHEpuLECEKEMUU6WVVmHp+V+Ue Ej47lsyDOGIK/iAv63FZ6V6JHuvJxr88XcvxPlALNbL1MpmEBf09jFzmR Q=; X-IronPort-AV: E=Sophos;i="6.00,260,1681164000"; d="scan'208";a="114039724" Received: from unknown (HELO ribbon) ([109.190.253.15]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jun 2023 16:36:37 +0200 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87legsl3cm.fsf@inventati.org> <87jzw6rq48.fsf@gnu.org> <871qi7a0qr.fsf@gmail.com> Date: Wed, 21 Jun 2023 16:36:34 +0200 In-Reply-To: <871qi7a0qr.fsf@gmail.com> (Simon Tournier's message of "Mon, 19 Jun 2023 18:13:48 +0200") Message-ID: <87pm5o7uh9.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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: , 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1687358287; 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=6oJnykTpXbWJVw5JZB94cKt571bgz6zmrYXXEBZLtN0=; b=R2Kz+OvbDnZNRhVaKjU3ueHWI3YJqT1UB/MeCHsn+H1QlzFKbLarvuBTDFABeYSwTqZye0 9+YyrtBc8M3avf53PkqqqF2uNhn7/OlOtLSnH8RK/cCl+QrPZtUO7QiVCgCqd4+orhLEqC 6TayYkdBydq7JBSL309n6pSxGcjLFo91XJ5wg6WO5InmmUOZRi7MdPwlwrREkioGVeJm84 lqp3aC/fGWCASst/57cxdC2hwUjwj+L+9P16lXqAoKuNBeERTzBM8ecazp2CgxCBNV7SUn XVxPWfo9px+hwTzdPYxu/FT+/LlkCDAQpgbUgVpGu3dM3+6nHSwOfsFO1LT4Yg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=inria.fr header.s=dc header.b="XcRB/JFx"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=inria.fr (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=1687358287; a=rsa-sha256; cv=none; b=ahImSKoUHUYorbx7/57iblkn8dHxvSzk7Dr7AG3+EHhvYlXOBYDE3pcgHpebOlFrs5DCY3 PZ5xBaUK5b5+/uPhxUVh+FrJeVFB7JBzCRkTWRbyYbZMf7NlI5sy7bhtPq/z406P2YKf3S 4v05BUlFriXsQqtEXBAoWDDd5kVOMF7R0LI3P023n3gdhih7umdTo6P8ZVkJ8zozKp6Iae uFM9M0NcxCWsJI8YU+tl9iQE9wVPauFl8ZUoG9k9VBizpEtXH2XR0yq4lZhEvoKtvOd9qr P5Rh4I9tomXVpnBI1AjyFzT64xOOtSSHrWSgMIqGsiuWy246DTJZhIINx4Btfg== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -0.85 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=inria.fr header.s=dc header.b="XcRB/JFx"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=inria.fr (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" X-Migadu-Queue-Id: A1CDE44E4C X-Spam-Score: -0.85 X-TUID: ngA/nztIfxc3 Hey! The benchmark you posted, Cayetano, is: julia -e 'using Pkg; Pkg.add("BenchmarkTools"); using BenchmarkTools; N = =3D 1000; A =3D rand(N, N); B =3D rand(N, N); @btime $A*$B' This is a matrix multiplication that gets delegated to the underlying BLAS right. Running it under =E2=80=98perf record=E2=80=99 confirms it: --8<---------------cut here---------------start------------->8--- Samples: 139K of event 'cycles:u', Event count (approx.): 99624880590=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 Overhead Command Shared Object Symbol=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20 35.27% .julia-real libblas.so.3.9.0 [.] dgemm_ 3.99% .julia-real libjulia-internal.so.1.8 [.] gc_mark_loop 2.60% .julia-real libjulia-internal.so.1.8 [.] apply_cl 1.06% .julia-real libjulia-internal.so.1.8 [.] jl_get_binding_ --8<---------------cut here---------------end--------------->8--- We=E2=80=99re using libblas.so (presumably from the =E2=80=98lapack=E2=80= =99 package) and not OpenBLAS, so no wonder it=E2=80=99s slow. Could it be that: "LIBBLAS=3D-lopenblas" "LIBBLASNAME=3Dlibopenblas" is ineffective? I think we have a lead! Ludo=E2=80=99.