From unknown Sat Jul 26 22:08:26 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#78954 <78954@debbugs.gnu.org> To: bug#78954 <78954@debbugs.gnu.org> Subject: Status: [PATCH] gnu: fenics: Fix build. Reply-To: bug#78954 <78954@debbugs.gnu.org> Date: Sun, 27 Jul 2025 05:08:26 +0000 retitle 78954 [PATCH] gnu: fenics: Fix build. reassign 78954 guix-patches submitter 78954 Paul Garlick severity 78954 normal tag 78954 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 04 08:34:47 2025 Received: (at submit) by debbugs.gnu.org; 4 Jul 2025 12:34:47 +0000 Received: from localhost ([127.0.0.1]:59085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uXfck-0007Sb-26 for submit@debbugs.gnu.org; Fri, 04 Jul 2025 08:34:47 -0400 Received: from lists.gnu.org ([2001:470:142::17]:50882) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uXfce-0007Ql-NL for submit@debbugs.gnu.org; Fri, 04 Jul 2025 08:34:35 -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 1uXfcW-0000vW-1Q for guix-patches@gnu.org; Fri, 04 Jul 2025 08:34:25 -0400 Received: from smtp.hosts.co.uk ([85.233.160.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uXfcQ-0004MN-Vj for guix-patches@gnu.org; Fri, 04 Jul 2025 08:34:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tourbillion-technology.com; s=2025040300; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:To:From:Reply-To:Content-Type:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=LbzIpTqNAuYPHV+/BRrEl/QoE+0geilXNU3khqD1cAo=; b=jXrYiwSJj6xqpCkAMDbM1VHHhy OJOs2cOqTQRvUxL/o9/r0hcXbiyJ8wxG47rH1WKLAxR23/+/jrKQOHGQ5j5i/vj3YsUmJhdXA8egx bXniYExQOKpkXncNSrx6n5G3kmrE4IuNn1DMKw5LvVa1zY1STFMUONvcNx+gDBnF/qf8=; Received: from maikeh336.claranet.co.uk ([79.123.23.187] helo=pumpernickel.tourbillion-technology.com) by smtp.hosts.co.uk with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim) (envelope-from ) id 1uXdNc-000000004O2-3AnI; Fri, 04 Jul 2025 11:10:53 +0100 From: Paul Garlick To: guix-patches@gnu.org Subject: [PATCH] gnu: fenics: Fix build. Date: Fri, 4 Jul 2025 11:10:21 +0100 Message-Id: <20250704101021.3534721-1-pgarlick@tourbillion-technology.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=85.233.160.19; envelope-from=pgarlick@tourbillion-technology.com; helo=smtp.hosts.co.uk X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.218, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit Cc: Paul Garlick X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/packages/simulation.scm (fenics): Run guix style, improve formatting. [arguments] : Remove test module references to expired numpy aliases in the 'pre-check' phase. Use '--deselect' instead of '--ignore' to skip a test in the 'check' phase. Add a FIXME note to enable reading and writing files in the binary HDF5 format. --- gnu/packages/simulation.scm | 196 ++++++++++++++++++------------------ 1 file changed, 99 insertions(+), 97 deletions(-) diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm index e6f86fb736..7d7668f117 100644 --- a/gnu/packages/simulation.scm +++ b/gnu/packages/simulation.scm @@ -917,108 +917,110 @@ (define-public fenics (list fenics-dolfin python-petsc4py python-slepc4py - - ;; 'dolfin/jit/jit.py' parses 'dolfin.pc' at run time. + ;; 'dolfin/jit/jit.py' parses 'dolfin.pc' at runtime. python-pkgconfig)) (arguments - (list #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'relax-requirements - (lambda _ - (substitute* "python/setup.py" - (("pybind11==") - "pybind11>=")))) - (add-after 'unpack 'set-dolfin-pc-file-name - (lambda* (#:key inputs #:allow-other-keys) - ;; Instead of cluttering the user's 'PKG_CONFIG_PATH' environment - ;; variable, hard-code the 'dolfin.pc' absolute file name. - (let ((pc-file (search-input-file inputs - "/lib/pkgconfig/dolfin.pc"))) - (substitute* "python/dolfin/jit/jit.py" - (("pkgconfig\\.parse\\(\"dolfin\"\\)") - (string-append "pkgconfig.parse(\"" pc-file - "\")")))))) - (add-after 'patch-source-shebangs 'set-paths - (lambda _ - ;; Define paths to store locations. - (setenv "PYBIND11_DIR" #$(this-package-input "pybind11")) - ;; Move to python sub-directory. - (chdir "python"))) - (add-after 'build 'mpi-setup - #$%openmpi-setup) - (add-before 'check 'pre-check - (lambda _ - ;; Exclude three tests that generate - ;; 'NotImplementedError' in matplotlib version 3.1.2. - ;; See - ;; . - ;; Also exclude tests that require meshes supplied by - ;; git-lfs. - (substitute* "demo/test.py" - (("(.*stem !.*)" line) - (string-append line - "\n" - "excludeList = [\n" - "'built-in-meshes', \n" - "'hyperelasticity', \n" - "'elasticity', \n" - "'multimesh-quadrature', \n" - "'multimesh-marking', \n" - "'mixed-poisson-sphere', \n" - "'mesh-quality', \n" - "'lift-drag', \n" - "'elastodynamics', \n" - "'dg-advection-diffusion', \n" - "'curl-curl', \n" - "'contact-vi-tao', \n" - "'contact-vi-snes', \n" - "'collision-detection', \n" - "'buckling-tao', \n" - "'auto-adaptive-navier-stokes', \n" - "'advection-diffusion', \n" - "'subdomains', \n" - "'stokes-taylor-hood', \n" - "'stokes-mini', \n" - "'navier-stokes', \n" - "'eigenvalue']\n" - "demos = [" - "d for d in demos if d[0].stem not in " - "excludeList]\n"))) - (setenv "HOME" - (getcwd)) - ;; Restrict OpenBLAS to MPI-only in preference to MPI+OpenMP. - (setenv "OPENBLAS_NUM_THREADS" "1"))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (with-directory-excursion "test" - (invoke "pytest" - "unit" - ;; The test test_snes_set_from_options() in the file - ;; unit/nls/test_PETScSNES_solver.py fails and is ignored. - "--ignore" - "unit/nls/test_PETScSNES_solver.py" - ;; Fails with a segfault. - "--ignore" - "unit/io/test_XDMF.py"))))) - (add-after 'install 'install-demo-files - (lambda* (#:key outputs #:allow-other-keys) - (let* ((demos (string-append (assoc-ref outputs "out") - "/share/python-dolfin/demo"))) - (mkdir-p demos) - (with-directory-excursion "demo" - (for-each (lambda (file) - (let* ((dir (dirname file)) - (tgt-dir (string-append - demos "/" dir))) - (unless (equal? "." dir) - (mkdir-p tgt-dir) - (install-file file tgt-dir)))) - (find-files "." ".*\\.(py|gz|xdmf)$"))))))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'relax-requirements + (lambda _ + (substitute* "python/setup.py" + (("pybind11==") "pybind11>=")))) + (add-after 'unpack 'set-dolfin-pc-file-name + (lambda* (#:key inputs #:allow-other-keys) + ;; Instead of cluttering the user's PKG_CONFIG_PATH environment + ;; variable, hard-code the 'dolfin.pc' absolute file name. + (let ((pc-file (search-input-file inputs + "/lib/pkgconfig/dolfin.pc"))) + (substitute* "python/dolfin/jit/jit.py" + (("pkgconfig\\.parse\\(\"dolfin\"\\)") + (string-append "pkgconfig.parse(\"" pc-file "\")")))))) + (add-after 'patch-source-shebangs 'set-paths + (lambda _ + ;; Define paths to store locations. + (setenv "PYBIND11_DIR" #$(this-package-input "pybind11")) + ;; Move to python sub-directory. + (chdir "python"))) + (add-after 'build 'mpi-setup + #$%openmpi-setup) + (add-before 'check 'pre-check + (lambda _ + ;; Exclude three tests that generate 'NotImplementedError' in + ;; matplotlib v3.1.2. See + ;; . + ;; Also exclude tests that require meshes supplied by git-lfs. + (substitute* "demo/test.py" + (("(.*stem !.*)" line) + (string-append line + "\n" + "excludeList = [\n" + "'built-in-meshes', \n" + "'hyperelasticity', \n" + "'elasticity', \n" + "'multimesh-quadrature', \n" + "'multimesh-marking', \n" + "'mixed-poisson-sphere', \n" + "'mesh-quality', \n" + "'lift-drag', \n" + "'elastodynamics', \n" + "'dg-advection-diffusion', \n" + "'curl-curl', \n" + "'contact-vi-tao', \n" + "'contact-vi-snes', \n" + "'collision-detection', \n" + "'buckling-tao', \n" + "'auto-adaptive-navier-stokes', \n" + "'advection-diffusion', \n" + "'subdomains', \n" + "'stokes-taylor-hood', \n" + "'stokes-mini', \n" + "'navier-stokes', \n" + "'eigenvalue']\n" + "demos = [" + "d for d in demos if d[0].stem not " + "in excludeList]\n"))) + ;; Do not test for expired numpy aliases. + (substitute* "test/unit/la/test_vector.py" + ((" numpy.float\\(42.0\\),") "") + (("^.*numpy.int\\(42.0\\).*$") "")) + (substitute* "test/unit/la/test_la_basic.py" + ((" int,") " ") + (("\\[int,") "[")) + (setenv "HOME" (getcwd)) + ;; Restrict OpenBLAS to MPI-only in preference to MPI+OpenMP. + (setenv "OPENBLAS_NUM_THREADS" "1"))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (with-directory-excursion "test" + (invoke "pytest" + "unit" + ;; This test fails and is ignored. + "--deselect" + "unit/nls/test_PETScSNES_solver.py::test_snes_set_from_options" + ;; FIXME: Tests with binary encoded hdf5 files fail with a + ;; segfault. See fenics-project DOLFIN commit 6fbc9fb. + "--ignore" + "unit/io/test_XDMF.py"))))) + (add-after 'install 'install-demo-files + (lambda* (#:key outputs #:allow-other-keys) + (let* ((demos (string-append (assoc-ref outputs "out") + "/share/python-dolfin/demo"))) + (mkdir-p demos) + (with-directory-excursion "demo" + (for-each (lambda (file) + (let* ((dir (dirname file)) + (tgt-dir (string-append demos + "/" dir))) + (unless (equal? "." dir) + (mkdir-p tgt-dir) + (install-file file tgt-dir)))) + (find-files "." ".*\\.(py|gz|xdmf)$"))))))))) (home-page "https://fenicsproject.org/") (synopsis "High-level environment for solving differential equations") (description - "@code{fenics} is a computing platform for solving general classes of + "@code{fenics} is a computing platform for solving general classes of problems that involve differential equations. @code{fenics} facilitates access to efficient methods for dealing with ordinary differential equations (ODEs) and partial differential equations (PDEs). Systems of -- 2.39.5 From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 05 10:46:42 2025 Received: (at 78954-done) by debbugs.gnu.org; 5 Jul 2025 14:46:42 +0000 Received: from localhost ([127.0.0.1]:45819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uY4A6-000355-0c for submit@debbugs.gnu.org; Sat, 05 Jul 2025 10:46:42 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:56268) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uY4A3-00034O-9r for 78954-done@debbugs.gnu.org; Sat, 05 Jul 2025 10:46:39 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 7EA2B210; Sat, 5 Jul 2025 16:46:31 +0200 (CEST) Authentication-Results: hera.aquilenet.fr; none X-Virus-Scanned: Debian amavis at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavis, port 10024) with ESMTP id PIT4N7BldtOW; Sat, 5 Jul 2025 16:46:30 +0200 (CEST) Received: from jurong (86.56.141.77.rev.sfr.net [77.141.56.86]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 5CDF2111; Sat, 5 Jul 2025 16:46:29 +0200 (CEST) Date: Sat, 5 Jul 2025 16:46:27 +0200 From: Andreas Enge To: Paul Garlick Subject: Re: [PATCH] gnu: fenics: Fix build. Message-ID: References: <20250704101021.3534721-1-pgarlick@tourbillion-technology.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250704101021.3534721-1-pgarlick@tourbillion-technology.com> X-Spamd-Result: default: False [-5.45 / 15.00]; NEURAL_HAM(-3.00)[-1.000]; BAYES_HAM(-2.85)[99.36%]; MID_RHS_NOT_FQDN(0.50)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[] X-Rspamd-Action: no action X-Rspamd-Queue-Id: 7EA2B210 X-Rspamd-Server: hera X-Spamd-Bar: ----- X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 78954-done Cc: 78954-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Thanks a lot for your detective work! I could build the package locally and have pushed to master. Andreas