From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id cGaPIX1MlGRqjQAASxT56A (envelope-from ) for ; Thu, 22 Jun 2023 15:28:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YAizIH1MlGTtewAAG6o9tA (envelope-from ) for ; Thu, 22 Jun 2023 15:28:29 +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 110FA2F55 for ; Thu, 22 Jun 2023 15:28:29 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCKM1-0007NO-4t; Thu, 22 Jun 2023 09:28:05 -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 1qCKLz-0007ND-B2 for bug-guix@gnu.org; Thu, 22 Jun 2023 09:28: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 1qCKLz-0007WD-2X for bug-guix@gnu.org; Thu, 22 Jun 2023 09:28:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qCKLy-0002Ti-Fi for bug-guix@gnu.org; Thu, 22 Jun 2023 09:28:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63986: Julia is very slow Resent-From: Cayetano Santos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 22 Jun 2023 13:28:02 +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: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Simon Tournier , 63986@debbugs.gnu.org, Nicolas Graves , Efraim Flashner Received: via spool by 63986-submit@debbugs.gnu.org id=B63986.16874404739509 (code B ref 63986); Thu, 22 Jun 2023 13:28:02 +0000 Received: (at 63986) by debbugs.gnu.org; 22 Jun 2023 13:27:53 +0000 Received: from localhost ([127.0.0.1]:35149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCKLp-0002TJ-1S for submit@debbugs.gnu.org; Thu, 22 Jun 2023 09:27:53 -0400 Received: from devianza.investici.org ([198.167.222.108]:61991) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCKLm-0002T9-C1 for 63986@debbugs.gnu.org; Thu, 22 Jun 2023 09:27:51 -0400 Received: from mx2.investici.org (unknown [127.0.0.1]) by devianza.investici.org (Postfix) with ESMTP id 4Qn1QF0Fx8z6v6B; Thu, 22 Jun 2023 13:27:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1687440469; bh=iKePJyzGkJIlg8E9ZsUsZ5xduzWU761lT8epjbLu3kc=; h=References:From:To:Subject:Date:Reply-To:In-reply-to:From; b=EWAa2j2lY1+LEB4MACQ3KLYE6VluIkJm6m3EmbhzBobouvRyKaGNtap9QI/bkuXQR 1P2AsrRN28wz0QLvbtXISxBB0jQjHUDD+AyKIcd8WY10xbUYwwBPlt1fM+IjXWPpXR TYIx0jhd5SQ9ZztJHGwPwDriKH2QZl9bnc6P9H9Q= Received: from [198.167.222.108] (mx2.investici.org [198.167.222.108]) (Authenticated sender: cayetano.santos@inventati.org) by localhost (Postfix) with ESMTPSA id 4Qn1QD4ZR6z6v2n; Thu, 22 Jun 2023 13:27:48 +0000 (UTC) References: <87legsl3cm.fsf@inventati.org> <87jzw6rq48.fsf@gnu.org> <871qi7a0qr.fsf@gmail.com> <87pm5o7uh9.fsf@gnu.org> <87ttv0mth3.fsf@inventati.org> User-agent: mu4e 1.10.3; emacs 29.0.91 Date: Thu, 22 Jun 2023 15:26:30 +0200 In-reply-to: <87ttv0mth3.fsf@inventati.org> Message-ID: <87wmzvmxt8.fsf@inventati.org> 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: , Reply-to: csantosb@inventati.org X-ACL-Warn: , Cayetano Santos From: Cayetano Santos via Bug reports for GNU Guix 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=1687440509; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=iKePJyzGkJIlg8E9ZsUsZ5xduzWU761lT8epjbLu3kc=; b=QFV231500g4E2i4zY4ajwg9RV0v2tgkA6+3Pr2jxlk6EoL/4yDWLXtmI1r5C8jFmAg5+qv XHBP7lWx3vjcCW8kh4NH9AkxZVuCctoY0EYXPQ2UVpdfsaAOzIxPaFYq1jbAChFsh2Fog8 J8OUFUKUWYup6xUBFmruZhK4HBycjYeYWED2RgitpxtmzrekEENlfYLJjtpjlQdExdOCd4 o4zvEgSQLP23MgpAwhVJC4nWheq9PY05p6h40UVZzmFntA6OyfyKnyiJ6GmQIxOSDIoPHE HyVfWGwHHi9oArzL3qQovyRgnMjaVHw9/z6PimIJ4Rw6cdc2A1jJSEsMAeD1IQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=inventati.org header.s=stigmate header.b=EWAa2j2l; dmarc=pass (policy=none) header.from=gnu.org; 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=1687440509; a=rsa-sha256; cv=none; b=XbcUaHCgikUX7KIIcXVbdR1//TqmglU4ZD+SXWHrcb/a3gAcrEc0STfSj0BPuhw9JWawVc Wk/ZBdXGLHbYgCel7Hw9U5kxYodeCqvCUHIW/J3GoRZuaiz5oWgvGUeIYqeDYHPJT2rPaj w1Axs8i0w8/D7/YtiWaRsp1m2OPHdNIcjn5ItK30xmArW0OVyG3zEoB8CQTG51oLtj381Z 9ZxDR8Vmz9WbJnU+Kb+IksUd/lIz1pDIgFRQXYQYOMxXLRZVwrALWSkZnmXUkzyfQhKsWM STMFSEM7tvQBHaUg1Kyjh6yuXIwfxmeiKzCKXt6QD4xlvHk5QY8mbC5P20QCAQ== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -0.75 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=inventati.org header.s=stigmate header.b=EWAa2j2l; dmarc=pass (policy=none) header.from=gnu.org; 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: 110FA2F55 X-Spam-Score: -0.75 X-TUID: FCfXxiX78S29 >mer. 21 juin 2023 at 22:39, Cayetano Santos wrote: >>mer. 21 juin 2023 at 16:36, Ludovic Court=C3=A8s wrote: > >> 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: >> >> Samples: 139K of event 'cycles:u', Event count (approx.): 99624880590 >> Overhead Command Shared Object Symbol >> 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_ >> >> 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! > > Are we following all instructions here ? > > https://docs.julialang.org/en/v1.8/devdocs/build/distributing/#Notes-on= -BLAS-and-LAPACK > > I=E2=80=99m thinking about the variables LIBLAPACK and LIBLAPACKNAME. To complete my previous comment, I just realised that Base.USE_BLAS64 gives "true" when running fast. Guix julia gives "false". C.