From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OpgjHyJsU2CPNwAA0tVLHw (envelope-from ) for ; Thu, 18 Mar 2021 15:05:06 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id AHWJGiJsU2BWUgAA1q6Kng (envelope-from ) for ; Thu, 18 Mar 2021 15:05:06 +0000 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 F06C62765E for ; Thu, 18 Mar 2021 16:05:05 +0100 (CET) Received: from localhost ([::1]:57658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMuCv-0007nh-2q for larch@yhetil.org; Thu, 18 Mar 2021 11:05:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMuBu-0007m6-FI for guix-patches@gnu.org; Thu, 18 Mar 2021 11:04:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36147) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lMuBu-0007Pk-70 for guix-patches@gnu.org; Thu, 18 Mar 2021 11:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lMuBu-0000LE-1T for guix-patches@gnu.org; Thu, 18 Mar 2021 11:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47237] [PATCH] gnu: metis: Use 64-bit floating pointer numbers on 64-bit architectures. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 18 Mar 2021 15:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47237 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47237@debbugs.gnu.org Cc: Emmanuel Agullo , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Eric Bavier , Paul Garlick X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16160797961238 (code B ref -1); Thu, 18 Mar 2021 15:04:01 +0000 Received: (at submit) by debbugs.gnu.org; 18 Mar 2021 15:03:16 +0000 Received: from localhost ([127.0.0.1]:47690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMuB3-0000Jo-V6 for submit@debbugs.gnu.org; Thu, 18 Mar 2021 11:03:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:56674) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMuB2-0000Jg-1F for submit@debbugs.gnu.org; Thu, 18 Mar 2021 11:03:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMuB0-0006Zv-Co for guix-patches@gnu.org; Thu, 18 Mar 2021 11:03:07 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56760) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMuAu-0006lT-9N; Thu, 18 Mar 2021 11:03:02 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53470 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lMuAt-0006u1-QE; Thu, 18 Mar 2021 11:03:00 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Thu, 18 Mar 2021 16:02:46 +0100 Message-Id: <20210318150246.7220-1-ludo@gnu.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616079906; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=SM8Aghq/p2bRDEvkBLX6LVIM/Dt1na5WKiHvB1MN9SI=; b=XpQzQWsXu8siRFGIRWINJ2Gp3QV5/GsGWQIYCwEdJRg2iZN1uwluq+gwzz2A4URSGqVgDF jyBG5LHRAzjEl1KKOP1ntlGILsXgs5IhetzLPRnVsAVzuxeXjbzPaDpAiAC+jg/Px4KUjQ OKLJQ9vDKNnuy0PQjDEVhOtzY8bbyNYyP3ecaKoM8J49v9GVsdY7rq0/ckocEVwrWoKhY9 r96XiM06JZxa7BvDo08EnFZrzea84VQVdDoba+Su88YxZjrBO51Y+1zDaoMf19qzqMoikZ aJfV/7r/H6Xte8PdHDkRzUTLqnBksewC5hTiYp3HVd5nTUTQFEp0sym05CNi2A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616079906; a=rsa-sha256; cv=none; b=WMq7hXK9Hd9bQhl4qLe2/J/QsFq8qUO5xZI084IS27Tnk/TZvwOXyFg1MYLroHI2NSnFFv ZLAH8ZXCYn0zKSkfBkWiXm1XJzLKgw+LI3gpGg8elNjpY6OXn+n98mAwjQRLDAAC6MwALT 67QfWAHsv6VW9HVotpf0gdbamLIlnbNMqVYu9GEPZe7T3iGR10dPnkrjh0ohEfgJsBnEgu CRNIu1pkTPVmRSxeEjTeYF3z6+S6auCIvxPbpayg9sb9UQfmQ7CMkBFQx6dZI3uiFW5S6B VbploIt2DlDRJ1J7aDEqv1WuE58K4Ac4zPoW11roQ4/4GEuJx6JLiszZfp2ahA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.91 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: F06C62765E X-Spam-Score: -1.91 X-Migadu-Scanner: scn0.migadu.com X-TUID: dX30tQtwYqpv From: Ludovic Courtès * gnu/packages/maths.scm (metis)[arguments]: Add #:modules and #:phases. --- gnu/packages/maths.scm | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) Hi! Metis defaults to 32-bit floating point numbers. However, on 64-bit platforms, users probably expect 64-bit floating point numbers, hence this patch. We could make it configurable through different variants or via package parameters when they’re available, but I wonder about the usefulness of a variant that uses 32-bit floats on 64-bit architectures. Can we keep just this one variant? Thanks, Ludo’. diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 565f109f47..4cd9112be9 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -12,7 +12,7 @@ ;;; Copyright © 2015 Fabian Harfert ;;; Copyright © 2016 Roel Janssen ;;; Copyright © 2016, 2018, 2020 Kei Kebreau -;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2016 Leo Famulari ;;; Copyright © 2016, 2017 Thomas Danckaert ;;; Copyright © 2017, 2018, 2019, 2020 Paul Garlick @@ -3312,7 +3312,26 @@ YACC = bison -pscotchyy -y -b y `(#:tests? #f ;no tests #:configure-flags `("-DSHARED=ON" ,(string-append "-DGKLIB_PATH=" (getcwd) - "/metis-" ,version "/GKlib")))) + "/metis-" ,version "/GKlib")) + + #:modules ((system base target) + (guix build cmake-build-system) + (guix build utils)) + #:phases (modify-phases %standard-phases + (add-after 'unpack 'set-real-type-width + (lambda* (#:key build target #:allow-other-keys) + ;; Enable 64-bit floating point numbers on 64-bit + ;; architectures. Leave the default 32-bit width on + ;; other architectures. + (let ((word-size + (with-target (or target build %host-type) + (lambda () + (target-word-size))))) + (when (= 8 word-size) + (display "setting REALTYPEWIDTH to 64...\n") + (substitute* "include/metis.h" + (("define REALTYPEWIDTH.*$") + "define REALTYPEWIDTH 64\n"))))))))) (home-page "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview") (synopsis "Graph partitioning and fill-reducing matrix ordering library") (description -- 2.30.2