From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 IKzXH+xclGTAOQEASxT56A (envelope-from ) for ; Thu, 22 Jun 2023 16:38:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 0HUEH+xclGQumQAAG6o9tA (envelope-from ) for ; Thu, 22 Jun 2023 16:38:36 +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 3C9A4863B for ; Thu, 22 Jun 2023 16:38:36 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=LQzOiwYu; dmarc=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=1687444716; 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: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=ZofPEYQrpib6IX5MT5nBg3oBYR51rESp/kRgJshA8YY=; b=gff60/vnHtn6ZHzBjtL3p9gV+fhmLVFo8sm3mDo3heJSyDIki3pohFlFw1oRXOxarMY7MO yU9y6Vkn2Xp+H/AwqrInpcWHx/ap9aEVXIequczrKTWt1LoW0ThbTE8i3o1Xr+9yzziQA+ F1l4FODZz5qczxq6uPLcQ0kyzS5dZRf+iy4NSGrG1twwcs13dwe3RcVTtSFo8yeFC+YVlM Te1DABzAk0aAoSMwscQGDYO3QoSoqfiqXx8TqjgMYd217wulTiNJUrupVcT3vBrF1Cf+w5 JJ0MpT9xELNba7cbbN5HXlp60HYdrtT/Qc3SzNgZxCtFa3Ls2MOIX3EuT2Qh1A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=LQzOiwYu; dmarc=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=1687444716; a=rsa-sha256; cv=none; b=RQMH/+OB6TNIWEt6M6B+ZED5pdbtp7M8vh1OwVhhdzhaSdGJP3ei2bti2BGl7B/CqUDLFw rTlVaLeTKpNPHuHedw0EU73g7ycl4dG4E0V9B84E/rSCULxahgOXAdgo+2YGUBORuo7+wX lpCh2EMgndzwKqAXJ5lnc9sR8oHYW2wTAgyo52VAHrFrna37P5lybbl/Bl0jRNouz8B67T lmzLimEAmlOdNO8kFU4jK3iRjPU3gPOu+i9VPDO74lPLP8rAUfRHoEuxLhHmnmD5a76Z3V BrrIIjasRLv4OStPDq62TAUG52JYL4yh60o9RwoNNBAg00cFVfyIXYONFyY9Aw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCLRo-0006rA-G3; Thu, 22 Jun 2023 10:38:08 -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 1qCLRi-0006qu-GK for bug-guix@gnu.org; Thu, 22 Jun 2023 10:38: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 1qCLRi-0008AC-7U for bug-guix@gnu.org; Thu, 22 Jun 2023 10:38:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qCLRi-00076a-1U for bug-guix@gnu.org; Thu, 22 Jun 2023 10:38:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63986: Julia is very slow Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 22 Jun 2023 14:38: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: Cayetano Santos Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 63986@debbugs.gnu.org, Nicolas Graves , Simon Tournier Received: via spool by 63986-submit@debbugs.gnu.org id=B63986.168744466127268 (code B ref 63986); Thu, 22 Jun 2023 14:38:01 +0000 Received: (at 63986) by debbugs.gnu.org; 22 Jun 2023 14:37:41 +0000 Received: from localhost ([127.0.0.1]:36468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCLRN-00075k-5k for submit@debbugs.gnu.org; Thu, 22 Jun 2023 10:37:41 -0400 Received: from mail-wr1-f44.google.com ([209.85.221.44]:49520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCLRL-00075W-E5 for 63986@debbugs.gnu.org; Thu, 22 Jun 2023 10:37:40 -0400 Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-311275efaf8so5713395f8f.3 for <63986@debbugs.gnu.org>; Thu, 22 Jun 2023 07:37:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687444653; x=1690036653; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date:message-id:reply-to; bh=ZofPEYQrpib6IX5MT5nBg3oBYR51rESp/kRgJshA8YY=; b=LQzOiwYu22REw3utKiyQO7Zsy4NdpaCKqbdEWvhRy8SPZ9nnPARBDtcK3fUcQJLyBJ Xizjp3hDiayfWsaXHscE7kIXzpSTx4aJOkTatisyyvy6K6c9rXog25PgGCyDZwBtZo7z Qc/wENJ52v7mqsYrNbanqEiz/ZVEoxX2f+MHqp2jhZQg9HCjPDbQ1IM+wL6Yvp0DWe7/ 2XxZalD0H9epJk779r4YRhthZIOFiyPWAs5rABFy6NeXTwNEXR0FQBWl3Lb+Mh2z9P+I rqhlI93waCtu+mintpxh2NnAYe9DWKMTPloTeisP18oxMtwdx6kIBybCr1KLYszkDz+r qE8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687444653; x=1690036653; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZofPEYQrpib6IX5MT5nBg3oBYR51rESp/kRgJshA8YY=; b=glVUTT+vkA/4JavC6O8jgUYgbEWUscHpEygRyQdYjCPE3ic42SGzJnhV4ELsTcQeLG XJcr9VAk1wmIcSUETm0vD4i+xc05NL0IvSqZLPQx170nDZpnERyHnqqrMyVL6unz1SJQ nreMoBOTQLiPq4ABQ8v/FhFu3IqGTirz60pcssFoCgZFXCPlhPqRRfvSm1gOkdnp/OAz e7azdPG1kDY2aJuY56Kr1vXAB01wkns7vwn27QHvtxPHTzwghqETdC743Qa/FxsWO/7K R6bGcViZiHYHiyOoNIuqQu8dS7gmpfqw21ldfNyEba1RoFsh6XZhdWXBHbhMNSqAOhjE OPaQ== X-Gm-Message-State: AC+VfDyUVmM+D7aASBs/3TC/qFcV3wXdwxmdkkGBtPSqxYViqmwYVbH1 SH+2TP3XAX1s0pxo2RJfqIA= X-Google-Smtp-Source: ACHHUZ7PJzE0teRZgJV2fR6xtHiznaoukKpI/DwpJ+JL4OjDKYteTw96EqK0zgFc19KfOxB8oqj7uQ== X-Received: by 2002:a5d:50d2:0:b0:311:f8a:1ca4 with SMTP id f18-20020a5d50d2000000b003110f8a1ca4mr13739663wrt.31.1687444653402; Thu, 22 Jun 2023 07:37:33 -0700 (PDT) Received: from localhost ([188.120.129.124]) by smtp.gmail.com with ESMTPSA id t13-20020a1c770d000000b003f91e32b1ebsm12465017wmi.17.2023.06.22.07.37.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 07:37:32 -0700 (PDT) Date: Thu, 22 Jun 2023 17:37:31 +0300 From: Efraim Flashner Message-ID: Mail-Followup-To: Efraim Flashner , Cayetano Santos , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Simon Tournier , 63986@debbugs.gnu.org, Nicolas Graves 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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SRceopnWyrJRrsaM" Content-Disposition: inline In-Reply-To: <87wmzvmxt8.fsf@inventati.org> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 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.35 X-Spam-Score: -1.35 X-Migadu-Queue-Id: 3C9A4863B X-TUID: tBmR+LGz52ox --SRceopnWyrJRrsaM Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 22, 2023 at 03:26:30PM +0200, Cayetano Santos wrote: >=20 >=20 > >mer. 21 juin 2023 at 22:39, Cayetano Santos wro= te: >=20 > >>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' I've been having a hard time with that command, so I've been running julia -e 'using Pkg; Pkg.add("BenchmarkTools"); using BenchmarkTools; N =3D= 1000; A =3D rand(N, N); B =3D rand(N, N); @time A*B' I'm not sure if that's useful or not but I didn't see a different with LIBBLAS* set. > >> > >> This is a matrix multiplication that gets delegated to the underlying > >> BLAS right. Running it under =E2=80=98perf record=E2=80=99 confirms i= t: > >> > >> 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. >=20 > To complete my previous comment, I just realised that >=20 > Base.USE_BLAS64 >=20 > gives "true" when running fast. Guix julia gives "false". >=20 > C. I'll see what comes with switching it to blas64 --=20 Efraim Flashner =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --SRceopnWyrJRrsaM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmSUXKgACgkQQarn3Mo9 g1EjSg//dfiNlu7SXBgZ1yh1v+3mrJDopwHX8Hi+GQzslVxXrGAdkhvETGyor2YI 4hUQhWlKI5bqoPknACVnWcvD0ZhAepViv1a/lWzOFhKkyWJzB3zs0XjYLWON3/Nl Hixv6Hsl6+s9LajaBO1dcG2dQul5qNDUpYg/jyW0V+gAkeAjvMjv2IAbOnfzyGlf TaejEpiXzcWLT/V8uwXtNBkCD0i2ICbi63+2amxEPzjqatZ0KH2pV9imRx1SmVtU lbicU21UOqnJWgSA6MlAfUCW1RkkJp/A8vqayCA5cZG+bBtTqBIPoJvwAUXlXgEI TZFcyb/QUe2FWCy6FZWh58VDSDdwIHIyUJ1N8XpfdCHzY6CkaV57yqWqcjr8UVUl YK1XClHJ2Ml7/dHg/nyXgvXg7cpjNOGo8/kugYWoi5QQK4ON9AFhrK4eVBEV1Cse 8PMqzMMvjwglhhwD72sTA8Y42J1DtNeNSippibTL8UmgdasQI0/JvfF7QlMpq7oS 5CxUAItMHqwjHq7ALD291AhDsrcyr8Gyo3x3CnfVscr+ndvdSi4AQtYEJTGseEhh 73pXoo37yROstuTByUUyOc1CnvyGTUxG8vxPfkXjIMVQwjxKxQdCDBJCytYOl5ga JaMps//U03ygl6Ei12TNLNqYx6YvaQl3lIVINvEWAUq/yq1dCqI= =0OVi -----END PGP SIGNATURE----- --SRceopnWyrJRrsaM--