From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 15 11:37:54 2023 Received: (at submit) by debbugs.gnu.org; 15 Jun 2023 15:37:54 +0000 Received: from localhost ([127.0.0.1]:47552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9p2o-0008Iq-2g for submit@debbugs.gnu.org; Thu, 15 Jun 2023 11:37:54 -0400 Received: from lists.gnu.org ([209.51.188.17]:35734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9p2l-0008Ih-1X for submit@debbugs.gnu.org; Thu, 15 Jun 2023 11:37:52 -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 1q9p2j-0001DH-Pi for guix-patches@gnu.org; Thu, 15 Jun 2023 11:37:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9p2i-00058V-Ls; Thu, 15 Jun 2023 11:37:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=55rUhg5ZhGV1/4L7Yfk0yhKPeJrVPvnxkFS4j3KRfrQ=; b=jUMhMwNhU+vvsW oC5vKHY0jcQgd+lbfH+Y4qmp7aH6inbQ/zBOCgB4GivhAN6zqAKPSSj1vkcOVgqi4A4lTUxkeedSl aLFlXqOaFKVDS7Y8r4MX5ABWMvfGEet/KKecWtaYEmIsTqQtj2UOQx9MhSS1C+0UTrVsGvYldb9U6 oJk2AOWgZxCXqLetRUJE09kDQUJt4aLhUFkPsJRl0BjPEYOnTWo+14M+8X4ieFhwyAtBQTOOqTsg0 vjPz90P7MgvCodwPWXGNtkLP8HblnpkVsIx/2wnOyEzipq/0nxcPXaw6IOQoefWN4Ghbiubnipeav ThY609A6PZuLrzOWF7Yg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9p2i-0003rr-9C; Thu, 15 Jun 2023 11:37:48 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: guix-patches@gnu.org Subject: [PATCH 1/2] gnu: fenics: Make sure 'jit.py' can find 'dolfin.pc'. Date: Thu, 15 Jun 2023 17:35:30 +0200 Message-Id: <9c787f4f582e4cfebd4349b15a3e88fe253627b9.1686843252.git.ludo@gnu.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Debbugs-Cc: Yann Dupont Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= 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: -3.3 (---) From: Ludovic Courtès * gnu/packages/simulation.scm (fenics)[inputs]: Move PYTHON-PKGCONFIG to... [propagated-inputs]: ... here. [arguments]: Add 'set-dolfin-pc-file-name' phase. --- gnu/packages/simulation.scm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm index 059be5a2be..9eeb57babe 100644 --- a/gnu/packages/simulation.scm +++ b/gnu/packages/simulation.scm @@ -716,12 +716,14 @@ (define-public fenics ("ply" ,python-ply) ("pytest" ,python-pytest) ("python-decorator" ,python-decorator) - ("python-pkgconfig" ,python-pkgconfig) ,@(package-native-inputs fenics-dolfin))) (propagated-inputs `(("dolfin" ,fenics-dolfin) ("petsc4py" ,python-petsc4py) - ("slepc4py" ,python-slepc4py))) + ("slepc4py" ,python-slepc4py) + + ;; 'dolfin/jit/jit.py' parses 'dolfin.pc' at run time. + ("python-pkgconfig" ,python-pkgconfig))) (arguments `(#:phases (modify-phases %standard-phases @@ -729,6 +731,15 @@ (define-public fenics (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. base-commit: 26602f4063a6e0c626e8deb3423166bcd0abeb90 -- 2.40.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 15 11:42:11 2023 Received: (at 64081) by debbugs.gnu.org; 15 Jun 2023 15:42:11 +0000 Received: from localhost ([127.0.0.1]:47559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9p6w-0008Pv-Pq for submit@debbugs.gnu.org; Thu, 15 Jun 2023 11:42:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9p6u-0008Pf-FY for 64081@debbugs.gnu.org; Thu, 15 Jun 2023 11:42:09 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9p6p-00007U-1E; Thu, 15 Jun 2023 11:42:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=LiH/I0Jc/NqOxeY4ZQ/JjKUdag3RYyRrKiwdhMuIlIY=; b=bPlnb526IdQ7OjwQIXAs MngG8Amz10eYuuo1fhTvjZL7jGOMnbBpl8Zbu1EWr2wyQ/o1N0kko5Zc/4M2Uo3LYup6iXXKqNC+T 8DRoVcyRI8CA6qle9UdW/N8CrERS8rrD48jwXVZVTauBQiRvUbioASs1eTMhF7e/eFJk/q++43ES4 15LYLXuHEg8wKITnzN+038z3d9zRxXKW5unMvhQGYHqZQmnG7NhL/Zi/sKa74JlImmMRkf4vEyxER S9Uey6d1cpY64uub34UYFbfi96WhoDkDy+Joj9qpwChsuJbJMoJYWJ/umlGwwzTvPuX6UPkLo+iCF 5AvIDyVg53LH4Q==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9p6o-0004H7-8X; Thu, 15 Jun 2023 11:42:02 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 64081@debbugs.gnu.org Subject: [PATCH 2/2] gnu: fenics-dolfin, fenics: Remove input labels. Date: Thu, 15 Jun 2023 17:41:54 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: <9c787f4f582e4cfebd4349b15a3e88fe253627b9.1686843252.git.ludo@gnu.org> References: <9c787f4f582e4cfebd4349b15a3e88fe253627b9.1686843252.git.ludo@gnu.org> MIME-Version: 1.0 X-Debbugs-Cc: Yann Dupont Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: 64081 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= 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: -2.6 (--) From: Ludovic Courtès * gnu/packages/simulation.scm (fenics-dolfin)[inputs, native-inputs] [propagated-inputs]: Remove labels. [arguments]: Rewrite using gexps. Adjust 'set-paths' phase accordingly. (fenics): Likewise. --- gnu/packages/simulation.scm | 407 ++++++++++++++++++------------------ 1 file changed, 206 insertions(+), 201 deletions(-) diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm index 9eeb57babe..dfd432dcd3 100644 --- a/gnu/packages/simulation.scm +++ b/gnu/packages/simulation.scm @@ -569,108 +569,111 @@ (define-public fenics-dolfin "$ENV{CATCH_DIR}/include" back "\n"))))))) (build-system cmake-build-system) (inputs - `(("blas" ,openblas) - ("boost" ,boost) - ("eigen" ,eigen) - ("hdf5" ,hdf5-parallel-openmpi) - ("lapack" ,lapack) - ("libxml2" ,libxml2) - ("openmpi" ,openmpi) - ("python" ,python-3) - ("scotch" ,pt-scotch32) - ("suitesparse" ,suitesparse) - ("sundials" ,sundials-openmpi) - ("zlib" ,zlib))) + (list openblas + boost + eigen + hdf5-parallel-openmpi + lapack + libxml2 + openmpi + python-3 + pt-scotch32 + suitesparse + sundials-openmpi + zlib)) (native-inputs - `(("catch" ,catch2-1) - ("pkg-config" ,pkg-config))) + (list catch2-1 pkg-config)) (propagated-inputs - `(("ffc" ,python-fenics-ffc) - ("petsc" ,petsc-openmpi) - ("slepc" ,slepc-openmpi))) + (list python-fenics-ffc petsc-openmpi slepc-openmpi)) (arguments - `(#: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" (assoc-ref %build-inputs "blas")) - (setenv "CATCH_DIR" (assoc-ref %build-inputs "catch")) - (setenv "LAPACK_DIR" (assoc-ref %build-inputs "lapack")) - (setenv "PETSC_DIR" (assoc-ref %build-inputs "petsc")) - (setenv "SLEPC_DIR" (assoc-ref %build-inputs "slepc")) - (setenv "SCOTCH_DIR" (assoc-ref %build-inputs "scotch")) - (setenv "SUNDIALS_DIR" (assoc-ref %build-inputs "sundials")) - (setenv "UMFPACK_DIR" (assoc-ref %build-inputs "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 "lapack")) + (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 @@ -708,112 +711,114 @@ (define-public fenics (name "fenics") (build-system python-build-system) (inputs - `(("pybind11" ,pybind11) - ("python-matplotlib" ,python-matplotlib) - ,@(alist-delete "python" (package-inputs fenics-dolfin)))) + (modify-inputs (package-inputs fenics-dolfin) + (delete "python") + (prepend pybind11 python-matplotlib))) (native-inputs - `(("cmake" ,cmake-minimal) - ("ply" ,python-ply) - ("pytest" ,python-pytest) - ("python-decorator" ,python-decorator) - ,@(package-native-inputs fenics-dolfin))) + (modify-inputs (package-native-inputs fenics-dolfin) + (prepend cmake-minimal python-ply python-pytest python-decorator))) (propagated-inputs - `(("dolfin" ,fenics-dolfin) - ("petsc4py" ,python-petsc4py) - ("slepc4py" ,python-slepc4py) + (list fenics-dolfin + python-petsc4py + python-slepc4py - ;; 'dolfin/jit/jit.py' parses 'dolfin.pc' at run time. - ("python-pkgconfig" ,python-pkgconfig))) + ;; 'dolfin/jit/jit.py' parses 'dolfin.pc' at run time. + python-pkgconfig)) (arguments - `(#: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" (assoc-ref %build-inputs "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 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)$"))))))))) (home-page "https://fenicsproject.org/") (synopsis "High-level environment for solving differential equations") (description -- 2.40.1 From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 20 17:31:49 2023 Received: (at 64081) by debbugs.gnu.org; 20 Jun 2023 21:31:50 +0000 Received: from localhost ([127.0.0.1]:59985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBix3-00089h-F7 for submit@debbugs.gnu.org; Tue, 20 Jun 2023 17:31:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBix1-00089T-Pp for 64081@debbugs.gnu.org; Tue, 20 Jun 2023 17:31:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBiwv-0006rj-Nu; Tue, 20 Jun 2023 17:31:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=FuCZUEKzjrY15jZ+8bGM9s6VoN7VL9A+ioL/TUKGHu0=; b=BOMFo7nfvp5Okg WrIdMbXNpCaKkkYGOInyodaMJIi0uvj3XWFuowXLSQxvRAJ41UcmBUI0+WQAlH+Bxme6hSBPdXrld Zml+b1WkDFJx17XdoXnXIXkMlu0NVC4djxDN6heo5Y9UaqTxSvfhX4B+LEUUCvfB/iSdeJpTIpgr1 uk6JNsETYRHq2y1yTCSIOPw8CguD7zNzBxSBEJx6z0jJnPc/IG3Yjj1hcVu+QE8H327E4Re71AYHL yElnjOCsSejifQcQIIYb2/fpFIgZ17WvNJ/cbqLSMJ4eWEQARb/D+/BlyWeGlE6ZoDCzskqnxoysl WYb3aif1oMniTJgEixBw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBiwu-0004wE-UU; Tue, 20 Jun 2023 17:31:41 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 64081@debbugs.gnu.org Subject: [PATCH v2 1/2] gnu: fenics: Make sure 'jit.py' can find 'dolfin.pc'. Date: Tue, 20 Jun 2023 23:31:21 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64081 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= 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: -3.3 (---) From: Ludovic Courtès * gnu/packages/simulation.scm (fenics)[inputs]: Move PYTHON-PKGCONFIG to... [propagated-inputs]: ... here. [arguments]: Add 'set-dolfin-pc-file-name' phase. --- gnu/packages/simulation.scm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm index 059be5a2be..9eeb57babe 100644 --- a/gnu/packages/simulation.scm +++ b/gnu/packages/simulation.scm @@ -716,12 +716,14 @@ (define-public fenics ("ply" ,python-ply) ("pytest" ,python-pytest) ("python-decorator" ,python-decorator) - ("python-pkgconfig" ,python-pkgconfig) ,@(package-native-inputs fenics-dolfin))) (propagated-inputs `(("dolfin" ,fenics-dolfin) ("petsc4py" ,python-petsc4py) - ("slepc4py" ,python-slepc4py))) + ("slepc4py" ,python-slepc4py) + + ;; 'dolfin/jit/jit.py' parses 'dolfin.pc' at run time. + ("python-pkgconfig" ,python-pkgconfig))) (arguments `(#:phases (modify-phases %standard-phases @@ -729,6 +731,15 @@ (define-public fenics (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. base-commit: bb09f3ac002a4f34177d42fd3ea0332f4b7fe7a6 -- 2.40.1 From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 20 17:31:53 2023 Received: (at 64081) by debbugs.gnu.org; 20 Jun 2023 21:31:53 +0000 Received: from localhost ([127.0.0.1]:59987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBix5-00089y-TV for submit@debbugs.gnu.org; Tue, 20 Jun 2023 17:31:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBix2-00089V-GH for 64081@debbugs.gnu.org; Tue, 20 Jun 2023 17:31:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBiww-0006s2-V9; Tue, 20 Jun 2023 17:31:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=1kw5fhd1Y1gmJrgHHPJLhzPVPLWMgZy9yhot7feuWEM=; b=Vx3QuqtsL2DS5XNjld00 Fv9jd4rXQEXYbgNq1BUZu6Ly7wtzF7qC+pdGXr5sFRFMiIabBrUaNq+X8qRaofumcj1QAvWkwtDuA cSfbnUWJqM16EraaYtOT8qoksPYntcoLQ63JtkYRGFDwNM9dMEWRP22YZwOa7pICHBbknsDD2+Vcp nPlsrW7TvmbhKFAz5jSomtZwyeAGxmI3cj1G50VGPCHAEdqo7FCJUk6LNmYoSpVa20RyyJ0HeKThf KcitJTtpL0/bMkszPK9fdvEEpkHDz6QkRBsyGXFqsRch5pNvdKgGWYqcMlq3G0EfBJOxSdOqVvD4l DJLokm8QVqlO0Q==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBiww-0004wE-7G; Tue, 20 Jun 2023 17:31:42 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 64081@debbugs.gnu.org Subject: [PATCH v2 2/2] gnu: fenics-dolfin, fenics: Remove input labels. Date: Tue, 20 Jun 2023 23:31:22 +0200 Message-Id: <72671db61955d27d2af7ab391b7bb8482556ce99.1687296647.git.ludo@gnu.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: 64081 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= 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: -2.6 (--) From: Ludovic Courtès * gnu/packages/simulation.scm (fenics-dolfin)[inputs, native-inputs] [propagated-inputs]: Remove labels. Replace CATCH2-1, which was actually unused, by CATCH-FRAMEWORK. [arguments]: Rewrite using gexps. Adjust 'set-paths' phase accordingly. (fenics): Likewise. --- gnu/packages/simulation.scm | 407 ++++++++++++++++++------------------ 1 file changed, 206 insertions(+), 201 deletions(-) diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm index 9eeb57babe..a4aac0ebf8 100644 --- a/gnu/packages/simulation.scm +++ b/gnu/packages/simulation.scm @@ -569,108 +569,111 @@ (define-public fenics-dolfin "$ENV{CATCH_DIR}/include" back "\n"))))))) (build-system cmake-build-system) (inputs - `(("blas" ,openblas) - ("boost" ,boost) - ("eigen" ,eigen) - ("hdf5" ,hdf5-parallel-openmpi) - ("lapack" ,lapack) - ("libxml2" ,libxml2) - ("openmpi" ,openmpi) - ("python" ,python-3) - ("scotch" ,pt-scotch32) - ("suitesparse" ,suitesparse) - ("sundials" ,sundials-openmpi) - ("zlib" ,zlib))) + (list openblas + boost + eigen + hdf5-parallel-openmpi + lapack + libxml2 + openmpi + python-3 + pt-scotch32 + suitesparse + sundials-openmpi + zlib)) (native-inputs - `(("catch" ,catch2-1) - ("pkg-config" ,pkg-config))) + (list catch-framework pkg-config)) (propagated-inputs - `(("ffc" ,python-fenics-ffc) - ("petsc" ,petsc-openmpi) - ("slepc" ,slepc-openmpi))) + (list python-fenics-ffc petsc-openmpi slepc-openmpi)) (arguments - `(#: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" (assoc-ref %build-inputs "blas")) - (setenv "CATCH_DIR" (assoc-ref %build-inputs "catch")) - (setenv "LAPACK_DIR" (assoc-ref %build-inputs "lapack")) - (setenv "PETSC_DIR" (assoc-ref %build-inputs "petsc")) - (setenv "SLEPC_DIR" (assoc-ref %build-inputs "slepc")) - (setenv "SCOTCH_DIR" (assoc-ref %build-inputs "scotch")) - (setenv "SUNDIALS_DIR" (assoc-ref %build-inputs "sundials")) - (setenv "UMFPACK_DIR" (assoc-ref %build-inputs "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 "lapack")) + (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 @@ -708,112 +711,114 @@ (define-public fenics (name "fenics") (build-system python-build-system) (inputs - `(("pybind11" ,pybind11) - ("python-matplotlib" ,python-matplotlib) - ,@(alist-delete "python" (package-inputs fenics-dolfin)))) + (modify-inputs (package-inputs fenics-dolfin) + (delete "python") + (prepend pybind11 python-matplotlib))) (native-inputs - `(("cmake" ,cmake-minimal) - ("ply" ,python-ply) - ("pytest" ,python-pytest) - ("python-decorator" ,python-decorator) - ,@(package-native-inputs fenics-dolfin))) + (modify-inputs (package-native-inputs fenics-dolfin) + (prepend cmake-minimal python-ply python-pytest python-decorator))) (propagated-inputs - `(("dolfin" ,fenics-dolfin) - ("petsc4py" ,python-petsc4py) - ("slepc4py" ,python-slepc4py) + (list fenics-dolfin + python-petsc4py + python-slepc4py - ;; 'dolfin/jit/jit.py' parses 'dolfin.pc' at run time. - ("python-pkgconfig" ,python-pkgconfig))) + ;; 'dolfin/jit/jit.py' parses 'dolfin.pc' at run time. + python-pkgconfig)) (arguments - `(#: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" (assoc-ref %build-inputs "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 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)$"))))))))) (home-page "https://fenicsproject.org/") (synopsis "High-level environment for solving differential equations") (description -- 2.40.1 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 24 10:24:46 2023 Received: (at 64081) by debbugs.gnu.org; 24 Jun 2023 14:24:47 +0000 Received: from localhost ([127.0.0.1]:41181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qD4By-0001Ws-Dm for submit@debbugs.gnu.org; Sat, 24 Jun 2023 10:24:46 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:15458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qD4Bt-0001WN-Ca for 64081@debbugs.gnu.org; Sat, 24 Jun 2023 10:24:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version:content-transfer-encoding; bh=gheGDzQ+0Q1Jv6+1uNi6LaOxPUk+jkepYp0ilr6WhI8=; b=QXPKHms2WdOpR0ReqIkSHNGyKZarpJVjAyi4xt8+iQAzPmQnMpOICTMG pDgxbH+JA1aHzgqVkeumpDR1rsgT8Tj3X2UrqQ8f0KrzvGDhKbni6rY/7 IOzetqmeDeY+6uRUuibk8cSqYBVyyt+5wPjvcGLnvvQatXKIZofo6MILC k=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=ludovic.courtes@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.01,155,1684792800"; d="scan'208";a="114481562" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2023 16:24:34 +0200 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 64081@debbugs.gnu.org Subject: Re: bug#64081: [PATCH 1/2] gnu: fenics: Make sure 'jit.py' can find 'dolfin.pc'. References: <9c787f4f582e4cfebd4349b15a3e88fe253627b9.1686843252.git.ludo@gnu.org> Date: Sat, 24 Jun 2023 16:24:31 +0200 In-Reply-To: <9c787f4f582e4cfebd4349b15a3e88fe253627b9.1686843252.git.ludo@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22's?= message of "Thu, 15 Jun 2023 17:35:30 +0200") Message-ID: <87mt0p0wgw.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64081 Cc: Yann Dupont 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: -3.3 (---) Hi, Ludovic Court=C3=A8s skribis: > From: Ludovic Court=C3=A8s > > * gnu/packages/simulation.scm (fenics)[inputs]: Move PYTHON-PKGCONFIG > to... > [propagated-inputs]: ... here. > [arguments]: Add 'set-dolfin-pc-file-name' phase. I=E2=80=99m pushing v2 because it fixes a real issue and doesn=E2=80=99t in= troduce any regression: https://qa.guix.gnu.org/issue/64081 However, the test suite appears to time out, at least occasionally, even on x86_64: https://bordeaux.guix.gnu.org/build/ce84f62b-efc0-4519-94b2-c1debc54b752/= log The log ends like this: --8<---------------cut here---------------start------------->8--- 10/38 Test #20: demo_periodic_mpi ...................... Passed 9.24 s= ec Start 22: demo_poisson_mpi 11/38 Test #22: demo_poisson_mpi ....................... Passed 8.26 s= ec Start 24: demo_singular-poisson_mpi 12/38 Test #24: demo_singular-poisson_mpi .............. Passed 12.59 s= ec Start 26: demo_stokes-iterative_mpi --8<---------------cut here---------------end--------------->8--- Would be good to see if there=E2=80=99s a real problem hiding or if we=E2= =80=99re dealing with a long-running test or something. This is not a regression AFAICS: --8<---------------cut here---------------start------------->8--- $ guix weather fenics-dolfin computing 1 package derivations for x86_64-linux... looking for 1 store items on https://ci.guix.gnu.org... https://ci.guix.gnu.org =E2=9B=88 0.0% substitutes available (0 out of 1) unknown substitute sizes 0.0 MiB on disk (uncompressed) 0.196 seconds per request (0.2 seconds in total) 5.1 requests per second 0.0% (0 out of 1) of the missing items are queued 0 queued builds build rate: 12.96 builds per hour x86_64-linux: 4.93 builds per hour aarch64-linux: 2.28 builds per hour i686-linux: 4.00 builds per hour powerpc64le-linux: 1.85 builds per hour armhf-linux: 0.05 builds per hour looking for 1 store items on https://bordeaux.guix.gnu.org... https://bordeaux.guix.gnu.org =E2=9B=88 0.0% substitutes available (0 out of 1) unknown substitute sizes 0.0 MiB on disk (uncompressed) 0.153 seconds per request (0.2 seconds in total) 6.5 requests per second (continuous integration information unavailable) $ guix describe Generation 267 Jun 19 2023 00:15:56 (current) guix bf9afed repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: bf9afedef9c55aa0092b562077d9f2c743d9a29c --8<---------------cut here---------------end--------------->8--- Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 24 10:24:47 2023 Received: (at control) by debbugs.gnu.org; 24 Jun 2023 14:24:47 +0000 Received: from localhost ([127.0.0.1]:41183 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qD4By-0001Wu-UJ for submit@debbugs.gnu.org; Sat, 24 Jun 2023 10:24:47 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:15458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qD4Bx-0001WN-BK for control@debbugs.gnu.org; Sat, 24 Jun 2023 10:24:45 -0400 Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=ludo@gnu.org; dmarc=fail (p=none dis=none) d=gnu.org X-IronPort-AV: E=Sophos;i="6.01,155,1684792800"; d="scan'208";a="114481565" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2023 16:24:41 +0200 Date: Sat, 24 Jun 2023 16:24:37 +0200 Message-Id: <87leg90wgq.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #64081 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: control 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: -2.3 (--) close 64081 quit From unknown Tue Jun 17 22:27:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 23 Jul 2023 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator