From unknown Sat Jul 26 22:09:07 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78878] [PATCH] gnu:fenics-dolfin: Fix build with hdf5@1.14. Resent-From: Paul Garlick Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 23 Jun 2025 17:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 78878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78878@debbugs.gnu.org Cc: Paul Garlick X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.175069801011793 (code B ref -1); Mon, 23 Jun 2025 17:01:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Jun 2025 17:00:10 +0000 Received: from localhost ([127.0.0.1]:56843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uTkWa-00033L-B5 for submit@debbugs.gnu.org; Mon, 23 Jun 2025 13:00:09 -0400 Received: from lists.gnu.org ([2001:470:142::17]:58950) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uTkWV-00031T-3B for submit@debbugs.gnu.org; Mon, 23 Jun 2025 13:00:03 -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 1uTkWM-0005oq-4Y for guix-patches@gnu.org; Mon, 23 Jun 2025 12:59:50 -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 1uTkWJ-0000TR-7I for guix-patches@gnu.org; Mon, 23 Jun 2025 12:59:49 -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=+EnXwMDqZxFOsck2q2NRrG/DomlvaciMZ5bPxErgrk0=; b=0FL20hZPjWBkQJcmHjRnlq3R9G OIM1k2gZwcxLqpnq2pifkgP8hBVmr8oobYIutxVlJF7l1U16AmJWvEwZKRlXfNnKILQOieBGcfVhZ xUROPDKh50DiHs5ytmI5JOq5Hh81eAw/zMOrcuJh5QltpDymAPlb59avoarzlQM0qugg=; 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 1uTkWC-000000000Vb-8PRV; Mon, 23 Jun 2025 17:59:41 +0100 From: Paul Garlick Date: Mon, 23 Jun 2025 17:58:49 +0100 Message-Id: <20250623165849.3076997-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: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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-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/patches/fenics-dolfin-hdf5-version-check.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/simulation.scm (fenics-dolfin)[source]: Use it. --- gnu/local.mk | 1 + .../fenics-dolfin-hdf5-version-check.patch | 26 ++ gnu/packages/simulation.scm | 270 +++++++++--------- 3 files changed, 158 insertions(+), 139 deletions(-) create mode 100644 gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch diff --git a/gnu/local.mk b/gnu/local.mk index c569c327a9..d3a2c81bd7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1288,6 +1288,7 @@ dist_patch_DATA = \ %D%/packages/patches/fenics-dolfin-demo-init.patch \ %D%/packages/patches/fenics-dolfin-boost.patch \ %D%/packages/patches/fenics-dolfin-config-slepc.patch \ + %D%/packages/patches/fenics-dolfin-hdf5-version-check.patch \ %D%/packages/patches/ffmpeg-jami-change-RTCP-ratio.patch \ %D%/packages/patches/ffmpeg-jami-rtp_ext_abs_send_time.patch \ %D%/packages/patches/ffmpeg-jami-libopusdec-enable-FEC.patch \ diff --git a/gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch b/gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch new file mode 100644 index 0000000000..6128ed5b3c --- /dev/null +++ b/gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch @@ -0,0 +1,26 @@ +This patch checks the HDF5 API version before selecting the appropriate H5O +function. A new function name and an extra argument are required for v1.12 +and above. + +See for the Technical Notes. + +See for the upstream fix. + +--- a/dolfin/io/HDF5Interface.cpp ++++ b/dolfin/io/HDF5Interface.cpp +@@ -282,8 +282,13 @@ + } + + H5O_info_t object_info; +- H5Oget_info_by_name(hdf5_file_handle, group_name.c_str(), &object_info, +- lapl_id); ++ #if H5_VERSION_GE(1, 12, 0) ++ H5Oget_info_by_name3(hdf5_file_handle, group_name.c_str(), &object_info, ++ H5O_INFO_BASIC, lapl_id); ++ #else ++ H5Oget_info_by_name(hdf5_file_handle, group_name.c_str(), &object_info, ++ lapl_id); ++ #endif + + // Close link access properties + status = H5Pclose(lapl_id); diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm index ebfe477265..451e305fc8 100644 --- a/gnu/packages/simulation.scm +++ b/gnu/packages/simulation.scm @@ -744,143 +744,137 @@ (define-public fenics-dolfin (name "fenics-dolfin") (version "2019.1.0.post0") (source - (origin - (method url-fetch) - (uri (string-append - "https://bitbucket.org/fenics-project/dolfin/get/" - version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1m91hwcq5gfj4qqswp8l8kj58nia48f0n4kq13w0xqj4biq7rla0")) - (patches (search-patches "fenics-dolfin-algorithm.patch" - "fenics-dolfin-demo-init.patch" - "fenics-dolfin-boost.patch" - "fenics-dolfin-config-slepc.patch")) - (modules '((guix build utils))) - (snippet - '(begin - ;; Make sure we don't use the bundled test framework. - (delete-file-recursively "test/unit/cpp/catch") - (substitute* "test/unit/cpp/main.cpp" - ;; Use standard search paths for 'catch' header file. - (("#include.*") - "#include \n")) - (substitute* "test/unit/cpp/CMakeLists.txt" - ;; Specify directory to find the header file. - (("(^set\\(CATCH_INCLUDE_DIR ).*(/catch\\))" _ front back) - (string-append front - "$ENV{CATCH_DIR}/include" back "\n"))))))) + (origin + (method url-fetch) + (uri (string-append "https://bitbucket.org/fenics-project/dolfin/get/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1m91hwcq5gfj4qqswp8l8kj58nia48f0n4kq13w0xqj4biq7rla0")) + (patches (search-patches "fenics-dolfin-algorithm.patch" + "fenics-dolfin-demo-init.patch" + "fenics-dolfin-boost.patch" + "fenics-dolfin-config-slepc.patch" + "fenics-dolfin-hdf5-version-check.patch")) + (modules '((guix build utils))) + (snippet '(begin + ;; Make sure we don't use the bundled test framework. + (delete-file-recursively "test/unit/cpp/catch") + (substitute* "test/unit/cpp/main.cpp" + ;; Use standard search paths for 'catch' header file. + (("#include.*") + "#include \n")) + (substitute* "test/unit/cpp/CMakeLists.txt" + ;; Specify directory to find the header file. + (("(^set\\(CATCH_INCLUDE_DIR ).*(/catch\\))" _ front back) + (string-append front "$ENV{CATCH_DIR}/include" back "\n"))))))) (build-system cmake-build-system) - (inputs - (list openblas - boost - eigen - hdf5-parallel-openmpi - libxml2 - openmpi - python-3 - pt-scotch32 - suitesparse - sundials-openmpi - zlib)) - (native-inputs - (list catch-framework pkg-config)) - (propagated-inputs - (list python-fenics-ffc petsc-openmpi slepc-openmpi)) + (inputs (list openblas + boost + eigen + hdf5-parallel-openmpi + libxml2 + openmpi + python-3 + pt-scotch32 + suitesparse + sundials-openmpi + zlib)) + (native-inputs (list catch-framework pkg-config)) + (propagated-inputs (list python-fenics-ffc petsc-openmpi slepc-openmpi)) (arguments - (list #:configure-flags #~`("-DDOLFIN_ENABLE_DOCS:BOOL=OFF" - "-DDOLFIN_ENABLE_HDF5:BOOL=ON" - "-DDOLFIN_ENABLE_MPI:BOOL=ON" - "-DDOLFIN_ENABLE_PARMETIS:BOOL=OFF" - "-DDOLFIN_ENABLE_SCOTCH:BOOL=ON" - "-DDOLFIN_ENABLE_SUNDIALS:BOOL=ON" - "-DDOLFIN_ENABLE_TRILINOS:BOOL=OFF") - #:phases - #~(modify-phases %standard-phases - (add-after 'patch-usr-bin-file 'mpi-setup - #$%openmpi-setup) - (add-after 'patch-source-shebangs 'set-paths - (lambda _ - ;; Define paths to store locations. - (setenv "BLAS_DIR" - #$(this-package-input "openblas")) - (setenv "CATCH_DIR" - #$(this-package-input "catch")) - (setenv "LAPACK_DIR" - #$(this-package-input "openblas")) - (setenv "PETSC_DIR" - #$(this-package-input "petsc")) - (setenv "SLEPC_DIR" - #$(this-package-input "slepc")) - (setenv "SCOTCH_DIR" - #$(this-package-input "scotch")) - (setenv "SUNDIALS_DIR" - #$(this-package-input "sundials")) - (setenv "UMFPACK_DIR" - #$(this-package-input "suitesparse")))) - (add-before 'check 'pre-check - (lambda _ - ;; The Dolfin repository uses git-lfs, whereby web links are - ;; substituted for large files. Guix does not currently support - ;; git-lfs, so only the links are downloaded. The tests that - ;; require the absent meshes cannot run and are skipped. - ;; - ;; One serial test fails and is skipped. - ;; i) demo_multimesh-stokes_serial: - ;; Warning: Found no facets matching domain for boundary - ;; condition. - ;; - ;; One mpi test fails and is skipped. - ;; i) demo_stokes-iterative_mpi: - ;; The MPI_Comm_rank() function was called before MPI_INIT was - ;; invoked - (call-with-output-file "CTestCustom.cmake" - (lambda (port) - (display (string-append - "set(CTEST_CUSTOM_TESTS_IGNORE " - "demo_bcs_serial " - "demo_bcs_mpi " - "demo_eigenvalue_serial " - "demo_eigenvalue_mpi " - "demo_navier-stokes_serial " - "demo_navier-stokes_mpi " - "demo_stokes-taylor-hood_serial " - "demo_stokes-taylor-hood_mpi " - "demo_subdomains_serial " - "demo_advection-diffusion_serial " - "demo_advection-diffusion_mpi " - "demo_auto-adaptive-navier-stokes_serial " - "demo_contact-vi-snes_serial " - "demo_contact-vi-snes_mpi " - "demo_contact-vi-tao_serial " - "demo_contact-vi-tao_mpi " - "demo_curl-curl_serial " - "demo_curl-curl_mpi " - "demo_dg-advection-diffusion_serial " - "demo_dg-advection-diffusion_mpi " - "demo_elasticity_serial " - "demo_elasticity_mpi " - "demo_elastodynamics_serial " - "demo_elastodynamics_mpi " - "demo_lift-drag_serial " - "demo_lift-drag_mpi " - "demo_mesh-quality_serial " - "demo_mesh-quality_mpi " - "demo_multimesh-stokes_serial " - ")\n") port))))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "make" "unittests") - (invoke "make" "demos") - (invoke "ctest" "-R" "unittests") - (invoke "ctest" "-R" "demo" "-R" "serial") - (invoke "ctest" "-R" "demo" "-R" "mpi"))))))) + (list + #:configure-flags + #~`("-DDOLFIN_ENABLE_DOCS:BOOL=OFF" "-DDOLFIN_ENABLE_HDF5:BOOL=ON" + "-DDOLFIN_ENABLE_MPI:BOOL=ON" + "-DDOLFIN_ENABLE_PARMETIS:BOOL=OFF" + "-DDOLFIN_ENABLE_SCOTCH:BOOL=ON" + "-DDOLFIN_ENABLE_SUNDIALS:BOOL=ON" + "-DDOLFIN_ENABLE_TRILINOS:BOOL=OFF") + #:phases + #~(modify-phases %standard-phases + (add-after 'patch-usr-bin-file 'mpi-setup + #$%openmpi-setup) + (add-after 'patch-source-shebangs 'set-paths + (lambda _ + ;; Define paths to store locations. + (setenv "BLAS_DIR" + #$(this-package-input "openblas")) + (setenv "CATCH_DIR" + #$(this-package-input "catch")) + (setenv "LAPACK_DIR" + #$(this-package-input "openblas")) + (setenv "PETSC_DIR" + #$(this-package-input "petsc")) + (setenv "SLEPC_DIR" + #$(this-package-input "slepc")) + (setenv "SCOTCH_DIR" + #$(this-package-input "scotch")) + (setenv "SUNDIALS_DIR" + #$(this-package-input "sundials")) + (setenv "UMFPACK_DIR" + #$(this-package-input "suitesparse")))) + (add-before 'check 'pre-check + (lambda _ + ;; The Dolfin repository uses git-lfs, whereby web links are + ;; substituted for large files. Guix does not currently support + ;; git-lfs, so only the links are downloaded. The tests that + ;; require the absent meshes cannot run and are skipped. + ;; + ;; One serial test fails and is skipped. + ;; i) demo_multimesh-stokes_serial: + ;; Warning: Found no facets matching domain for boundary + ;; condition. + ;; + ;; One mpi test fails and is skipped. + ;; i) demo_stokes-iterative_mpi: + ;; The MPI_Comm_rank() function was called before MPI_INIT was + ;; invoked + (call-with-output-file "CTestCustom.cmake" + (lambda (port) + (display (string-append "set(CTEST_CUSTOM_TESTS_IGNORE " + "demo_bcs_serial " + "demo_bcs_mpi " + "demo_eigenvalue_serial " + "demo_eigenvalue_mpi " + "demo_navier-stokes_serial " + "demo_navier-stokes_mpi " + "demo_stokes-taylor-hood_serial " + "demo_stokes-taylor-hood_mpi " + "demo_subdomains_serial " + "demo_advection-diffusion_serial " + "demo_advection-diffusion_mpi " + "demo_auto-adaptive-navier-stokes_serial " + "demo_contact-vi-snes_serial " + "demo_contact-vi-snes_mpi " + "demo_contact-vi-tao_serial " + "demo_contact-vi-tao_mpi " + "demo_curl-curl_serial " + "demo_curl-curl_mpi " + "demo_dg-advection-diffusion_serial " + "demo_dg-advection-diffusion_mpi " + "demo_elasticity_serial " + "demo_elasticity_mpi " + "demo_elastodynamics_serial " + "demo_elastodynamics_mpi " + "demo_lift-drag_serial " + "demo_lift-drag_mpi " + "demo_mesh-quality_serial " + "demo_mesh-quality_mpi " + "demo_multimesh-stokes_serial " + ")\n") port))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "make" "unittests") + (invoke "make" "demos") + (invoke "ctest" "-R" "unittests") + (invoke "ctest" "-R" "demo" "-R" "serial") + (invoke "ctest" "-R" "demo" "-R" "mpi"))))))) (home-page "https://bitbucket.org/fenics-project/dolfin/") (synopsis "Problem solving environment for differential equations") (description - "DOLFIN is a computational framework for finding numerical + "DOLFIN is a computational framework for finding numerical solutions to problems described by differential equations. Numerical models in DOLFIN are constructed using general families of finite elements. Data structures are provided for discretizing the governing @@ -896,17 +890,15 @@ (define-public fenics-dolfin ;; following exceptions: ;; ;; public-domain: dolfin/geometry/predicates.cpp - ;; dolfin/geometry/predicates.h + ;; dolfin/geometry/predicates.h ;; ;; zlib: dolfin/io/base64.cpp - ;; dolfin/io/base64.h + ;; dolfin/io/base64.h ;; ;; expat: dolfin/io/pugiconfig.hpp - ;; dolfin/io/pugixml.cpp - ;; dolfin/io/pugixml.hpp - (license (list license:public-domain - license:zlib - license:expat + ;; dolfin/io/pugixml.cpp + ;; dolfin/io/pugixml.hpp + (license (list license:public-domain license:zlib license:expat license:lgpl3+)))) (define-public fenics -- 2.39.5 From unknown Sat Jul 26 22:09:07 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78878] [PATCH] gnu:fenics-dolfin: Fix build with hdf5@1.14. Resent-From: Andreas Enge Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 25 Jun 2025 19:37:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Paul Garlick Cc: 78878@debbugs.gnu.org Received: via spool by 78878-submit@debbugs.gnu.org id=B78878.17508802024029 (code B ref 78878); Wed, 25 Jun 2025 19:37:03 +0000 Received: (at 78878) by debbugs.gnu.org; 25 Jun 2025 19:36:42 +0000 Received: from localhost ([127.0.0.1]:39533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uUVvG-00012s-1k for submit@debbugs.gnu.org; Wed, 25 Jun 2025 15:36:42 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:53794) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uUVvD-00011P-9J for 78878@debbugs.gnu.org; Wed, 25 Jun 2025 15:36:40 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id B384AC10; Wed, 25 Jun 2025 21:36:32 +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 4PUAwmR-6AFQ; Wed, 25 Jun 2025 21:36:32 +0200 (CEST) Received: from jurong (arrious.as207910.net [45.67.83.248]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 90F0BB4; Wed, 25 Jun 2025 21:36:31 +0200 (CEST) Date: Wed, 25 Jun 2025 21:36:28 +0200 From: Andreas Enge Message-ID: References: <20250623165849.3076997-1-pgarlick@tourbillion-technology.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250623165849.3076997-1-pgarlick@tourbillion-technology.com> X-Rspamd-Server: hera X-Rspamd-Queue-Id: B384AC10 X-Spamd-Result: default: False [-5.60 / 15.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM(-3.00)[-1.000]; 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-Spamd-Bar: ----- X-Spam-Score: 0.0 (/) 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: -1.0 (-) Hello Paul, thanks a lot for this patch! It looks generally good, but I get one test failure on my own machine: Start 26: demo_stokes-iterative_mpi 13/38 Test #26: demo_stokes-iterative_mpi ..............***Failed 142.07 sec ... 97% tests passed, 1 tests failed out of 38 Total Test time (real) = 1215.38 sec The following tests FAILED: 26 - demo_stokes-iterative_mpi (Failed) Errors while running CTest It has not yet been built on QA. Andreas From unknown Sat Jul 26 22:09:07 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78878] [PATCH v2] gnu:fenics-dolfin: Fix build with hdf5@1.14. References: <20250623165849.3076997-1-pgarlick@tourbillion-technology.com> In-Reply-To: <20250623165849.3076997-1-pgarlick@tourbillion-technology.com> Resent-From: Paul Garlick Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 27 Jun 2025 18:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: andreas@enge.fr, 78878@debbugs.gnu.org Cc: Paul Garlick Received: via spool by 78878-submit@debbugs.gnu.org id=B78878.175104754830254 (code B ref 78878); Fri, 27 Jun 2025 18:06:02 +0000 Received: (at 78878) by debbugs.gnu.org; 27 Jun 2025 18:05:48 +0000 Received: from localhost ([127.0.0.1]:40681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uVDSL-0007rZ-0f for submit@debbugs.gnu.org; Fri, 27 Jun 2025 14:05:47 -0400 Received: from smtp.hosts.co.uk ([85.233.160.19]:65265) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uVDSH-0007qV-8g for 78878@debbugs.gnu.org; Fri, 27 Jun 2025 14:05:43 -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=+rAkVMKh85BwQ1YqX1PR4Qp2x2GL//vnlxncNJDiZpc=; b=mS9AwSaTiQ2FG7KgflEUT0fw4m Vz1zyk+VKG6kIt2R7S6IjXeiijBK+7k8nLnRr+dp2kAYLH4HjesA6kGvTQBBmWyyzySwU8cuHXxSS 7F2S4jFy91Ey8KqvMTzagVQZfzkyQS1iGskDUIXvjJmzb56b5ytDlUdYwfdcEdR/3fQA=; 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 1uVDS9-00000000Acg-2ukZ; Fri, 27 Jun 2025 19:05:34 +0100 From: Paul Garlick Date: Fri, 27 Jun 2025 19:04:29 +0100 Message-Id: <20250627180429.3221612-1-pgarlick@tourbillion-technology.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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: -1.7 (-) * gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register new patch. * gnu/packages/simulation.scm (fenics-dolfin): Run guix style. [source]: Use new patch. [arguments] : Update 'pre-check' comment. Add 'demo_stokes-iterative_mpi' test to list of skipped tests. --- gnu/local.mk | 1 + .../fenics-dolfin-hdf5-version-check.patch | 26 ++ gnu/packages/simulation.scm | 271 +++++++++--------- 3 files changed, 159 insertions(+), 139 deletions(-) create mode 100644 gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch diff --git a/gnu/local.mk b/gnu/local.mk index c569c327a9..d3a2c81bd7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1288,6 +1288,7 @@ dist_patch_DATA = \ %D%/packages/patches/fenics-dolfin-demo-init.patch \ %D%/packages/patches/fenics-dolfin-boost.patch \ %D%/packages/patches/fenics-dolfin-config-slepc.patch \ + %D%/packages/patches/fenics-dolfin-hdf5-version-check.patch \ %D%/packages/patches/ffmpeg-jami-change-RTCP-ratio.patch \ %D%/packages/patches/ffmpeg-jami-rtp_ext_abs_send_time.patch \ %D%/packages/patches/ffmpeg-jami-libopusdec-enable-FEC.patch \ diff --git a/gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch b/gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch new file mode 100644 index 0000000000..6128ed5b3c --- /dev/null +++ b/gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch @@ -0,0 +1,26 @@ +This patch checks the HDF5 API version before selecting the appropriate H5O +function. A new function name and an extra argument are required for v1.12 +and above. + +See for the Technical Notes. + +See for the upstream fix. + +--- a/dolfin/io/HDF5Interface.cpp ++++ b/dolfin/io/HDF5Interface.cpp +@@ -282,8 +282,13 @@ + } + + H5O_info_t object_info; +- H5Oget_info_by_name(hdf5_file_handle, group_name.c_str(), &object_info, +- lapl_id); ++ #if H5_VERSION_GE(1, 12, 0) ++ H5Oget_info_by_name3(hdf5_file_handle, group_name.c_str(), &object_info, ++ H5O_INFO_BASIC, lapl_id); ++ #else ++ H5Oget_info_by_name(hdf5_file_handle, group_name.c_str(), &object_info, ++ lapl_id); ++ #endif + + // Close link access properties + status = H5Pclose(lapl_id); diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm index ebfe477265..e6f86fb736 100644 --- a/gnu/packages/simulation.scm +++ b/gnu/packages/simulation.scm @@ -744,143 +744,138 @@ (define-public fenics-dolfin (name "fenics-dolfin") (version "2019.1.0.post0") (source - (origin - (method url-fetch) - (uri (string-append - "https://bitbucket.org/fenics-project/dolfin/get/" - version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1m91hwcq5gfj4qqswp8l8kj58nia48f0n4kq13w0xqj4biq7rla0")) - (patches (search-patches "fenics-dolfin-algorithm.patch" - "fenics-dolfin-demo-init.patch" - "fenics-dolfin-boost.patch" - "fenics-dolfin-config-slepc.patch")) - (modules '((guix build utils))) - (snippet - '(begin - ;; Make sure we don't use the bundled test framework. - (delete-file-recursively "test/unit/cpp/catch") - (substitute* "test/unit/cpp/main.cpp" - ;; Use standard search paths for 'catch' header file. - (("#include.*") - "#include \n")) - (substitute* "test/unit/cpp/CMakeLists.txt" - ;; Specify directory to find the header file. - (("(^set\\(CATCH_INCLUDE_DIR ).*(/catch\\))" _ front back) - (string-append front - "$ENV{CATCH_DIR}/include" back "\n"))))))) + (origin + (method url-fetch) + (uri (string-append "https://bitbucket.org/fenics-project/dolfin/get/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1m91hwcq5gfj4qqswp8l8kj58nia48f0n4kq13w0xqj4biq7rla0")) + (patches (search-patches "fenics-dolfin-algorithm.patch" + "fenics-dolfin-demo-init.patch" + "fenics-dolfin-boost.patch" + "fenics-dolfin-config-slepc.patch" + "fenics-dolfin-hdf5-version-check.patch")) + (modules '((guix build utils))) + (snippet '(begin + ;; Make sure we don't use the bundled test framework. + (delete-file-recursively "test/unit/cpp/catch") + (substitute* "test/unit/cpp/main.cpp" + ;; Use standard search paths for 'catch' header file. + (("#include.*") + "#include \n")) + (substitute* "test/unit/cpp/CMakeLists.txt" + ;; Specify directory to find the header file. + (("(^set\\(CATCH_INCLUDE_DIR ).*(/catch\\))" _ front back) + (string-append front "$ENV{CATCH_DIR}/include" back "\n"))))))) (build-system cmake-build-system) - (inputs - (list openblas - boost - eigen - hdf5-parallel-openmpi - libxml2 - openmpi - python-3 - pt-scotch32 - suitesparse - sundials-openmpi - zlib)) - (native-inputs - (list catch-framework pkg-config)) - (propagated-inputs - (list python-fenics-ffc petsc-openmpi slepc-openmpi)) + (inputs (list openblas + boost + eigen + hdf5-parallel-openmpi + libxml2 + openmpi + python-3 + pt-scotch32 + suitesparse + sundials-openmpi + zlib)) + (native-inputs (list catch-framework pkg-config)) + (propagated-inputs (list python-fenics-ffc petsc-openmpi slepc-openmpi)) (arguments - (list #:configure-flags #~`("-DDOLFIN_ENABLE_DOCS:BOOL=OFF" - "-DDOLFIN_ENABLE_HDF5:BOOL=ON" - "-DDOLFIN_ENABLE_MPI:BOOL=ON" - "-DDOLFIN_ENABLE_PARMETIS:BOOL=OFF" - "-DDOLFIN_ENABLE_SCOTCH:BOOL=ON" - "-DDOLFIN_ENABLE_SUNDIALS:BOOL=ON" - "-DDOLFIN_ENABLE_TRILINOS:BOOL=OFF") - #:phases - #~(modify-phases %standard-phases - (add-after 'patch-usr-bin-file 'mpi-setup - #$%openmpi-setup) - (add-after 'patch-source-shebangs 'set-paths - (lambda _ - ;; Define paths to store locations. - (setenv "BLAS_DIR" - #$(this-package-input "openblas")) - (setenv "CATCH_DIR" - #$(this-package-input "catch")) - (setenv "LAPACK_DIR" - #$(this-package-input "openblas")) - (setenv "PETSC_DIR" - #$(this-package-input "petsc")) - (setenv "SLEPC_DIR" - #$(this-package-input "slepc")) - (setenv "SCOTCH_DIR" - #$(this-package-input "scotch")) - (setenv "SUNDIALS_DIR" - #$(this-package-input "sundials")) - (setenv "UMFPACK_DIR" - #$(this-package-input "suitesparse")))) - (add-before 'check 'pre-check - (lambda _ - ;; The Dolfin repository uses git-lfs, whereby web links are - ;; substituted for large files. Guix does not currently support - ;; git-lfs, so only the links are downloaded. The tests that - ;; require the absent meshes cannot run and are skipped. - ;; - ;; One serial test fails and is skipped. - ;; i) demo_multimesh-stokes_serial: - ;; Warning: Found no facets matching domain for boundary - ;; condition. - ;; - ;; One mpi test fails and is skipped. - ;; i) demo_stokes-iterative_mpi: - ;; The MPI_Comm_rank() function was called before MPI_INIT was - ;; invoked - (call-with-output-file "CTestCustom.cmake" - (lambda (port) - (display (string-append - "set(CTEST_CUSTOM_TESTS_IGNORE " - "demo_bcs_serial " - "demo_bcs_mpi " - "demo_eigenvalue_serial " - "demo_eigenvalue_mpi " - "demo_navier-stokes_serial " - "demo_navier-stokes_mpi " - "demo_stokes-taylor-hood_serial " - "demo_stokes-taylor-hood_mpi " - "demo_subdomains_serial " - "demo_advection-diffusion_serial " - "demo_advection-diffusion_mpi " - "demo_auto-adaptive-navier-stokes_serial " - "demo_contact-vi-snes_serial " - "demo_contact-vi-snes_mpi " - "demo_contact-vi-tao_serial " - "demo_contact-vi-tao_mpi " - "demo_curl-curl_serial " - "demo_curl-curl_mpi " - "demo_dg-advection-diffusion_serial " - "demo_dg-advection-diffusion_mpi " - "demo_elasticity_serial " - "demo_elasticity_mpi " - "demo_elastodynamics_serial " - "demo_elastodynamics_mpi " - "demo_lift-drag_serial " - "demo_lift-drag_mpi " - "demo_mesh-quality_serial " - "demo_mesh-quality_mpi " - "demo_multimesh-stokes_serial " - ")\n") port))))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "make" "unittests") - (invoke "make" "demos") - (invoke "ctest" "-R" "unittests") - (invoke "ctest" "-R" "demo" "-R" "serial") - (invoke "ctest" "-R" "demo" "-R" "mpi"))))))) + (list + #:configure-flags + #~`("-DDOLFIN_ENABLE_DOCS:BOOL=OFF" "-DDOLFIN_ENABLE_HDF5:BOOL=ON" + "-DDOLFIN_ENABLE_MPI:BOOL=ON" + "-DDOLFIN_ENABLE_PARMETIS:BOOL=OFF" + "-DDOLFIN_ENABLE_SCOTCH:BOOL=ON" + "-DDOLFIN_ENABLE_SUNDIALS:BOOL=ON" + "-DDOLFIN_ENABLE_TRILINOS:BOOL=OFF") + #:phases + #~(modify-phases %standard-phases + (add-after 'patch-usr-bin-file 'mpi-setup + #$%openmpi-setup) + (add-after 'patch-source-shebangs 'set-paths + (lambda _ + ;; Define paths to store locations. + (setenv "BLAS_DIR" + #$(this-package-input "openblas")) + (setenv "CATCH_DIR" + #$(this-package-input "catch")) + (setenv "LAPACK_DIR" + #$(this-package-input "openblas")) + (setenv "PETSC_DIR" + #$(this-package-input "petsc")) + (setenv "SLEPC_DIR" + #$(this-package-input "slepc")) + (setenv "SCOTCH_DIR" + #$(this-package-input "scotch")) + (setenv "SUNDIALS_DIR" + #$(this-package-input "sundials")) + (setenv "UMFPACK_DIR" + #$(this-package-input "suitesparse")))) + (add-before 'check 'pre-check + (lambda _ + ;; The Dolfin repository uses git-lfs, whereby web links are + ;; substituted for large files. Only the links are downloaded. + ;; The tests that require the absent meshes cannot run and are + ;; skipped. + ;; + ;; One serial test fails and is skipped. + ;; i) demo_multimesh-stokes_serial: + ;; Warning: Found no facets matching domain for boundary + ;; condition. + ;; + ;; One mpi test fails and is skipped. + ;; i) demo_stokes-iterative_mpi: + ;; The MPI_Comm_rank() function was called before MPI_INIT was + ;; invoked. + (call-with-output-file "CTestCustom.cmake" + (lambda (port) + (display (string-append "set(CTEST_CUSTOM_TESTS_IGNORE " + "demo_bcs_serial " + "demo_bcs_mpi " + "demo_eigenvalue_serial " + "demo_eigenvalue_mpi " + "demo_navier-stokes_serial " + "demo_navier-stokes_mpi " + "demo_stokes-taylor-hood_serial " + "demo_stokes-taylor-hood_mpi " + "demo_subdomains_serial " + "demo_advection-diffusion_serial " + "demo_advection-diffusion_mpi " + "demo_auto-adaptive-navier-stokes_serial " + "demo_contact-vi-snes_serial " + "demo_contact-vi-snes_mpi " + "demo_contact-vi-tao_serial " + "demo_contact-vi-tao_mpi " + "demo_curl-curl_serial " + "demo_curl-curl_mpi " + "demo_dg-advection-diffusion_serial " + "demo_dg-advection-diffusion_mpi " + "demo_elasticity_serial " + "demo_elasticity_mpi " + "demo_elastodynamics_serial " + "demo_elastodynamics_mpi " + "demo_lift-drag_serial " + "demo_lift-drag_mpi " + "demo_mesh-quality_serial " + "demo_mesh-quality_mpi " + "demo_multimesh-stokes_serial " + "demo_stokes-iterative_mpi" + ")\n") port))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "make" "unittests") + (invoke "make" "demos") + (invoke "ctest" "-R" "unittests") + (invoke "ctest" "-R" "demo" "-R" "serial") + (invoke "ctest" "-R" "demo" "-R" "mpi"))))))) (home-page "https://bitbucket.org/fenics-project/dolfin/") (synopsis "Problem solving environment for differential equations") (description - "DOLFIN is a computational framework for finding numerical + "DOLFIN is a computational framework for finding numerical solutions to problems described by differential equations. Numerical models in DOLFIN are constructed using general families of finite elements. Data structures are provided for discretizing the governing @@ -896,17 +891,15 @@ (define-public fenics-dolfin ;; following exceptions: ;; ;; public-domain: dolfin/geometry/predicates.cpp - ;; dolfin/geometry/predicates.h + ;; dolfin/geometry/predicates.h ;; ;; zlib: dolfin/io/base64.cpp - ;; dolfin/io/base64.h + ;; dolfin/io/base64.h ;; ;; expat: dolfin/io/pugiconfig.hpp - ;; dolfin/io/pugixml.cpp - ;; dolfin/io/pugixml.hpp - (license (list license:public-domain - license:zlib - license:expat + ;; dolfin/io/pugixml.cpp + ;; dolfin/io/pugixml.hpp + (license (list license:public-domain license:zlib license:expat license:lgpl3+)))) (define-public fenics -- 2.39.5 From unknown Sat Jul 26 22:09:07 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78878] [PATCH] gnu:fenics-dolfin: Fix build with hdf5@1.14. Resent-From: Paul Garlick Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 27 Jun 2025 18:19:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Andreas Enge Cc: 78878@debbugs.gnu.org Received: via spool by 78878-submit@debbugs.gnu.org id=B78878.17510483063802 (code B ref 78878); Fri, 27 Jun 2025 18:19:03 +0000 Received: (at 78878) by debbugs.gnu.org; 27 Jun 2025 18:18:26 +0000 Received: from localhost ([127.0.0.1]:40851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uVDeb-0000zE-LY for submit@debbugs.gnu.org; Fri, 27 Jun 2025 14:18:25 -0400 Received: from smtp.hosts.co.uk ([85.233.160.19]:20457) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uVDeY-0000yH-PS for 78878@debbugs.gnu.org; Fri, 27 Jun 2025 14:18:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tourbillion-technology.com; s=2025040300; h=MIME-Version: Content-Transfer-Encoding:Content-Type:References:In-Reply-To:Date:To:From: Subject:Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=v+siwkLXFHjOT35JNbep4bjI2XgxJV2DmJ2bz6fjSQU=; b=OUt4u6gV8JsZPWqT2+456uKFCX YWB+T1AkWb6ona5SO8N/HlnbsFgqQSxTVhREFc+62pqYjQnRrpYG1SuVE1NC79GmKnhpIAYe7d1r6 xHzXWc1DKphY4R6ra1Yrvwnhoyc1Lg47KCiEjuBwrAOWRy0NuXOKCIQfFvmJAw/NwNIo=; Received: from maikeh336.claranet.co.uk ([79.123.23.187] helo=[192.168.0.13]) by smtp.hosts.co.uk with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim) (envelope-from ) id 1uVDeS-00000000AMA-5GpM; Fri, 27 Jun 2025 19:18:16 +0100 Message-ID: From: Paul Garlick Date: Fri, 27 Jun 2025 19:18:15 +0100 In-Reply-To: References: <20250623165849.3076997-1-pgarlick@tourbillion-technology.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 X-Spam-Score: -0.7 (/) 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: -1.7 (-) Hello Andreas, On Wed, 2025-06-25 at 21:36 +0200, Andreas Enge wrote: > The following tests FAILED: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 26 - demo_stokes-iterati= ve_mpi (Failed) > Errors while running CTest Thanks, I have been able to repeat this failure. It seems to be intermittent, possibly related to the so-called "static initialization order fiasco". Something to investigate on another day, perhaps. In the meantime, I have added this test to the list of skipped tests and re-submitted the patch. Best regards, Paul. From unknown Sat Jul 26 22:09:07 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Paul Garlick Subject: bug#78878: closed (Re: [PATCH] gnu:fenics-dolfin: Fix build with hdf5@1.14.) Message-ID: References: <20250623165849.3076997-1-pgarlick@tourbillion-technology.com> X-Gnu-PR-Message: they-closed 78878 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 78878@debbugs.gnu.org Date: Sat, 28 Jun 2025 14:39:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1751121542-23433-1" This is a multi-part message in MIME format... ------------=_1751121542-23433-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #78878: [PATCH] gnu:fenics-dolfin: Fix build with hdf5@1.14. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 78878@debbugs.gnu.org. --=20 78878: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D78878 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1751121542-23433-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 78878-done) by debbugs.gnu.org; 28 Jun 2025 14:38:38 +0000 Received: from localhost ([127.0.0.1]:51006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uVWhS-00062j-0e for submit@debbugs.gnu.org; Sat, 28 Jun 2025 10:38:38 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:46234) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uVWhQ-00061g-Ev for 78878-done@debbugs.gnu.org; Sat, 28 Jun 2025 10:38:37 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id DCBF0E4B; Sat, 28 Jun 2025 16:38:27 +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 tDFrnw4yttDG; Sat, 28 Jun 2025 16:38:27 +0200 (CEST) Received: from jurong (unknown [37.167.134.97]) by hera.aquilenet.fr (Postfix) with ESMTPSA id D4135C8F; Sat, 28 Jun 2025 16:38:25 +0200 (CEST) Date: Sat, 28 Jun 2025 16:38:24 +0200 From: Andreas Enge To: Paul Garlick Subject: Re: [PATCH] gnu:fenics-dolfin: Fix build with hdf5@1.14. Message-ID: References: <20250623165849.3076997-1-pgarlick@tourbillion-technology.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Result: default: False [-5.60 / 15.00]; NEURAL_HAM(-3.00)[-1.000]; BAYES_HAM(-3.00)[99.99%]; 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: DCBF0E4B X-Rspamd-Server: hera X-Spamd-Bar: ----- X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78878-done Cc: 78878-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: -1.0 (-) Hello Paul, Am Fri, Jun 27, 2025 at 07:18:15PM +0100 schrieb Paul Garlick: > Thanks, I have been able to repeat this failure. > It seems to be intermittent, possibly related to the so-called "static > initialization order fiasco". Something to investigate on another day, > perhaps. > In the meantime, I have added this test to the list of skipped tests > and re-submitted the patch. that sounds very reasonable, I could build and have pushed the commit. Thank you for all that work! Andreas ------------=_1751121542-23433-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 23 Jun 2025 17:00:10 +0000 Received: from localhost ([127.0.0.1]:56843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uTkWa-00033L-B5 for submit@debbugs.gnu.org; Mon, 23 Jun 2025 13:00:09 -0400 Received: from lists.gnu.org ([2001:470:142::17]:58950) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uTkWV-00031T-3B for submit@debbugs.gnu.org; Mon, 23 Jun 2025 13:00:03 -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 1uTkWM-0005oq-4Y for guix-patches@gnu.org; Mon, 23 Jun 2025 12:59:50 -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 1uTkWJ-0000TR-7I for guix-patches@gnu.org; Mon, 23 Jun 2025 12:59:49 -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=+EnXwMDqZxFOsck2q2NRrG/DomlvaciMZ5bPxErgrk0=; b=0FL20hZPjWBkQJcmHjRnlq3R9G OIM1k2gZwcxLqpnq2pifkgP8hBVmr8oobYIutxVlJF7l1U16AmJWvEwZKRlXfNnKILQOieBGcfVhZ xUROPDKh50DiHs5ytmI5JOq5Hh81eAw/zMOrcuJh5QltpDymAPlb59avoarzlQM0qugg=; 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 1uTkWC-000000000Vb-8PRV; Mon, 23 Jun 2025 17:59:41 +0100 From: Paul Garlick To: guix-patches@gnu.org Subject: [PATCH] gnu:fenics-dolfin: Fix build with hdf5@1.14. Date: Mon, 23 Jun 2025 17:58:49 +0100 Message-Id: <20250623165849.3076997-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: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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/patches/fenics-dolfin-hdf5-version-check.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/simulation.scm (fenics-dolfin)[source]: Use it. --- gnu/local.mk | 1 + .../fenics-dolfin-hdf5-version-check.patch | 26 ++ gnu/packages/simulation.scm | 270 +++++++++--------- 3 files changed, 158 insertions(+), 139 deletions(-) create mode 100644 gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch diff --git a/gnu/local.mk b/gnu/local.mk index c569c327a9..d3a2c81bd7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1288,6 +1288,7 @@ dist_patch_DATA = \ %D%/packages/patches/fenics-dolfin-demo-init.patch \ %D%/packages/patches/fenics-dolfin-boost.patch \ %D%/packages/patches/fenics-dolfin-config-slepc.patch \ + %D%/packages/patches/fenics-dolfin-hdf5-version-check.patch \ %D%/packages/patches/ffmpeg-jami-change-RTCP-ratio.patch \ %D%/packages/patches/ffmpeg-jami-rtp_ext_abs_send_time.patch \ %D%/packages/patches/ffmpeg-jami-libopusdec-enable-FEC.patch \ diff --git a/gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch b/gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch new file mode 100644 index 0000000000..6128ed5b3c --- /dev/null +++ b/gnu/packages/patches/fenics-dolfin-hdf5-version-check.patch @@ -0,0 +1,26 @@ +This patch checks the HDF5 API version before selecting the appropriate H5O +function. A new function name and an extra argument are required for v1.12 +and above. + +See for the Technical Notes. + +See for the upstream fix. + +--- a/dolfin/io/HDF5Interface.cpp ++++ b/dolfin/io/HDF5Interface.cpp +@@ -282,8 +282,13 @@ + } + + H5O_info_t object_info; +- H5Oget_info_by_name(hdf5_file_handle, group_name.c_str(), &object_info, +- lapl_id); ++ #if H5_VERSION_GE(1, 12, 0) ++ H5Oget_info_by_name3(hdf5_file_handle, group_name.c_str(), &object_info, ++ H5O_INFO_BASIC, lapl_id); ++ #else ++ H5Oget_info_by_name(hdf5_file_handle, group_name.c_str(), &object_info, ++ lapl_id); ++ #endif + + // Close link access properties + status = H5Pclose(lapl_id); diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm index ebfe477265..451e305fc8 100644 --- a/gnu/packages/simulation.scm +++ b/gnu/packages/simulation.scm @@ -744,143 +744,137 @@ (define-public fenics-dolfin (name "fenics-dolfin") (version "2019.1.0.post0") (source - (origin - (method url-fetch) - (uri (string-append - "https://bitbucket.org/fenics-project/dolfin/get/" - version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1m91hwcq5gfj4qqswp8l8kj58nia48f0n4kq13w0xqj4biq7rla0")) - (patches (search-patches "fenics-dolfin-algorithm.patch" - "fenics-dolfin-demo-init.patch" - "fenics-dolfin-boost.patch" - "fenics-dolfin-config-slepc.patch")) - (modules '((guix build utils))) - (snippet - '(begin - ;; Make sure we don't use the bundled test framework. - (delete-file-recursively "test/unit/cpp/catch") - (substitute* "test/unit/cpp/main.cpp" - ;; Use standard search paths for 'catch' header file. - (("#include.*") - "#include \n")) - (substitute* "test/unit/cpp/CMakeLists.txt" - ;; Specify directory to find the header file. - (("(^set\\(CATCH_INCLUDE_DIR ).*(/catch\\))" _ front back) - (string-append front - "$ENV{CATCH_DIR}/include" back "\n"))))))) + (origin + (method url-fetch) + (uri (string-append "https://bitbucket.org/fenics-project/dolfin/get/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1m91hwcq5gfj4qqswp8l8kj58nia48f0n4kq13w0xqj4biq7rla0")) + (patches (search-patches "fenics-dolfin-algorithm.patch" + "fenics-dolfin-demo-init.patch" + "fenics-dolfin-boost.patch" + "fenics-dolfin-config-slepc.patch" + "fenics-dolfin-hdf5-version-check.patch")) + (modules '((guix build utils))) + (snippet '(begin + ;; Make sure we don't use the bundled test framework. + (delete-file-recursively "test/unit/cpp/catch") + (substitute* "test/unit/cpp/main.cpp" + ;; Use standard search paths for 'catch' header file. + (("#include.*") + "#include \n")) + (substitute* "test/unit/cpp/CMakeLists.txt" + ;; Specify directory to find the header file. + (("(^set\\(CATCH_INCLUDE_DIR ).*(/catch\\))" _ front back) + (string-append front "$ENV{CATCH_DIR}/include" back "\n"))))))) (build-system cmake-build-system) - (inputs - (list openblas - boost - eigen - hdf5-parallel-openmpi - libxml2 - openmpi - python-3 - pt-scotch32 - suitesparse - sundials-openmpi - zlib)) - (native-inputs - (list catch-framework pkg-config)) - (propagated-inputs - (list python-fenics-ffc petsc-openmpi slepc-openmpi)) + (inputs (list openblas + boost + eigen + hdf5-parallel-openmpi + libxml2 + openmpi + python-3 + pt-scotch32 + suitesparse + sundials-openmpi + zlib)) + (native-inputs (list catch-framework pkg-config)) + (propagated-inputs (list python-fenics-ffc petsc-openmpi slepc-openmpi)) (arguments - (list #:configure-flags #~`("-DDOLFIN_ENABLE_DOCS:BOOL=OFF" - "-DDOLFIN_ENABLE_HDF5:BOOL=ON" - "-DDOLFIN_ENABLE_MPI:BOOL=ON" - "-DDOLFIN_ENABLE_PARMETIS:BOOL=OFF" - "-DDOLFIN_ENABLE_SCOTCH:BOOL=ON" - "-DDOLFIN_ENABLE_SUNDIALS:BOOL=ON" - "-DDOLFIN_ENABLE_TRILINOS:BOOL=OFF") - #:phases - #~(modify-phases %standard-phases - (add-after 'patch-usr-bin-file 'mpi-setup - #$%openmpi-setup) - (add-after 'patch-source-shebangs 'set-paths - (lambda _ - ;; Define paths to store locations. - (setenv "BLAS_DIR" - #$(this-package-input "openblas")) - (setenv "CATCH_DIR" - #$(this-package-input "catch")) - (setenv "LAPACK_DIR" - #$(this-package-input "openblas")) - (setenv "PETSC_DIR" - #$(this-package-input "petsc")) - (setenv "SLEPC_DIR" - #$(this-package-input "slepc")) - (setenv "SCOTCH_DIR" - #$(this-package-input "scotch")) - (setenv "SUNDIALS_DIR" - #$(this-package-input "sundials")) - (setenv "UMFPACK_DIR" - #$(this-package-input "suitesparse")))) - (add-before 'check 'pre-check - (lambda _ - ;; The Dolfin repository uses git-lfs, whereby web links are - ;; substituted for large files. Guix does not currently support - ;; git-lfs, so only the links are downloaded. The tests that - ;; require the absent meshes cannot run and are skipped. - ;; - ;; One serial test fails and is skipped. - ;; i) demo_multimesh-stokes_serial: - ;; Warning: Found no facets matching domain for boundary - ;; condition. - ;; - ;; One mpi test fails and is skipped. - ;; i) demo_stokes-iterative_mpi: - ;; The MPI_Comm_rank() function was called before MPI_INIT was - ;; invoked - (call-with-output-file "CTestCustom.cmake" - (lambda (port) - (display (string-append - "set(CTEST_CUSTOM_TESTS_IGNORE " - "demo_bcs_serial " - "demo_bcs_mpi " - "demo_eigenvalue_serial " - "demo_eigenvalue_mpi " - "demo_navier-stokes_serial " - "demo_navier-stokes_mpi " - "demo_stokes-taylor-hood_serial " - "demo_stokes-taylor-hood_mpi " - "demo_subdomains_serial " - "demo_advection-diffusion_serial " - "demo_advection-diffusion_mpi " - "demo_auto-adaptive-navier-stokes_serial " - "demo_contact-vi-snes_serial " - "demo_contact-vi-snes_mpi " - "demo_contact-vi-tao_serial " - "demo_contact-vi-tao_mpi " - "demo_curl-curl_serial " - "demo_curl-curl_mpi " - "demo_dg-advection-diffusion_serial " - "demo_dg-advection-diffusion_mpi " - "demo_elasticity_serial " - "demo_elasticity_mpi " - "demo_elastodynamics_serial " - "demo_elastodynamics_mpi " - "demo_lift-drag_serial " - "demo_lift-drag_mpi " - "demo_mesh-quality_serial " - "demo_mesh-quality_mpi " - "demo_multimesh-stokes_serial " - ")\n") port))))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "make" "unittests") - (invoke "make" "demos") - (invoke "ctest" "-R" "unittests") - (invoke "ctest" "-R" "demo" "-R" "serial") - (invoke "ctest" "-R" "demo" "-R" "mpi"))))))) + (list + #:configure-flags + #~`("-DDOLFIN_ENABLE_DOCS:BOOL=OFF" "-DDOLFIN_ENABLE_HDF5:BOOL=ON" + "-DDOLFIN_ENABLE_MPI:BOOL=ON" + "-DDOLFIN_ENABLE_PARMETIS:BOOL=OFF" + "-DDOLFIN_ENABLE_SCOTCH:BOOL=ON" + "-DDOLFIN_ENABLE_SUNDIALS:BOOL=ON" + "-DDOLFIN_ENABLE_TRILINOS:BOOL=OFF") + #:phases + #~(modify-phases %standard-phases + (add-after 'patch-usr-bin-file 'mpi-setup + #$%openmpi-setup) + (add-after 'patch-source-shebangs 'set-paths + (lambda _ + ;; Define paths to store locations. + (setenv "BLAS_DIR" + #$(this-package-input "openblas")) + (setenv "CATCH_DIR" + #$(this-package-input "catch")) + (setenv "LAPACK_DIR" + #$(this-package-input "openblas")) + (setenv "PETSC_DIR" + #$(this-package-input "petsc")) + (setenv "SLEPC_DIR" + #$(this-package-input "slepc")) + (setenv "SCOTCH_DIR" + #$(this-package-input "scotch")) + (setenv "SUNDIALS_DIR" + #$(this-package-input "sundials")) + (setenv "UMFPACK_DIR" + #$(this-package-input "suitesparse")))) + (add-before 'check 'pre-check + (lambda _ + ;; The Dolfin repository uses git-lfs, whereby web links are + ;; substituted for large files. Guix does not currently support + ;; git-lfs, so only the links are downloaded. The tests that + ;; require the absent meshes cannot run and are skipped. + ;; + ;; One serial test fails and is skipped. + ;; i) demo_multimesh-stokes_serial: + ;; Warning: Found no facets matching domain for boundary + ;; condition. + ;; + ;; One mpi test fails and is skipped. + ;; i) demo_stokes-iterative_mpi: + ;; The MPI_Comm_rank() function was called before MPI_INIT was + ;; invoked + (call-with-output-file "CTestCustom.cmake" + (lambda (port) + (display (string-append "set(CTEST_CUSTOM_TESTS_IGNORE " + "demo_bcs_serial " + "demo_bcs_mpi " + "demo_eigenvalue_serial " + "demo_eigenvalue_mpi " + "demo_navier-stokes_serial " + "demo_navier-stokes_mpi " + "demo_stokes-taylor-hood_serial " + "demo_stokes-taylor-hood_mpi " + "demo_subdomains_serial " + "demo_advection-diffusion_serial " + "demo_advection-diffusion_mpi " + "demo_auto-adaptive-navier-stokes_serial " + "demo_contact-vi-snes_serial " + "demo_contact-vi-snes_mpi " + "demo_contact-vi-tao_serial " + "demo_contact-vi-tao_mpi " + "demo_curl-curl_serial " + "demo_curl-curl_mpi " + "demo_dg-advection-diffusion_serial " + "demo_dg-advection-diffusion_mpi " + "demo_elasticity_serial " + "demo_elasticity_mpi " + "demo_elastodynamics_serial " + "demo_elastodynamics_mpi " + "demo_lift-drag_serial " + "demo_lift-drag_mpi " + "demo_mesh-quality_serial " + "demo_mesh-quality_mpi " + "demo_multimesh-stokes_serial " + ")\n") port))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "make" "unittests") + (invoke "make" "demos") + (invoke "ctest" "-R" "unittests") + (invoke "ctest" "-R" "demo" "-R" "serial") + (invoke "ctest" "-R" "demo" "-R" "mpi"))))))) (home-page "https://bitbucket.org/fenics-project/dolfin/") (synopsis "Problem solving environment for differential equations") (description - "DOLFIN is a computational framework for finding numerical + "DOLFIN is a computational framework for finding numerical solutions to problems described by differential equations. Numerical models in DOLFIN are constructed using general families of finite elements. Data structures are provided for discretizing the governing @@ -896,17 +890,15 @@ (define-public fenics-dolfin ;; following exceptions: ;; ;; public-domain: dolfin/geometry/predicates.cpp - ;; dolfin/geometry/predicates.h + ;; dolfin/geometry/predicates.h ;; ;; zlib: dolfin/io/base64.cpp - ;; dolfin/io/base64.h + ;; dolfin/io/base64.h ;; ;; expat: dolfin/io/pugiconfig.hpp - ;; dolfin/io/pugixml.cpp - ;; dolfin/io/pugixml.hpp - (license (list license:public-domain - license:zlib - license:expat + ;; dolfin/io/pugixml.cpp + ;; dolfin/io/pugixml.hpp + (license (list license:public-domain license:zlib license:expat license:lgpl3+)))) (define-public fenics -- 2.39.5 ------------=_1751121542-23433-1--