unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Cayetano Santos via Bug reports for GNU Guix <bug-guix@gnu.org>
To: "Ludovic Courtès" <ludovic.courtes@inria.fr>,
	"Simon Tournier" <zimon.toutoune@gmail.com>,
	63986@debbugs.gnu.org, "Nicolas Graves" <ngraves@ngraves.fr>,
	"Efraim Flashner" <efraim@flashner.co.il>
Subject: bug#63986: Julia is very slow
Date: Thu, 22 Jun 2023 15:26:30 +0200	[thread overview]
Message-ID: <87wmzvmxt8.fsf@inventati.org> (raw)
In-Reply-To: <87ttv0mth3.fsf@inventati.org>



>mer. 21 juin 2023 at 22:39, Cayetano Santos <csantosb@inventati.org> wrote:

>>mer. 21 juin 2023 at 16:36, Ludovic Courtès <ludovic.courtes@inria.fr> wrote:
>
>> Hey!
>>
>> The benchmark you posted, Cayetano, is:
>>
>>   julia -e 'using Pkg; Pkg.add("BenchmarkTools"); using BenchmarkTools; N = 1000; A = rand(N, N); B = rand(N, N); @btime $A*$B'
>>
>> This is a matrix multiplication that gets delegated to the underlying
>> BLAS right.  Running it under ‘perf record’ 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’re using libblas.so (presumably from the ‘lapack’ package) and not
>> OpenBLAS, so no wonder it’s slow.
>>
>> Could it be that:
>>
>>          "LIBBLAS=-lopenblas"
>>          "LIBBLASNAME=libopenblas"
>>
>> 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’m 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.




  reply	other threads:[~2023-06-22 13:28 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 21:42 bug#63986: Julia is very slow Cayetano Santos via Bug reports for GNU Guix
2023-06-14 16:00 ` Ludovic Courtès
2023-06-19 16:13   ` Simon Tournier
2023-06-21 14:36     ` Ludovic Courtès
2023-06-21 20:39       ` Cayetano Santos via Bug reports for GNU Guix
2023-06-22 13:26         ` Cayetano Santos via Bug reports for GNU Guix [this message]
2023-06-22 14:37           ` Efraim Flashner
2023-06-22 15:52           ` Simon Tournier
2023-06-22 16:25             ` Efraim Flashner
2023-06-22 16:56               ` Cayetano Santos via Bug reports for GNU Guix
2023-06-22 17:12               ` Simon Tournier
2023-06-23  9:09                 ` Ludovic Courtès
2023-06-23  9:16                   ` Efraim Flashner
2023-06-23 12:11                     ` Simon Tournier
2023-06-23 13:23                     ` Simon Tournier
2023-06-23 14:16                       ` Efraim Flashner
2023-07-06 14:13                         ` Ludovic Courtès
2023-08-20 20:53                           ` Ludovic Courtès
2023-09-14 10:33                             ` Efraim Flashner
2023-09-15 19:45                               ` Cayetano Santos via Bug reports for GNU Guix
2023-09-16 10:47                               ` Simon Tournier
2023-09-16 11:18                                 ` Simon Tournier
2023-09-20 15:57                               ` Simon Tournier
2023-09-24  8:37                                 ` Cayetano Santos via Bug reports for GNU Guix
2023-09-25 14:46                                 ` Ludovic Courtès
2023-09-26  9:27                                   ` Efraim Flashner
2023-09-29  8:46                                     ` Ludovic Courtès
2023-09-29 10:12                                       ` Efraim Flashner
2023-09-28 11:41                                 ` Efraim Flashner
2023-06-22 18:47               ` Simon Tournier
2023-06-22 18:55                 ` Efraim Flashner
2023-06-22 20:13                 ` Efraim Flashner
2023-06-23 12:06                   ` Simon Tournier
2023-09-15 19:49 ` bug#63986: Fixed Cayetano Santos via Bug reports for GNU Guix
2023-09-16 10:23 ` bug#63986: [PATCH 0/2] Fix bug#63986: Julia is very slow Simon Tournier
     [not found] ` <handler.63986.D63986.169480740431199.notifdone@debbugs.gnu.org>
2023-09-16 11:03   ` Simon Tournier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wmzvmxt8.fsf@inventati.org \
    --to=bug-guix@gnu.org \
    --cc=63986@debbugs.gnu.org \
    --cc=csantosb@inventati.org \
    --cc=efraim@flashner.co.il \
    --cc=ludovic.courtes@inria.fr \
    --cc=ngraves@ngraves.fr \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).