Hi, On Thu, 22 Jun 2023 at 19:25, Efraim Flashner <[email protected]> wrote:
> It might need some tuning anyway, currently we have julia for i686 and > switching to solely openblas-ilp64 we'd lose 32-bit support. Yes, indeed. This attached patch conditionally switches.
>From 9e1912148d4a691a5484fc7f87597b579ba61785 Mon Sep 17 00:00:00 2001 Message-Id: <9e1912148d4a691a5484fc7f87597b579ba61785.1687453627.git.zimon.touto...@gmail.com> From: Simon Tournier <[email protected]> Date: Thu, 22 Jun 2023 17:45:50 +0200 Subject: [PATCH v2] gnu: julia: Conditionally use openblas with ILP64 support. Fixes <https://bugs.gnu.org/63986>. Reported by Cayetano Santos <[email protected]>. * gnu/packages/julia.scm (julia)[arguments]<#:make-flags>: Conditionally use OpenBLAS with ILP64 support for x86-64 target. [inputs]: Conditionally replace openblas by openblas-ilp64 for x86-64 target. --- gnu/packages/julia.scm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm index ba54175822..3ffd1fa4cb 100644 --- a/gnu/packages/julia.scm +++ b/gnu/packages/julia.scm @@ -483,8 +483,12 @@ (define-public julia `("USE_BLAS64=0") '()) - "LIBBLAS=-lopenblas" - "LIBBLASNAME=libopenblas" + ,@(if (target-x86-64?) + `("USE_BLAS64=1" + "LIBBLAS=-lopenblas_ilp64" + "LIBBLASNAME=libopenblas_ilp64") + `("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) base-commit: 37c2e94cec6cb8b5e0e93e7b6c712c3b187ca5db -- 2.38.1
Well, the current recipe could be improved but let focus on the current bug report. And I guess the slowness come from an incorrect use of BLAS for x86-64. That seems fixed by the patch, no? Cheers, simon
