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 4LLuKG2BlGRk1gAASxT56A (envelope-from ) for ; Thu, 22 Jun 2023 19:14:21 +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 4GXmKG2BlGQfKQAA9RJhRA (envelope-from ) for ; Thu, 22 Jun 2023 19:14:21 +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 4DDF9F0C3 for ; Thu, 22 Jun 2023 19:14:21 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCNsi-0001Uk-2j; Thu, 22 Jun 2023 13:14:04 -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 1qCNsg-0001Uc-Tn for bug-guix@gnu.org; Thu, 22 Jun 2023 13:14: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 1qCNsg-0004DW-L4 for bug-guix@gnu.org; Thu, 22 Jun 2023 13:14:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qCNsg-0005ob-GL for bug-guix@gnu.org; Thu, 22 Jun 2023 13:14:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63986: Julia is very slow Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 22 Jun 2023 17:14: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: Efraim Flashner Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 63986@debbugs.gnu.org, Nicolas Graves , csantosb@inventati.org Received: via spool by 63986-submit@debbugs.gnu.org id=B63986.168745398922282 (code B ref 63986); Thu, 22 Jun 2023 17:14:02 +0000 Received: (at 63986) by debbugs.gnu.org; 22 Jun 2023 17:13:09 +0000 Received: from localhost ([127.0.0.1]:36635 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCNrp-0005nK-3J for submit@debbugs.gnu.org; Thu, 22 Jun 2023 13:13:09 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:39266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCNrn-0005mi-1d for 63986@debbugs.gnu.org; Thu, 22 Jun 2023 13:13:07 -0400 Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-3110e74bf3cso1700787f8f.1 for <63986@debbugs.gnu.org>; Thu, 22 Jun 2023 10:13:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687453981; x=1690045981; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=CCIvvJGyvYD1aXPcYmmZShvGhfoviO6cdJxb4jDJoOU=; b=e/Fq714yk9fF283IBlkGzrtK4CY8I1JxlhL40NVL+Nt1JD/Ntxxib+FWcv4CVCpxEC 2LEBMoRBmBxZQaVe2MZdqbeeVksEhlXQ8xs8gpYtTtOsoglXlK/Ch92+4lOwblBiOH3C 41i9liyeQv8rG4GlIa0wNozO4T1Zt9UF02ROJWPU0C+XSEmPdYS1fW7krcSR8KIRLiRi HnZjVpFRLWNDcV0486aVV6FgUMT70S1onyMKhfRe9abctSjOLz5udTL5qzLSw6XYlio1 GDlHG8SPsf5vaqpwM2Vkxwhw+7VYE89aDBrJ5hNqqHb6yoVvk7MJboUmeqXWAqtzDkZ7 Im3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687453981; x=1690045981; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CCIvvJGyvYD1aXPcYmmZShvGhfoviO6cdJxb4jDJoOU=; b=GOBfYt2YYjokPq1tliybihABQIPOOwlN+Akcq55BHJ14OxivfoTOFD67l9bScVs+Kv /AEAcusHWcx1d2CoN0FMsNPUql1vbGv9FFTYS48DhoT+MgkgV8YO4OUfMJMsvXUI+bCB nCz8692HY5GeVSDVYT+FahHqxCWDV1FhcOF+5vhfGOcswvXMHWVqP9/WRCrTTR7mJ7w6 Ep8rtMNPe/oXjyEWT6SMSMPC+wVjr3zcErJJBTlTGMqYErh/Ld78XxlzZhKzJNS1ruKB H7zQ+OJ3i2YnOEdp8AISgyz9BYTcCEmf+MTY2sU+IQYYQzNI64A8nih+0SixwrNmSuj4 BPqg== X-Gm-Message-State: AC+VfDwy7ypiz/BMd7ObbYY8vD60lveuowBv29HViXqOQwqAN46BVBzC Y5xlFEshwUB3lFOrJv3Mp74= X-Google-Smtp-Source: ACHHUZ65BF1smcs3xSnRLW+wBcCjoBo1SKBU2dUflls1HV+n1IGlGmOcFZbq+UGft4CfpfCZxRIW6g== X-Received: by 2002:adf:f682:0:b0:2e4:c9ac:c491 with SMTP id v2-20020adff682000000b002e4c9acc491mr14634305wrp.1.1687453981050; Thu, 22 Jun 2023 10:13:01 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id c11-20020a056000104b00b003063a92bbf5sm7568938wrx.70.2023.06.22.10.13.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 10:13:00 -0700 (PDT) From: Simon Tournier In-Reply-To: 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> <87h6qz8pg0.fsf@gmail.com> Date: Thu, 22 Jun 2023 19:12:36 +0200 Message-ID: <87cz1n8lq3.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1687454061; a=rsa-sha256; cv=none; b=BBhPsRKDFZktKyjLXcqxDeSNeT7oCftFmMvdjzz8V4MWkWTc/K7sE50MMWUhUAglpnub7o yVCxhmihtpEh9g9WWEJT74TYi8+PaECGLIzg5PRofUbznl7JFXzcYlN8vxEKRcXoEILstV I4gF+I+TEhgYonJUnNwzDMG64oHK0ksrn3d/h0hT7/J6ZZ3Rb3pbVP0xcW5S0TxV7DGgVe azZifUJe37HrzwW3wiWY5pnK+sHYsP3LTWiFbrRDFY44U5jNaUtDYHo5D8b9GhT29Ug8/8 WRISV46UWxaVSPfVJKbLlp0zBjTpOz6UBkc1gKGB5Q1K8KMomKdCzwI0Z7T/tw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b="e/Fq714y"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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=1687454061; 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=CCIvvJGyvYD1aXPcYmmZShvGhfoviO6cdJxb4jDJoOU=; b=Kcos9/bRJ5YRFfGzR9Wlh2gnY1eFk7qW8asaKVcFS5GoY+BVDsDPQmBQuTig1aeu2nXa/8 Zi3IkAyCIVMdtdEGG2DHAMRozBb/1jB1DkjgpnKUl+C3eZsy/BxXglDT9IL/at9AerKLj5 GTpDc/8dv8vg5SxwVWfOWfS9S4Zv8xVMO6vUEMjsUdyBa8Oe9gmD35X3dvD9gxO/OADDkn wAJE7t1+i61J+40v5EaSF2os440LJgSH8n//G4WYCDDE07sQzMrDJrg0DMQSXrs7BapseT WWY0ziG0Z5szy9r2j+nwuv5v+9zGZ2aRLP7Om2SZ10z2WWVuVejhn5F/lvBxYA== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b="e/Fq714y"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -1.15 X-Spam-Score: -1.15 X-Migadu-Queue-Id: 4DDF9F0C3 X-TUID: v6X7yZfxWHZ3 --=-=-= Content-Type: text/plain Hi, On Thu, 22 Jun 2023 at 19:25, Efraim Flashner 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. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v2-0001-gnu-julia-Conditionally-use-openblas-with-ILP64-s.patch Content-Description: p2.patch >From 9e1912148d4a691a5484fc7f87597b579ba61785 Mon Sep 17 00:00:00 2001 Message-Id: <9e1912148d4a691a5484fc7f87597b579ba61785.1687453627.git.zimon.toutoune@gmail.com> From: Simon Tournier Date: Thu, 22 Jun 2023 17:45:50 +0200 Subject: [PATCH v2] gnu: julia: Conditionally use openblas with ILP64 support. Fixes . Reported by Cayetano Santos . * 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 --=-=-= Content-Type: text/plain 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 --=-=-=--