From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id UKwAEmBFDGURfgEAG6o9tA:P1 (envelope-from ) for ; Thu, 21 Sep 2023 15:30:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id UKwAEmBFDGURfgEAG6o9tA (envelope-from ) for ; Thu, 21 Sep 2023 15:30:08 +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 1AABE5ADE2 for ; Thu, 21 Sep 2023 15:30:08 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=HE6gbWHv; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695303008; a=rsa-sha256; cv=none; b=IGJhbsUdeOurDS0xY4dMhb7QELg1PWLWT4Ev7K1XZ4c46n1vo37WNU2arokNqZBUY4Q8QP L+PzYo32pXy58E+dsAGrB4Q2TSXJZX3W4oJh8KNkGiDkUoyjjlbeBAYOG8MC3tfAL61cYT howocyLxbnRyIjHbNFOF1m0g6V+/n6L5N+W6N8L+n5YEYGudd3wb05j7WZ+TZJa5AwOzK8 hnzqmFo8ieiaJlUs2KTu+nBT/OcsaAtfChbevpHqN2ki2hIu77W/Tvj5AF+KCbq6oAY4+Q da0n2hkiewJCysRvKvJFP+jO9NfROYY3WqhSS3CRB+Dee529un/Zc6uJ58Zalw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695303008; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: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=1kYeGJVNIxO24+ZsCNk4HD/lnoIzWVllVDXvOl9QJis=; b=ioE5kHtDvM6fpLF5A2oDJK3vb6jSPnWcTznVu/Bpmf5jUavb7kTMdkCD3OfWetVi81mR/L DRibsInNJmFcX3IqSpMuYbOFX9lL3Au8T7ZiU0gNW5w20qn9x0aXqj5X05w599mdttdkp6 bsgZgTyWCKh7qAZZgpzK81z6vbOMt8d6firWj5ULKIA8PcVIRcTVvZyNukqZSdROYQxt95 6g78g4ZiOWGXwm3TmDGzcT6zme2aRc5A2qnLtvgaGHNT19Oz9CLy7/NkuUWZVs9mKt3hyQ cXpJPLnsGtznFdl5LpuPaSKL7+IoQ8DcEZmAsNJNy+GSg2vCPLL2mk6hoLiG4w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=HE6gbWHv; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjJki-00063f-B3; Thu, 21 Sep 2023 09:29:56 -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 1qjJkf-0005xs-Cv for guix-patches@gnu.org; Thu, 21 Sep 2023 09:29:53 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qjJkf-0006xW-4C for guix-patches@gnu.org; Thu, 21 Sep 2023 09:29:53 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qjJkp-0004xc-0N for guix-patches@gnu.org; Thu, 21 Sep 2023 09:30:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66129] [PATCH v2 12/20] gnu: Add suitesparse-cholmod. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 Sep 2023 13:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66129 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66129@debbugs.gnu.org Cc: David Elsing Received: via spool by 66129-submit@debbugs.gnu.org id=B66129.169530295918929 (code B ref 66129); Thu, 21 Sep 2023 13:30:02 +0000 Received: (at 66129) by debbugs.gnu.org; 21 Sep 2023 13:29:19 +0000 Received: from localhost ([127.0.0.1]:33082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjJk6-0004v8-JG for submit@debbugs.gnu.org; Thu, 21 Sep 2023 09:29:19 -0400 Received: from mout01.posteo.de ([185.67.36.65]:56509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjJjR-0004qL-Fm for 66129@debbugs.gnu.org; Thu, 21 Sep 2023 09:28:38 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id CC256240028 for <66129@debbugs.gnu.org>; Thu, 21 Sep 2023 15:28:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1695302901; bh=vhKRBp7cCnNzODctvszy1rbBiyZ6fJ1ElEDCaxSIp2w=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=HE6gbWHvIHQgYObCUvTZMMU8LIG7RFq2GPkesJjQyv6DpBjgbQA+FnRMxJc8mT9tL OKu66D5SsgfxTr2WI4j+jUqqaXbPXriiFVDzvmsjbptXJxLRC53DdWJxwLzts4u3wa X9w7vdxMR7iLdYAZHg5haQJzrmU/QbkHIbkAH74x3y+zB3bJjpN1Tb9yb3tTZmpYHL FYLOsJgIm2bDhBbCVYm/pcLFuI61hgeMe31uTwmwW31EHVd2vNhT08vJSJjU1a+/+y uVWx5o7XRoLFFj1sDuNlidLUOKtMMhZx122a/SfUZ2LnPmfarDGWFFJ5NVythTEguL G3OjInWT6lkuA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Rrx6s3Qhzz9s0Q; Thu, 21 Sep 2023 15:28:21 +0200 (CEST) From: David Elsing Date: Thu, 21 Sep 2023 13:27:47 +0000 Message-ID: <602387013ca27723533d224c90fbe1ee65ce913b.1695302719.git.david.elsing@posteo.net> In-Reply-To: <2e6dce4c1faecf1e5516f477a1b372da205573ba.1695302719.git.david.elsing@posteo.net> References: <2e6dce4c1faecf1e5516f477a1b372da205573ba.1695302719.git.david.elsing@posteo.net> MIME-Version: 1.0 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -3.80 X-Spam-Score: -3.80 X-Migadu-Queue-Id: 1AABE5ADE2 X-Migadu-Scanner: mx2.migadu.com X-TUID: 7aSwY2MVwEvT * gnu/packages/maths.scm (suitesparse-cholmod): New variable. --- gnu/packages/maths.scm | 82 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 3f80029414..271ae8137b 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -5289,6 +5289,88 @@ (define-public metis-suitesparse (string-append "-DGKLIB_PATH=" #$gklib-suitesparse))))) (inputs (list suitesparse-config gklib-suitesparse)))) +(define-public suitesparse-cholmod + (package + (name "suitesparse-cholmod") + (version "4.2.0") + (source (suitesparse-package-src name "CHOLMOD")) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'set-cmake-module-path + (lambda _ + (substitute* "CMakeLists.txt" + (("set.*CMAKE_MODULE_PATH.*") + (string-append + "set(CMAKE_MODULE_PATH " + (string-join + (map (lambda (path) + (string-append path "/lib/cmake/SuiteSparse")) + (list #$suitesparse-amd + #$suitesparse-camd + #$suitesparse-ccolamd + #$suitesparse-colamd + #$suitesparse-config))) + ")\nset(DUMMY\n")) + (("add_subdirectory.*GPU.*") "\n") + ((".*cmake_modules/FindCHOLMOD_CUDA.cmake.*") "\n")))) + (add-after 'unpack 'use-external-metis + (lambda _ + (let ((port (open-file "CMakeLists.txt" "a"))) + (display + (string-append + "find_library(METIS_LIBRARY NAME metis PATHS ENV LIBRARY_PATH) +get_filename_component(METIS_LIBRARY ${METIS_LIBRARY} REALPATH) +find_library(GKLIB_LIBRARY NAME GKlib PATHS ENV LIBRARY_PATH) +get_filename_component(GKLIB_LIBRARY ${GKLIB_LIBRARY} REALPATH) +target_link_libraries(CHOLMOD PRIVATE ${METIS_LIBRARY} ${GKLIB_LIBRARY}) +target_link_libraries(CHOLMOD_static PRIVATE ${METIS_LIBRARY} ${GKLIB_LIBRARY})") + port) + (close-port port)) + (delete-file "Partition/cholmod_metis_wrapper.c") + (delete-file "Partition/cholmod_metis_wrapper.h") + (substitute* "Partition/cholmod_metis.c" + (("#include \"cholmod_metis_wrapper\\.h\"") "") + (("#include \"SuiteSparse_metis/include/metis.h\"") + "#include ") + (("SuiteSparse_metis_METIS") "METIS")))) + (add-after 'build 'build-doc + (lambda _ + (with-directory-excursion "../source/Doc" + (invoke "make")))) + (add-after 'install 'install-doc + (lambda _ + (install-file "../source/Doc/CHOLMOD_UserGuide.pdf" + (string-append #$output "/share/doc/" + #$name "-" #$version)))) + (replace 'install-license-files + (lambda _ + (let ((out (string-append #$output + "/share/doc/" #$name "-" #$version))) + (install-file "../source/Doc/License.txt" out) + (install-file "../source/Core/lesser.txt" out) + (install-file "../source/MatrixOps/gpl.txt" out))))))) + (inputs + (list gklib-suitesparse + metis-suitesparse + openblas + suitesparse-amd + suitesparse-camd + suitesparse-ccolamd + suitesparse-colamd + suitesparse-config)) + (native-inputs (list (texlive-updmap.cfg '()))) + (home-page "https://people.engr.tamu.edu/davis/suitesparse.html") + (synopsis "Library for solving sparse symmetric positive definite linear +equations") + (description "CHOLMOD is a set of routins for factorizing sparse symmetrix +positive definite matrices, updating/downdating sparse Cholesky factorizations +and other related operations.") + (license (list license:gpl2+ license:lgpl2.1+)))) + (define-public suitesparse (package (name "suitesparse") -- 2.41.0