bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#63986: Julia is very slow


From: Simon Tournier
Subject: bug#63986: Julia is very slow
Date: Sat, 16 Sep 2023 12:47:32 +0200

Hi Efraim,

On Thu, 14 Sep 2023 at 13:33, Efraim Flashner <efraim@flashner.co.il> wrote:
> On Sun, Aug 20, 2023 at 10:53:44PM +0200, Ludovic Courtès wrote:

> I've attached a diff to adjust openblas64 and to use it for x86_64 in
> julia. I don't know if it's faster than the current openblas.

I have applied the diff and turned into two patches.  Attached below.
Then, I have sent the cover-letter to guix-patches where you are CC.
The idea was to trigger the Julia world rebuild.  However, I do not get
back any Debbugs ID for sending the two patches.

I think that before pushing the change to master, we should wait that QA
builds some substitutes. It will reduce the annoyance for user since
some Julia paackages are long to build.

I have no time today for waiting after some Debbugs troubles.

Cheers,
simon

>From 7f2347d8e64562e1de563cf1e4cdfd192e81a9df Mon Sep 17 00:00:00 2001
Message-Id: <cover.1694859477.git.zimon.toutoune@gmail.com>
From: Simon Tournier <zimon.toutoune@gmail.com>
X-Debbugs-CC: Efraim Flashner <efraim@flashner.co.il>, Cayetano Santos 
<csantosb@inventati.org>,
Date: Sat, 16 Sep 2023 12:17:57 +0200
Subject: [PATCH 0/2] Fix bug#63986: Julia is very slow

Hi,

This series is for triggering the rebuild of the Julia world.  Some Julia
packages are long to build so let minimize the annoyance and make some
substitutes available before pushing to master. :-)

        bug#63986: Julia is very slow
        Cayetano Santos via Bug reports for GNU Guix <bug-guix@gnu.org>
        Fri, 09 Jun 2023 23:42:00 +0200
        id:87legsl3cm.fsf@inventati.org
        https://yhetil.org/guix/87legsl3cm.fsf@inventati.org
        https://issues.guix.gnu.org/msgid/87legsl3cm.fsf@inventati.org


Cheers,
simon

Efraim Flashner (2):
  gnu: openblas-ilp64: Add symbol suffix.
  gnu: julia: Conditionally use openblas with ILP64 support.

 gnu/packages/julia.scm | 22 ++++++++++++++--------
 gnu/packages/maths.scm |  4 +++-
 2 files changed, 17 insertions(+), 9 deletions(-)


base-commit: eeec8371890fc95c60112da299dde78b21c948c2
-- 
2.38.1

>From 2f044415efb5dc5703bf2b09439c6f5e2fd1fd72 Mon Sep 17 00:00:00 2001
Message-Id: 
<2f044415efb5dc5703bf2b09439c6f5e2fd1fd72.1694859477.git.zimon.toutoune@gmail.com>
In-Reply-To: <cover.1694859477.git.zimon.toutoune@gmail.com>
References: <cover.1694859477.git.zimon.toutoune@gmail.com>
From: Efraim Flashner <efraim@flashner.co.il>
Date: Sat, 16 Sep 2023 11:59:28 +0200
Subject: [PATCH 1/2] gnu: openblas-ilp64: Add symbol suffix.

* gnu/packages/maths.scm (openblas-ilp64)[arguments]<#:make-flags>: Add the
symbol '64_' as suffix.
---
 gnu/packages/maths.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 6141c0988612..c051e60d5e40 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4638,7 +4638,9 @@ (define-public openblas-ilp64
     (arguments
      (substitute-keyword-arguments (package-arguments openblas)
        ((#:make-flags flags #~'())
-        #~(append (list "INTERFACE64=1" "LIBNAMESUFFIX=ilp64")
+        #~(append (list "INTERFACE64=1"
+                        "SYMBOLSUFFIX=64_"
+                        "LIBPREFIX=libopenblas64_")
                  #$flags))))
     (synopsis "Optimized BLAS library based on GotoBLAS (ILP64 version)")
     (license license:bsd-3)))
-- 
2.38.1

>From 7f2347d8e64562e1de563cf1e4cdfd192e81a9df Mon Sep 17 00:00:00 2001
Message-Id: 
<7f2347d8e64562e1de563cf1e4cdfd192e81a9df.1694859477.git.zimon.toutoune@gmail.com>
In-Reply-To: <cover.1694859477.git.zimon.toutoune@gmail.com>
References: <cover.1694859477.git.zimon.toutoune@gmail.com>
From: Efraim Flashner <efraim@flashner.co.il>
Date: Sat, 16 Sep 2023 12:05:41 +0200
Subject: [PATCH 2/2] gnu: julia: Conditionally use openblas with ILP64
 support.

Fixes <https://bugs.gnu.org/63986>.
Reported by Cayetano Santos <csantosb@inventati.org>.

* gnu/packages/julia.scm (julia)[arguments]<#:phases>: Conditionally use
OpenBLAS with ILP64 support for x86-64 target.
<#:make-flags>: Likewise.
[inputs]: Conditionally replace openblas by openblas-ilp64 for x86-64 target.

Co-authored-by: Simon Tournier <zimon.toutoune@gmail.com>
---
 gnu/packages/julia.scm | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm
index ba541758223e..8ba2b480ce55 100644
--- a/gnu/packages/julia.scm
+++ b/gnu/packages/julia.scm
@@ -269,7 +269,10 @@ (define-public julia
                (substitute* (jlpath "nghttp2")
                  (((from "libnghttp2")) (to "libnghttp2" "libnghttp2")))
                (substitute* (jlpath "OpenBLAS")
-                 (((from "libopenblas")) (to "openblas" "libopenblas")))
+                 (((from "libopenblas"))
+                  ,@(if (target-x86-64?)
+                      `((to "openblas" "libopenblas64_" "libopenblas"))
+                      `((to "openblas" "libopenblas")))))
                (substitute* (jlpath "OpenLibm")
                  (((from "libopenlibm")) (to "openlibm" "libopenlibm")))
                (substitute* (jlpath "PCRE2")
@@ -479,12 +482,13 @@ (define-public julia
          "NO_GIT=1"             ; build from release tarball.
          "USE_GPL_LIBS=1"       ; proudly
 
-         ,@(if (target-aarch64?)
-             `("USE_BLAS64=0")
-             '())
-
-         "LIBBLAS=-lopenblas"
-         "LIBBLASNAME=libopenblas"
+         ,@(if (target-x86-64?)
+             `("USE_BLAS64=1"
+               "LIBBLAS=-lopenblas64_"
+               "LIBBLASNAME=libopenblas64_")
+             `("USE_BLAS64=0"
+               "LIBBLAS=-lopenblas"
+               "LIBBLASNAME=libopenblas"))
 
          (string-append "UTF8PROC_INC="
                         (assoc-ref %build-inputs "utf8proc")
@@ -513,7 +517,9 @@ (define-public julia
        ("llvm" ,llvm-julia)
        ("mbedtls-apache" ,mbedtls-apache)
        ("mpfr" ,mpfr)
-       ("openblas" ,openblas)
+       ,@(if (target-x86-64?)
+             `(("openblas" ,openblas-ilp64))
+             `(("openblas" ,openblas)))
        ("openlibm" ,openlibm)
        ("p7zip" ,p7zip)
        ("pcre2" ,pcre2)
-- 
2.38.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]