From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 d8LEBY9ik2QYzwAASxT56A (envelope-from ) for ; Wed, 21 Jun 2023 22:50:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id AAxjBI9ik2S2ggAA9RJhRA (envelope-from ) for ; Wed, 21 Jun 2023 22:50:23 +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 A877E38CB2 for ; Wed, 21 Jun 2023 22:50:22 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qC4mF-0000xl-5S; Wed, 21 Jun 2023 16:50:07 -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 1qC4mC-0000xS-5R for bug-guix@gnu.org; Wed, 21 Jun 2023 16:50:04 -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 1qC4mA-00074b-Mw for bug-guix@gnu.org; Wed, 21 Jun 2023 16:50:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qC4mA-00033q-IO for bug-guix@gnu.org; Wed, 21 Jun 2023 16:50: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: Wed, 21 Jun 2023 20:50: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?= Cc: 63986@debbugs.gnu.org, Nicolas Graves , Efraim Flashner , Simon Tournier Received: via spool by 63986-submit@debbugs.gnu.org id=B63986.168738056011709 (code B ref 63986); Wed, 21 Jun 2023 20:50:02 +0000 Received: (at 63986) by debbugs.gnu.org; 21 Jun 2023 20:49:20 +0000 Received: from localhost ([127.0.0.1]:34299 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qC4lT-00032m-Hx for submit@debbugs.gnu.org; Wed, 21 Jun 2023 16:49:19 -0400 Received: from confino.investici.org ([93.190.126.19]:33597) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qC4lQ-00032b-IO for 63986@debbugs.gnu.org; Wed, 21 Jun 2023 16:49:17 -0400 Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4QmbG314yKz11GK; Wed, 21 Jun 2023 20:49:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1687380555; bh=rjbRY0Bg8vpTMQrQYEJiwdtdOzn1pNMIlSPuNZgMpQY=; h=References:From:To:Cc:Subject:Date:Reply-To:In-reply-to:From; b=PYOb1CNc+Hcz55fgh9+K95+wJi6tEVTgRdVf38lEs06M214aWVl/284by0M9ccjoo EL4G7+2+CPr6r+CGMEOcdRcZSoEveNz9hkyRbSBmIVoJghMiUb5UpEq05cQ6ME/jlA ST5Xhgy3BMTxBj8uNKAg7lU3Ig3V6IoWortFHp1E= Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: cayetano.santos@inventati.org) by localhost (Postfix) with ESMTPSA id 4QmbG22zXwz11H0; Wed, 21 Jun 2023 20:49:14 +0000 (UTC) References: <87legsl3cm.fsf@inventati.org> <87jzw6rq48.fsf@gnu.org> <871qi7a0qr.fsf@gmail.com> <87pm5o7uh9.fsf@gnu.org> User-agent: mu4e 1.10.3; emacs 29.0.91 Date: Wed, 21 Jun 2023 22:39:52 +0200 In-reply-to: <87pm5o7uh9.fsf@gnu.org> Message-ID: <87ttv0mth3.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-Seal: i=1; s=key1; d=yhetil.org; t=1687380622; a=rsa-sha256; cv=none; b=L80jnNcGcCVOF3gkNmQMV0cTokgZlEttwUr06q4bkWzvw2PaE1lbE3tlRt/UEAET153Vav i5IfcYE6oRFV7ny382taSvt4+CBQbixSZViHPxtd7uqsw/EsDY6Gyf0KY4FvH0UvX0m2xW Yd0PDf/0VglWTvJDmFKWRx3Nccy6A2hNxnGsKbjeVWdk9PgrV+DsQKhmU3oBAoShNvAD+X XhIxpd8iQ/Xw4R81Us1lIe8vlIGWvbk2wF9ByDnJcCqmxxllzZ9NvgzewitMxdRUdsc3i9 leK6bdcFGv7rF+Nu3gfcDrFMiRzAhs1sS63OAxklVgFoUDva5jlIqXXLYsuV3w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=inventati.org header.s=stigmate header.b=PYOb1CNc; 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1687380622; h=from:from:sender:sender:reply-to: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=rjbRY0Bg8vpTMQrQYEJiwdtdOzn1pNMIlSPuNZgMpQY=; b=o083uGMw+NvN2fV+mC8DHudyRgxNbf6hb8e28Y64/xvc4ZTOB73VzY0kLJQ/gYt2tsS1Oa Nu50fJtileFbC+cvDqDBvXmaGM+IJbo7TlstJP/9WpixeS9hCRQFwERfQGQ3QrYNpzpOXV ZNoMk7ORI9Yyecuzr2FG8tmWemxavab9duzYjg+skdPXgKf1JCeEg+920RPKoYzqDgib6N 3H9drPpxWYhGfhQn6zYE1sNbaRpqcehuYTFOkzL+rpph5YWOrdMnojFV8JJUDt3k8XI/GI zZXOql3kwgaWePOVmsi9CV4x3wAgAWPAwt+1CpIHzEafGvLbiqlHTMYmyd1yMA== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=inventati.org header.s=stigmate header.b=PYOb1CNc; 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-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -1.55 X-Spam-Score: -1.55 X-Migadu-Queue-Id: A877E38CB2 X-TUID: Ws6vRemAKQI8 >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. C.