GNU bug report logs - #33059
[PATCH 00/10] Add the FEniCS Project

Previous Next

Package: guix-patches;

Reported by: Paul Garlick <pgarlick <at> tourbillion-technology.com>

Date: Tue, 16 Oct 2018 09:19:01 UTC

Severity: normal

Tags: moreinfo, patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33059 in the body.
You can then email your comments to 33059 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Tue, 16 Oct 2018 09:19:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Garlick <pgarlick <at> tourbillion-technology.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 16 Oct 2018 09:19:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: guix-patches <at> gnu.org
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH 00/10] Add the FEniCS Project
Date: Tue, 16 Oct 2018 10:17:08 +0100
Hi Guix,

This set of patches adds definitions and dependencies for the FEniCS Project.
FEniCS provides a problem-solving environment for general classes of problems
that involve differential equations.  It is particularly well-suited to
problems that can be solved using the Finite Element Method.

There are two main packages;

i) fenics-dolfin:  C++ library plus interface
ii) python-fenics-dolfin: Python interface 

There are four FEniCS dependencies:

i) python-fenics-ffc
ii) python-fenics-fiat
iii) python-fenics-ufl
iv) python-fenics-dijitso

There are three external dependencies:

i) python-slepc4py
ii) python-petsc4py
iii) python-mpi4py

There is an extra package 'fenics' that inherits its defintion from
python-fenics-dolfin.  This is to provide a sensible default for users
expecting to find a package of this name.

Best regards,

Paul.

Paul Garlick (10):
  gnu: Add python-mpi4py.
  gnu: Add python-petsc4py.
  gnu: Add python-slepc4py.
  gnu: Add python-fenics-dijitso.
  gnu: Add python-fenics-ufl.
  gnu: Add python-fenics-fiat.
  gnu: Add python-fenics-ffc.
  gnu: Add fenics-dolfin.
  gnu: Add python-fenics-dolfin.
  gnu: Add fenics.

 gnu/packages/simulation.scm | 688 +++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 687 insertions(+), 1 deletion(-)

-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Tue, 16 Oct 2018 09:33:02 GMT) Full text and rfc822 format available.

Message #8 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 33059 <at> debbugs.gnu.org
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH 01/10] gnu: Add python-mpi4py.
Date: Tue, 16 Oct 2018 10:31:15 +0100
* gnu/packages/simulation.scm (python-mpi4py): New variable.
---
 gnu/packages/simulation.scm | 45 ++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 44 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index a5b661e..857d856 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017 Paul Garlick <pgarlick <at> tourbillion-technology.com>
+;;; Copyright © 2017, 2018 Paul Garlick <pgarlick <at> tourbillion-technology.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,6 +36,7 @@
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages ssh)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages xml)
@@ -43,6 +44,7 @@
   #:use-module (guix download)
   #:use-module (guix build utils)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system python)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils)
@@ -221,3 +223,44 @@ with gas/liquid interfaces.  Large problems may be split into smaller, connected
 problems for efficient solution on parallel systems.")
     (license license:gpl3+)
     (home-page "https://openfoam.org")))
+
+(define-public python-mpi4py
+  (package
+    (name "python-mpi4py")
+    (version "3.0.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "mpi4py" version))
+        (sha256
+          (base32
+            "1mzgd26dfv4vwbci8gq77ss9f0x26i9aqzq9b9vs9ndxhlnv0mxl"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'build 'mpi-setup
+           ,%openmpi-setup)
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; Skip BaseTestSpawn class (causes error 'ompi_dpm_dyn_init()
+             ;; failed --> Returned "Unreachable"' in chroot environment).
+             (substitute* "test/test_spawn.py"
+               (("unittest.skipMPI\\('openmpi\\(<3.0.0\\)'\\)")
+                "unittest.skipMPI('openmpi')"))
+             #t)))))
+    (inputs
+     `(("openmpi" ,openmpi)))
+    (home-page
+      "https://bitbucket.org/mpi4py/mpi4py/")
+    (synopsis "Python bindings for the Message Passing Interface standard")
+    (description "MPI for Python (mpi4py) provides bindings of the Message
+Passing Interface (MPI) standard for the Python programming language, allowing
+any Python program to exploit multiple processors.
+
+mpi4py is constructed on top of the MPI-1/MPI-2 specification and provides an
+object oriented interface which closely follows MPI-2 C++ bindings.  It
+supports point-to-point and collective communications of any picklable Python
+object as well as optimized communications of Python objects (such as NumPy
+arrays) that expose a buffer interface.")
+    (license license:bsd-3)))
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Tue, 16 Oct 2018 09:33:02 GMT) Full text and rfc822 format available.

Message #11 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 33059 <at> debbugs.gnu.org
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH 02/10] gnu: Add python-petsc4py.
Date: Tue, 16 Oct 2018 10:31:16 +0100
* gnu/packages/simulation.scm (python-petsc4py): New variable.
---
 gnu/packages/simulation.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 857d856..3f6b73f 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -35,6 +35,7 @@
   #:use-module (gnu packages mpi)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages ssh)
   #:use-module (gnu packages tls)
@@ -264,3 +265,40 @@ supports point-to-point and collective communications of any picklable Python
 object as well as optimized communications of Python objects (such as NumPy
 arrays) that expose a buffer interface.")
     (license license:bsd-3)))
+
+(define-public python-petsc4py
+  (package
+    (name "python-petsc4py")
+    (version "3.9.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "petsc4py" version))
+        (sha256
+          (base32
+            "1f8zd1ac9irsgkyqmzq30d9kl10fy1nh6zk312dhs43g449fkkhc"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'pre-build
+           (lambda _
+             ;; Define path to PETSc installation.
+             (setenv "PETSC_DIR" (assoc-ref %build-inputs "petsc"))
+             #t))
+         (add-before 'check 'mpi-setup
+           ,%openmpi-setup))))
+    (inputs
+     `(("petsc" ,petsc-openmpi)
+       ("python-numpy" ,python-numpy)))
+    (home-page
+      "https://bitbucket.org/petsc/petsc4py/")
+    (synopsis "Python bindings for PETSc")
+    (description "PETSc, the Portable, Extensible Toolkit for
+Scientific Computation, is a suite of data structures and routines for
+the scalable (parallel) solution of scientific applications modeled by
+partial differential equations.  It employs the MPI standard for all
+message-passing communication.  @code{petsc4py} provides Python
+bindings to almost all functions of PETSc.")
+    (license license:bsd-3)))
+ 
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Tue, 16 Oct 2018 09:33:03 GMT) Full text and rfc822 format available.

Message #14 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 33059 <at> debbugs.gnu.org
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH 03/10] gnu: Add python-slepc4py.
Date: Tue, 16 Oct 2018 10:31:17 +0100
* gnu/packages/simulation.scm (python-slepc4py): New variable.
---
 gnu/packages/simulation.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 3f6b73f..72528c0 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -302,3 +302,41 @@ message-passing communication.  @code{petsc4py} provides Python
 bindings to almost all functions of PETSc.")
     (license license:bsd-3)))
  
+(define-public python-slepc4py
+  (package
+    (name "python-slepc4py")
+    (version "3.9.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "slepc4py" version))
+        (sha256
+          (base32
+            "02xr0vndgibgkz3rgprqk05n3mk5mpgqw550sr4681vcsgz4zvb7"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'pre-build
+           (lambda _
+             ;; Define path to PETSc installation.
+             (setenv "PETSC_DIR" (assoc-ref %build-inputs "petsc"))
+             ;; Define path to SLEPc installation.
+             (setenv "SLEPC_DIR" (assoc-ref %build-inputs "slepc"))
+             #t))
+         (add-before 'check 'mpi-setup
+           ,%openmpi-setup))))
+    (inputs
+     `(("python-numpy" ,python-numpy)
+       ("python-petsc4py" ,python-petsc4py)
+       ("slepc" ,slepc-openmpi)))
+    (home-page
+      "https://bitbucket.org/slepc/slepc4py/")
+    (synopsis "Python bindings for SLEPc")
+    (description "SLEPc, the Scalable Library for Eigenvalue Problem
+Computations, is based on PETSc, the Portable, Extensible Toolkit for
+Scientific Computation.  It employs the MPI standard for all
+message-passing communication.  @code{slepc4py} provides Python
+bindings to almost all functions of SLEPc.")
+    (license license:bsd-3)))
+ 
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Tue, 16 Oct 2018 09:33:03 GMT) Full text and rfc822 format available.

Message #17 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 33059 <at> debbugs.gnu.org
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH 04/10] gnu: Add python-fenics-dijitso.
Date: Tue, 16 Oct 2018 10:31:18 +0100
* gnu/packages/simulation.scm (python-fenics-dijitso): New varaible.
---
 gnu/packages/simulation.scm | 51 ++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 50 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 72528c0..8bbf435 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -22,6 +22,7 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
+  #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages gettext)
@@ -339,4 +340,52 @@ Scientific Computation.  It employs the MPI standard for all
 message-passing communication.  @code{slepc4py} provides Python
 bindings to almost all functions of SLEPc.")
     (license license:bsd-3)))
- 
+
+(define-public python-fenics-dijitso
+  (package
+    (name "python-fenics-dijitso")
+    (version "2018.1.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "fenics-dijitso" version))
+        (sha256
+          (base32
+            "1qax2f52qsjbd1h5lk5i5shp448qlakxabjjybrfc1w823p0yql9"))))
+    (build-system python-build-system)
+    (inputs
+     `(("openmpi" ,openmpi)
+       ("python-numpy" ,python-numpy)))
+    (native-inputs
+     `(("python-pytest-cov" ,python-pytest-cov)))
+    (propagated-inputs
+     `(("python-mpi4py" ,python-mpi4py)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'build 'mpi-setup
+           ,%openmpi-setup)
+         (replace 'check
+           (lambda _
+             (setenv "HOME" "/tmp")
+             (setenv "PYTHONPATH"
+                     (string-append (getcwd) ":" (getenv "PYTHONPATH")))
+             (chdir "test")
+             (invoke "./runtests.sh")
+             (chdir "..")
+             #t)))))
+      (home-page
+      "https://bitbucket.org/fenics-project/dijitso/")
+    (synopsis
+      "Distributed just-in-time building of shared libraries")
+    (description
+      "Dijitso provides a core component of the @code{FEniCS} framework,
+namely the just-in-time compilation of C++ code that is generated from
+Python modules.  It is called from within a C++ library, using ctypes
+to import the dynamic shared library directly.
+
+As long as the compiled code can provide a simple factory function to
+a class implementing a predefined C++ interface, there is no limit to
+the complexity of that interface.  Parallel support depends on the
+@code{mpi4py} interface.")
+    (license license:lgpl3+)))
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Tue, 16 Oct 2018 09:33:04 GMT) Full text and rfc822 format available.

Message #20 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 33059 <at> debbugs.gnu.org
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH 05/10] gnu: Add python-fenics-ufl.
Date: Tue, 16 Oct 2018 10:31:19 +0100
* gnu/packages/simulation.scm (python-fenics-ufl): New variable.
---
 gnu/packages/simulation.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 8bbf435..214a834 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -389,3 +389,42 @@ a class implementing a predefined C++ interface, there is no limit to
 the complexity of that interface.  Parallel support depends on the
 @code{mpi4py} interface.")
     (license license:lgpl3+)))
+
+(define-public python-fenics-ufl
+  (package
+    (name "python-fenics-ufl")
+    (version "2018.1.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "fenics-ufl" version))
+        (sha256
+          (base32
+            "1fq8yc86s1s3c8c0b1rc2vf265q0hrkzg57100fg1nghcz0p4vla"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python-numpy" ,python-numpy)))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (setenv "PYTHONPATH"
+                     (string-append (getcwd) ":" (getenv "PYTHONPATH")))
+             (chdir "test")
+             (invoke "py.test")
+             (chdir "..")
+             #t)))))
+    (home-page
+      "https://bitbucket.org/fenics-project/ufl/")
+    (synopsis "Unified language for form-compilers")
+    (description "The Unified Form Language (UFL) is a domain specific
+language for declaration of finite element discretizations of
+variational forms.  More precisely, it defines a flexible interface
+for choosing finite element spaces and defining expressions for weak
+forms in a notation close to mathematical notation.
+
+UFL is part of the FEniCS Project.")
+    (license license:lgpl3+)))
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Tue, 16 Oct 2018 09:33:05 GMT) Full text and rfc822 format available.

Message #23 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 33059 <at> debbugs.gnu.org
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH 06/10] gnu: Add python-fenics-fiat.
Date: Tue, 16 Oct 2018 10:31:20 +0100
* gnu/packages/simulation.scm (python-fenics-fiat): New variable.
---
 gnu/packages/simulation.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 214a834..3a5e6cb 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -428,3 +428,47 @@ forms in a notation close to mathematical notation.
 
 UFL is part of the FEniCS Project.")
     (license license:lgpl3+)))
+
+(define-public python-fenics-fiat
+  (package
+    (name "python-fenics-fiat")
+    (version "2018.1.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "fenics-fiat" version))
+        (sha256
+          (base32
+            "0fmjd93r6bwf6xs8csw86qzphrnr66xwv7f372w59gmq8mg6rljc"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (propagated-inputs
+     `(("python-numpy" ,python-numpy)
+       ("python-sympy" ,python-sympy)))
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (setenv "PYTHONPATH"
+                     (string-append (getcwd) ":" (getenv "PYTHONPATH")))
+             (chdir "test")
+             (invoke "py.test" "unit/")
+             (chdir "..")
+             #t)))))
+    (home-page
+      "https://bitbucket.org/fenics-project/fiat/")
+    (synopsis "Tabulation of finite element function spaces")
+    (description
+      "The FInite element Automatic Tabulator (FIAT) supports
+generation of arbitrary order instances of the Lagrange elements on
+lines, triangles, and tetrahedra.  It is also capable of generating
+arbitrary order instances of Jacobi-type quadrature rules on the same
+element shapes.  Further, H(div) and H(curl) conforming finite element
+spaces such as the families of Raviart-Thomas, Brezzi-Douglas-Marini
+and Nedelec are supported on triangles and tetrahedra.  Upcoming
+versions will also support Hermite and nonconforming elements.
+
+FIAT is part of the FEniCS Project.")
+    (license license:lgpl3+)))
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Tue, 16 Oct 2018 09:33:05 GMT) Full text and rfc822 format available.

Message #26 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 33059 <at> debbugs.gnu.org
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH 07/10] gnu: Add python-fenics-ffc.
Date: Tue, 16 Oct 2018 10:31:21 +0100
* gnu/packages/simulation.scm (python-fenics-ffc): New variable.
---
 gnu/packages/simulation.scm | 54 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 3a5e6cb..f6ad966 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -472,3 +472,57 @@ versions will also support Hermite and nonconforming elements.
 
 FIAT is part of the FEniCS Project.")
     (license license:lgpl3+)))
+
+(define-public python-fenics-ffc
+  (package
+    (name "python-fenics-ffc")
+    (version "2018.1.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "fenics-ffc" version))
+        (sha256
+          (base32
+            "1b2ia5vlkw298x7rf0k2p3ihlpwkwgc98p3s6sbpds3hqmfrzdz9"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (propagated-inputs
+     `(("python-fenics-dijitso" ,python-fenics-dijitso)
+       ("python-fenics-fiat" ,python-fenics-fiat)
+       ("python-fenics-ufl" ,python-fenics-ufl)))
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (setenv "HOME" (getcwd))
+             (setenv "PYTHONPATH"
+                     (string-append (getcwd) ":" (getenv "PYTHONPATH")))
+             (chdir "test")
+             ;; FIXME: the tests in subdirectory
+             ;; 'unit/ufc/finite_element' require the ffc_factory
+             ;; extension module.  This module, located in the 'libs'
+             ;; subdirectory, needs to be built and made accessible
+             ;; prior to running the tests.
+             (invoke "py.test" "unit/" "--ignore=unit/ufc/")
+             (chdir "uflacs")
+             (invoke "py.test" "unit/")
+             (chdir "../..")
+             #t)))))
+    (home-page
+      "https://bitbucket.org/fenics-project/ffc/")
+    (synopsis "Compiler for finite element variational forms")
+    (description "The FEniCS Form Compiler (FFC) is a compiler for
+finite element variational forms.  From a high-level description of
+the form, it generates efficient low-level C++ code that can be used
+to assemble the corresponding discrete operator (tensor).  In
+particular, a bilinear form may be assembled into a matrix and a
+linear form may be assembled into a vector.  FFC may be used either
+from the command line (by invoking the @code{ffc} command) or as a
+Python module (@code{import ffc}).
+
+FFC is part of the FEniCS Project.")
+    ;; There are two files released with a public domain licence;
+    ;; ufc.h and ufc_geometry.h, in subdirectory 'ffc/backends/ufc'.
+    (license (list license:public-domain license:lgpl3+))))
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Tue, 16 Oct 2018 09:33:06 GMT) Full text and rfc822 format available.

Message #29 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 33059 <at> debbugs.gnu.org
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH 08/10] gnu: Add fenics-dolfin.
Date: Tue, 16 Oct 2018 10:31:22 +0100
* gnu/packages/simulation.scm (fenics-dolfin): New variable.
---
 gnu/packages/simulation.scm | 228 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 228 insertions(+)

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index f6ad966..3594f07 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -18,11 +18,13 @@
 
 (define-module (gnu packages simulation)
   #:use-module (gnu packages)
+  #:use-module (gnu packages algebra)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages gettext)
@@ -36,6 +38,7 @@
   #:use-module (gnu packages mpi)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages ssh)
@@ -45,6 +48,7 @@
   #:use-module (gnu packages xorg)
   #:use-module (guix download)
   #:use-module (guix build utils)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module ((guix licenses) #:prefix license:)
@@ -526,3 +530,227 @@ FFC is part of the FEniCS Project.")
     ;; There are two files released with a public domain licence;
     ;; ufc.h and ufc_geometry.h, in subdirectory 'ffc/backends/ufc'.
     (license (list license:public-domain license:lgpl3+))))
+
+(define-public fenics-dolfin
+  (package
+    (name "fenics-dolfin")
+    (version "2018.1.0.post1")
+    (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
+            "12zkk8j3xsg6l8p0ggwsl03084vlcivw4h99b7z9kndg7k89b3ya"))))
+    (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)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (propagated-inputs
+     `(("ffc" ,python-fenics-ffc)
+       ("petsc" ,petsc-openmpi)
+       ("slepc" ,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 "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"))
+             #t))
+         (add-before 'configure 'pre-configure
+           (lambda _
+             (use-modules (ice-9 regex)
+                          (ice-9 rdelim)
+                          (guix build utils)
+                          (rnrs io ports))
+             ;; Add extra include directories required by the unit tests.
+             (with-atomic-file-replacement "test/unit/cpp/CMakeLists.txt"
+               (let ((rx (make-regexp "target_link_libraries")))
+                 (lambda (in out)
+                   (let loop ()
+                     (let ((line (read-line in 'concat)))
+                       (if (eof-object? line)
+                           #t
+                           (begin
+                             (display line out)
+                             (when (regexp-exec rx line)
+                               (display
+                                 (string-append
+                                  "target_include_directories("
+                                  "unittests PRIVATE "
+                                  "${DOLFIN_SOURCE_DIR} "
+                                  "${DOLFIN_SOURCE_DIR}/dolfin "
+                                  "${DOLFIN_BINARY_DIR})\n") out))
+                             (loop))))))))
+             ;; Add extra include directories required by the demo tests.
+             (with-atomic-file-replacement "demo/CMakeLists.txt"
+               (let ((rx (make-regexp "find_package")))
+                 (lambda (in out)
+                   (let loop ()
+                     (let ((line (read-line in 'concat)))
+                       (if (eof-object? line)
+                           #t
+                           (begin
+                             (display line out)
+                             (when (regexp-exec rx line)
+                               (display
+                                 (string-append
+                                  "include_directories("
+                                  "${DOLFIN_SOURCE_DIR} "
+                                  "${DOLFIN_SOURCE_DIR}/dolfin "
+                                  "${DOLFIN_BINARY_DIR})\n") out))
+                             (loop))))))))))
+         (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.
+             ;;
+             ;; Two other serial tests fail and are skipped.
+             ;; i) demo_stokes-iterative_serial,
+             ;;   The MPI_Comm_rank() function was called before MPI_INIT was
+             ;;   invoked
+             ;; ii) 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_serial "
+                    "demo_stokes-iterative_mpi "
+                    ")\n") port)))
+             #t))
+         (replace 'check
+           (lambda _
+             (and (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
+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
+system on a computational mesh.  A compact syntax, similar to
+mathematical notation, is made available for defining function spaces
+and expressing variational forms.  Interfaces to specialized matrix
+solvers are provided for solving the resultant linear systems.
+
+@code{fenics-dolfin} is part of the FEniCS project.  It is the C++
+user interface to the FEniCS core components and external libraries.")
+    ;; The source code files for the DOLFIN C++ library are licensed under the
+    ;; GNU Lesser General Public License, version 3 or later, with the
+    ;; following exceptions:
+    ;;
+    ;; bsd-2:         cmake/modules/FindAMD.cmake
+    ;;                cmake/modules/FindBLASHeader.cmake
+    ;;                cmake/modules/FindCHOLMOD.cmake
+    ;;                cmake/modules/FindEigen3.cmake
+    ;;                cmake/modules/FindMPFR.cmake
+    ;;                cmake/modules/FindNumPy.cmake
+    ;;                cmake/modules/FindPETSc.cmake
+    ;;                cmake/modules/FindPETSc4py.cmake
+    ;;                cmake/modules/FindParMETIS.cmake
+    ;;                cmake/modules/FindSCOTCH.cmake
+    ;;                cmake/modules/FindSLEPc.cmake
+    ;;                cmake/modules/FindSLEPc4py.cmake
+    ;;                cmake/modules/FindSphinx.cmake
+    ;;                cmake/modules/FindSUNDIALS.cmake
+    ;;                cmake/modules/FindUFC.cmake
+    ;;
+    ;; bsd-3:         cmake/modules/FindBLAS.cmake
+    ;;                cmake/modules/FindLAPACK.cmake
+    ;;                cmake/modules/FindMPI.cmake
+    ;;
+    ;; public-domain: dolfin/geometry/predicates.cpp
+    ;;                dolfin/geometry/predicates.h
+    ;;
+    ;; zlib:          dolfin/io/base64.cpp
+    ;;                dolfin/io/base64.h
+    ;;
+    ;; expat:         dolfin/io/pugiconfig.hpp
+    ;;                dolfin/io/pugixml.cpp
+    ;;                dolfin/io/pugixml.hpp
+    ;;
+    ;; boost1.0:      test/unit/cpp/catch/catch.hpp
+    (license (list license:bsd-2
+                   license:bsd-3
+                   license:public-domain
+                   license:zlib
+                   license:expat
+                   license:boost1.0
+                   license:lgpl3+))))
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Tue, 16 Oct 2018 09:34:01 GMT) Full text and rfc822 format available.

Message #32 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 33059 <at> debbugs.gnu.org
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH 09/10] gnu: Add python-fenics-dolfin.
Date: Tue, 16 Oct 2018 10:31:23 +0100
* gnu/packages/simulation.scm (python-fenics-dolfin): New variable.
---
 gnu/packages/simulation.scm | 147 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 147 insertions(+)

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 3594f07..c0617b3 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -754,3 +754,150 @@ user interface to the FEniCS core components and external libraries.")
                    license:expat
                    license:boost1.0
                    license:lgpl3+))))
+
+(define-public python-fenics-dolfin
+  (package (inherit fenics-dolfin)
+    (name "python-fenics-dolfin")
+    (build-system python-build-system)
+    (inputs
+     `(("pybind11" ,pybind11)
+       ("python-matplotlib" ,python-matplotlib)
+       ,@(alist-delete "python" (package-inputs fenics-dolfin))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("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)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (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")
+             #t))
+         (add-after 'build 'mpi-setup
+           ,%openmpi-setup)
+         (add-before 'check 'pre-check
+           (lambda _
+             (use-modules (ice-9 regex)
+                          (ice-9 rdelim)
+                          (guix build utils)
+                          (rnrs io ports))
+             ;; Exclude tests that require meshes supplied by git-lfs.
+             (with-atomic-file-replacement "demo/test.py"
+               (let ((rx (make-regexp "stem !")))
+                 (lambda (in out)
+                   (let loop ()
+                     (let ((line (read-line in 'concat)))
+                       (if (eof-object? line)
+                           #t
+                           (begin
+                             (display line out)
+                             (when (regexp-exec rx line)
+                               (display
+                                 (string-append
+                                  "excludeList = [\n"
+                                  "'multimesh-quadrature', \n"
+                                  "'multimesh-marking', \n"
+                                  "'mixed-poisson-sphere', \n"
+                                  "'mesh-quality', \n"
+                                  "'lift-drag', \n"
+                                  "'elastodynamics', \n"
+                                  "'dg-advection-diffusion', \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") out))
+                             (loop))))))))
+             (setenv "HOME" (getcwd))
+             (setenv "PYTHONPATH"
+                     (string-append
+                      (getcwd) "/build/lib.linux-x86_64-"
+                      ,(version-major+minor (package-version python)) ":"
+                      (getenv "PYTHONPATH")))
+             ;; Restrict OpenBLAS to MPI-only in preference to MPI+OpenMP.
+             (setenv "OPENBLAS_NUM_THREADS" "1")
+             #t))
+         (replace 'check
+           (lambda _
+             (chdir "test")
+             ;; Note: The test test_snes_set_from_options() in the file
+             ;; unit/nls/test_PETScSNES_solver.py fails and is ignored.
+             (and (invoke "py.test" "unit"
+                           "--ignore" "unit/nls/test_PETScSNES_solver.py")
+                  (invoke "mpirun" "-np" "3" "python" "-B" "-m" "pytest" "unit"
+                           "--ignore" "unit/nls/test_PETScSNES_solver.py"))
+             (chdir "../demo")
+             ;; Check demos.
+             (invoke "python" "generate-demo-files.py")
+             (and (invoke "python" "-m" "pytest" "-v" "test.py")
+                  (invoke "python" "-m" "pytest" "-v" "test.py"
+                          "--mpiexec=mpiexec" "--num-proc=3"))
+             (chdir "..")
+             #t))
+         (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)$"))))
+             #t)))))
+    (home-page
+      "https://bitbucket.org/fenics-project/dolfin/")
+    (synopsis
+      "High-level problem solving environment for differential equations")
+    (description
+      "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
+system on a computational mesh.  A compact syntax, similar to
+mathematical notation, is made available for defining function spaces
+and expressing variational forms.  Interfaces to specialized matrix
+solvers are provided for solving the resultant linear systems.
+
+@code{python-fenics-dolfin} is part of the FEniCS project.  It is the
+python user interface to the FEniCS core components and external
+libraries.")
+    ;; The python files in DOLFIN are licensed under the GNU Lesser
+    ;; General Public License, version 3 or later, with the following
+    ;; exceptions:
+    ;;
+    ;; bsd-2: python/cmake/FindPETSc4py.cmake
+    ;;
+    ;; bsd-3: site-packages/dolfin_utils/cppparser/CppHeaderParser.py
+    ;;
+    ;; expat: site-packages/dolfin_utils/ordereddict.py
+    ;;
+    ;; gpl2+: utils/pylit/pylit.py
+    (license (list license:bsd-2
+                   license:bsd-3
+                   license:expat
+                   license:gpl2+
+                   license:lgpl3+))))
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Tue, 16 Oct 2018 09:34:02 GMT) Full text and rfc822 format available.

Message #35 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 33059 <at> debbugs.gnu.org
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH 10/10] gnu: Add fenics.
Date: Tue, 16 Oct 2018 10:31:24 +0100
* gnu/packages/simulation.scm (fenics): New variable.
---
 gnu/packages/simulation.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index c0617b3..2e47067 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -901,3 +901,9 @@ libraries.")
                    license:expat
                    license:gpl2+
                    license:lgpl3+))))
+
+;; The FEniCS Project.
+(define-public fenics
+  (package
+    (inherit python-fenics-dolfin)
+    (name "fenics")))
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Tue, 16 Oct 2018 18:32:01 GMT) Full text and rfc822 format available.

Message #38 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Cc: 33059 <at> debbugs.gnu.org
Subject: Re: [bug#33059] [PATCH 04/10] gnu: Add python-fenics-dijitso.
Date: Tue, 16 Oct 2018 21:30:57 +0300
[Message part 1 (text/plain, inline)]
On Tue, Oct 16, 2018 at 10:31:18AM +0100, Paul Garlick wrote:

> +             (chdir "test")
> +             (invoke "./runtests.sh")
> +             (chdir "..")
> 
for this part you may want to look into 'with-directory-excursion'

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Wed, 17 Oct 2018 09:10:03 GMT) Full text and rfc822 format available.

Message #41 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 33059 <at> debbugs.gnu.org
Subject: Re: [bug#33059] [PATCH 04/10] gnu: Add python-fenics-dijitso.
Date: Wed, 17 Oct 2018 10:09:49 +0100
Hi Efraim,

> > +             (chdir "test")
> > +             (invoke "./runtests.sh")
> > +             (chdir "..")
> > 
> for this part you may want to look into 'with-directory-excursion'

Thanks.  Will do.

In fact, in these patches there is a need to change directories a few
times, so I will unify the treatment throughout with 'with-directory-
excursion'.

Best regards,

Paul.




Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Fri, 19 Oct 2018 16:04:01 GMT) Full text and rfc822 format available.

Message #44 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Eric Bavier <ericbavier <at> centurylink.net>
To: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Cc: 33059 <at> debbugs.gnu.org
Subject: Re: [bug#33059] [PATCH 01/10] gnu: Add python-mpi4py.
Date: Fri, 19 Oct 2018 11:03:34 -0500
[Message part 1 (text/plain, inline)]
On Tue, 16 Oct 2018 10:31:15 +0100
Paul Garlick <pgarlick <at> tourbillion-technology.com> wrote:

> * gnu/packages/simulation.scm (python-mpi4py): New variable.
> ---
>  gnu/packages/simulation.scm | 45 ++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 44 insertions(+), 1 deletion(-)

I haven't done a proper review yet, but...  Would this package be better
put in (gnu packages mpi).  Same with the petsc4py and slepc4py, in
(gnu packages maths).

`~Eric
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Mon, 22 Oct 2018 08:53:02 GMT) Full text and rfc822 format available.

Message #47 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: Eric Bavier <ericbavier <at> centurylink.net>
Cc: 33059 <at> debbugs.gnu.org
Subject: Re: [bug#33059] [PATCH 01/10] gnu: Add python-mpi4py.
Date: Mon, 22 Oct 2018 09:51:52 +0100
Hi Eric,

> Would this package be better
> put in (gnu packages mpi).  Same with the petsc4py and slepc4py, in
> (gnu packages maths).

Yes, good idea.  These three dependencies are 'external', in the sense
that their development is independent of the FEniCS project.  They
could be used as dependencies of future packages that may not go in
(gnu packages simulation).

Also, the versions of petsc4py and slepc4py keep track of petsc and
slepc.  So version 3.9.1 of petsc4py, for example, depends on version
3.9 of petsc.  Keeping the package definitions near to each other in
the same module will be a useful 'aide memoire'.

I shall wait a little longer for any more comments, then move these
three definitions in the way you suggest and re-submit as 'v2'.
patches.

Best regards,

Paul.




Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Wed, 24 Oct 2018 21:45:02 GMT) Full text and rfc822 format available.

Message #50 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Cc: 33059 <at> debbugs.gnu.org
Subject: Re: [bug#33059] [PATCH 01/10] gnu: Add python-mpi4py.
Date: Wed, 24 Oct 2018 23:44:05 +0200
Hi Paul,

Paul Garlick <pgarlick <at> tourbillion-technology.com> skribis:

> * gnu/packages/simulation.scm (python-mpi4py): New variable.

I agree with Eric’s suggestion but otherwise LGTM.

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Wed, 24 Oct 2018 21:46:01 GMT) Full text and rfc822 format available.

Message #53 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Cc: 33059 <at> debbugs.gnu.org
Subject: Re: [bug#33059] [PATCH 02/10] gnu: Add python-petsc4py.
Date: Wed, 24 Oct 2018 23:45:41 +0200
Paul Garlick <pgarlick <at> tourbillion-technology.com> skribis:

> * gnu/packages/simulation.scm (python-petsc4py): New variable.

Should it be in maths.scm?  Your call! :-)

Apart from that it LGTM.

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Wed, 24 Oct 2018 21:47:03 GMT) Full text and rfc822 format available.

Message #56 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Cc: 33059 <at> debbugs.gnu.org
Subject: Re: [bug#33059] [PATCH 03/10] gnu: Add python-slepc4py.
Date: Wed, 24 Oct 2018 23:46:23 +0200
Paul Garlick <pgarlick <at> tourbillion-technology.com> skribis:

> * gnu/packages/simulation.scm (python-slepc4py): New variable.

LGTM.




Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Wed, 24 Oct 2018 21:49:02 GMT) Full text and rfc822 format available.

Message #59 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Cc: 33059 <at> debbugs.gnu.org
Subject: Re: [bug#33059] [PATCH 04/10] gnu: Add python-fenics-dijitso.
Date: Wed, 24 Oct 2018 23:48:07 +0200
Paul Garlick <pgarlick <at> tourbillion-technology.com> skribis:

> * gnu/packages/simulation.scm (python-fenics-dijitso): New varaible.

I agree with Efraim’s suggestion to use ‘with-directory-excursion’.

Nitpick:

> +      (home-page
> +      "https://bitbucket.org/fenics-project/dijitso/")

Indentation is off.

> +    (synopsis
> +      "Distributed just-in-time building of shared libraries")

Please keep ‘home-page’ and ‘synopsis’ on a single line each.

Otherwise LGTM, thanks!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Wed, 24 Oct 2018 21:53:01 GMT) Full text and rfc822 format available.

Message #62 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Cc: 33059 <at> debbugs.gnu.org
Subject: Re: [bug#33059] [PATCH 05/10] gnu: Add python-fenics-ufl.
Date: Wed, 24 Oct 2018 23:52:32 +0200
Paul Garlick <pgarlick <at> tourbillion-technology.com> skribis:

> * gnu/packages/simulation.scm (python-fenics-ufl): New variable.

[...]

> +             (chdir "test")
> +             (invoke "py.test")
> +             (chdir "..")

Also ‘with-directory-excursion’ here.

> +    (home-page
> +      "https://bitbucket.org/fenics-project/ufl/")

Single line please.  :-)

Otherwise LGTM!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Wed, 24 Oct 2018 21:54:01 GMT) Full text and rfc822 format available.

Message #65 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Cc: 33059 <at> debbugs.gnu.org
Subject: Re: [bug#33059] [PATCH 06/10] gnu: Add python-fenics-fiat.
Date: Wed, 24 Oct 2018 23:53:18 +0200
Paul Garlick <pgarlick <at> tourbillion-technology.com> skribis:

> * gnu/packages/simulation.scm (python-fenics-fiat): New variable.

[...]

> +             (chdir "test")
> +             (invoke "py.test" "unit/")
> +             (chdir "..")
> +             #t)))))
> +    (home-page
> +      "https://bitbucket.org/fenics-project/fiat/")

Same here, but otherwise LGTM.




Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Wed, 24 Oct 2018 21:56:02 GMT) Full text and rfc822 format available.

Message #68 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Cc: 33059 <at> debbugs.gnu.org
Subject: Re: [bug#33059] [PATCH 07/10] gnu: Add python-fenics-ffc.
Date: Wed, 24 Oct 2018 23:55:32 +0200
Paul Garlick <pgarlick <at> tourbillion-technology.com> skribis:

> * gnu/packages/simulation.scm (python-fenics-ffc): New variable.

[...]

> +             (chdir "test")
> +             ;; FIXME: the tests in subdirectory
> +             ;; 'unit/ufc/finite_element' require the ffc_factory
> +             ;; extension module.  This module, located in the 'libs'
> +             ;; subdirectory, needs to be built and made accessible
> +             ;; prior to running the tests.
> +             (invoke "py.test" "unit/" "--ignore=unit/ufc/")
> +             (chdir "uflacs")
> +             (invoke "py.test" "unit/")
> +             (chdir "../..")
> +             #t)))))
> +    (home-page
> +      "https://bitbucket.org/fenics-project/ffc/")

Same!  :-)




Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Wed, 24 Oct 2018 22:13:01 GMT) Full text and rfc822 format available.

Message #71 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Cc: 33059 <at> debbugs.gnu.org
Subject: Re: [bug#33059] [PATCH 08/10] gnu: Add fenics-dolfin.
Date: Thu, 25 Oct 2018 00:12:19 +0200
Paul Garlick <pgarlick <at> tourbillion-technology.com> skribis:

> * gnu/packages/simulation.scm (fenics-dolfin): New variable.

[...]

> +         (add-before 'configure 'pre-configure
> +           (lambda _
> +             (use-modules (ice-9 regex)
> +                          (ice-9 rdelim)
> +                          (guix build utils)
> +                          (rnrs io ports))

Please use #:modules instead of an inner ‘use-modules’ form (which may
or may not work in future Guile versions.)

> +             ;; Add extra include directories required by the unit tests.
> +             (with-atomic-file-replacement "test/unit/cpp/CMakeLists.txt"
> +               (let ((rx (make-regexp "target_link_libraries")))
> +                 (lambda (in out)
> +                   (let loop ()
> +                     (let ((line (read-line in 'concat)))
> +                       (if (eof-object? line)
> +                           #t
> +                           (begin
> +                             (display line out)
> +                             (when (regexp-exec rx line)
> +                               (display
> +                                 (string-append
> +                                  "target_include_directories("
> +                                  "unittests PRIVATE "
> +                                  "${DOLFIN_SOURCE_DIR} "
> +                                  "${DOLFIN_SOURCE_DIR}/dolfin "
> +                                  "${DOLFIN_BINARY_DIR})\n") out))
> +                             (loop))))))))

Could this be achieved with a single ‘substitute*’?  It looks like that
would be more compact.

Also, perhaps this should be done in a ‘snippet’?

> +             ;; Add extra include directories required by the demo tests.
> +             (with-atomic-file-replacement "demo/CMakeLists.txt"
> +               (let ((rx (make-regexp "find_package")))
> +                 (lambda (in out)
> +                   (let loop ()
> +                     (let ((line (read-line in 'concat)))
> +                       (if (eof-object? line)
> +                           #t
> +                           (begin
> +                             (display line out)
> +                             (when (regexp-exec rx line)
> +                               (display
> +                                 (string-append
> +                                  "include_directories("
> +                                  "${DOLFIN_SOURCE_DIR} "
> +                                  "${DOLFIN_SOURCE_DIR}/dolfin "
> +                                  "${DOLFIN_BINARY_DIR})\n") out))
> +                             (loop))))))))))

Same question here.

> +             (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 "

Could we avoid listing all the files here?  I’m thinking about something
like ‘scandir’ + ‘delete’.

> +    ;; The source code files for the DOLFIN C++ library are licensed under the
> +    ;; GNU Lesser General Public License, version 3 or later, with the
> +    ;; following exceptions:
> +    ;;
> +    ;; bsd-2:         cmake/modules/FindAMD.cmake
> +    ;;                cmake/modules/FindBLASHeader.cmake
> +    ;;                cmake/modules/FindCHOLMOD.cmake
> +    ;;                cmake/modules/FindEigen3.cmake
> +    ;;                cmake/modules/FindMPFR.cmake
> +    ;;                cmake/modules/FindNumPy.cmake
> +    ;;                cmake/modules/FindPETSc.cmake
> +    ;;                cmake/modules/FindPETSc4py.cmake
> +    ;;                cmake/modules/FindParMETIS.cmake
> +    ;;                cmake/modules/FindSCOTCH.cmake
> +    ;;                cmake/modules/FindSLEPc.cmake
> +    ;;                cmake/modules/FindSLEPc4py.cmake
> +    ;;                cmake/modules/FindSphinx.cmake
> +    ;;                cmake/modules/FindSUNDIALS.cmake
> +    ;;                cmake/modules/FindUFC.cmake
> +    ;;
> +    ;; bsd-3:         cmake/modules/FindBLAS.cmake
> +    ;;                cmake/modules/FindLAPACK.cmake
> +    ;;                cmake/modules/FindMPI.cmake
> +    ;;
> +    ;; public-domain: dolfin/geometry/predicates.cpp
> +    ;;                dolfin/geometry/predicates.h
> +    ;;
> +    ;; zlib:          dolfin/io/base64.cpp
> +    ;;                dolfin/io/base64.h
> +    ;;
> +    ;; expat:         dolfin/io/pugiconfig.hpp
> +    ;;                dolfin/io/pugixml.cpp
> +    ;;                dolfin/io/pugixml.hpp
> +    ;;
> +    ;; boost1.0:      test/unit/cpp/catch/catch.hpp

Thanks for the detailed licensing review!

IMO we don’t need to list the license of the .cmake files, which are
just build files (likewise, we usually ignore M4 files and shell scripts
found in Autotools-based projects.)

I wonder if we could use our ‘catch’ package and remove ‘catch.hpp’.

That’s it!




Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Wed, 24 Oct 2018 22:16:01 GMT) Full text and rfc822 format available.

Message #74 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Cc: 33059 <at> debbugs.gnu.org
Subject: Re: [bug#33059] [PATCH 09/10] gnu: Add python-fenics-dolfin.
Date: Thu, 25 Oct 2018 00:15:04 +0200
Paul Garlick <pgarlick <at> tourbillion-technology.com> skribis:

> * gnu/packages/simulation.scm (python-fenics-dolfin): New variable.

[...]

> +           (lambda _
> +             (use-modules (ice-9 regex)
> +                          (ice-9 rdelim)
> +                          (guix build utils)
> +                          (rnrs io ports))

Rather #:modules.

> +             ;; Exclude tests that require meshes supplied by git-lfs.
> +             (with-atomic-file-replacement "demo/test.py"
> +               (let ((rx (make-regexp "stem !")))
> +                 (lambda (in out)
> +                   (let loop ()

Same question as before about using ‘substitute*’.

> +             (chdir "../demo")
> +             ;; Check demos.
> +             (invoke "python" "generate-demo-files.py")
> +             (and (invoke "python" "-m" "pytest" "-v" "test.py")
> +                  (invoke "python" "-m" "pytest" "-v" "test.py"
> +                          "--mpiexec=mpiexec" "--num-proc=3"))
> +             (chdir "..")

Rather ‘with-directory-excursion’.

> +    (home-page
> +      "https://bitbucket.org/fenics-project/dolfin/")
> +    (synopsis
> +      "High-level problem solving environment for differential equations")

Single line.  :-)




Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Wed, 24 Oct 2018 22:19:02 GMT) Full text and rfc822 format available.

Message #77 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Cc: 33059 <at> debbugs.gnu.org
Subject: Re: [bug#33059] [PATCH 10/10] gnu: Add fenics.
Date: Thu, 25 Oct 2018 00:17:46 +0200
Paul Garlick <pgarlick <at> tourbillion-technology.com> skribis:

> * gnu/packages/simulation.scm (fenics): New variable.

[...]

> +;; The FEniCS Project.
> +(define-public fenics
> +  (package
> +    (inherit python-fenics-dolfin)
> +    (name "fenics")))

Would it make sense to simply rename “python-fenics-dolfin” to “fenics”?

I don’t know about Eric but for myself I don’t have anything to add.

Perhaps you can prepare a v2?

Thank you for the big patch series!

Ludo’.




Added tag(s) moreinfo. Request was from ludo <at> gnu.org (Ludovic Courtès) to control <at> debbugs.gnu.org. (Thu, 08 Nov 2018 09:24:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Mon, 12 Nov 2018 16:03:02 GMT) Full text and rfc822 format available.

Message #82 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 33059 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>,
 Eric Bavier <ericbavier <at> centurylink.net>,
 Ludovic Courtès <ludo <at> gnu.org>
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH v2 0/9] Add the FEniCS Project, v2 patches
Date: Mon, 12 Nov 2018 16:00:32 +0000
Hi Efraim, Hi Eric, Hi Ludo,

Thank you for your comments on the patch series for the FEniCS Project
packages.  I have been able to make changes to address all of the
suggestions with one exception, noted below.

The main differences between the original and v2 patches are:

i) python-mpi4py is now part of (gnu packages mpi)
ii) python-petsc4py is now part of (gnu packages maths)
iii) python-slepc4py is now part of (gnu packages maths)
iv) temporary directory changes use 'with-directory-excursion'
v) 'substitute*' is used in preference to 'with-atomic-file-replacement'
vi) the Guix 'catch' package is used in preference to the bundled version
vii) the 'python-fenics-dolfin' package has been renamed 'fenics'
viii) the 'fenics' package has an updated home-page and synopsis

The remaining suggestion was in the 'fenics-dolfin' package:

> +                   (string-append
> +                    "set(CTEST_CUSTOM_TESTS_IGNORE "
> +                    "demo_bcs_serial "
> +                    "demo_bcs_mpi "
> +                    "demo_eigenvalue_serial "
> +                    "demo_eigenvalue_mpi "
> +                    "demo_navier-stokes_serial "

> Could we avoid listing all the files here?

I tried a few ideas to avoid listing the demos to ignore.  These are the ones
with the 'git-lfs' links.  However, this proved to be awkward.

The source code lists the demos that cmake expects to be present.  So, one
may either make a list of demos to ignore (as in the original patch) or delete
the same members from a list to include (plus delete the subdirectories
themselves).  Simply deleting the subdirectories from the build directory does
not work.  Since they exist as Makefile targets they are re-created by the
'make demos' step.

I think the original method is preferable.  An advantage is that users may
readily access the demos if they are using Guix on a host system that has
a git-lfs package available.

Best regards,

Paul.


Paul Garlick (9):
  gnu: Add python-mpi4py.
  gnu: Add python-petsc4py.
  gnu: Add python-slepc4py.
  gnu: Add python-fenics-dijitso.
  gnu: Add python-fenics-ufl.
  gnu: Add python-fenics-fiat.
  gnu: Add python-fenics-ffc.
  gnu: Add fenics-dolfin.
  gnu: Add fenics.

 gnu/packages/maths.scm      |  72 +++++++
 gnu/packages/mpi.scm        |  42 ++++
 gnu/packages/simulation.scm | 490 +++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 603 insertions(+), 1 deletion(-)

-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Mon, 12 Nov 2018 16:04:01 GMT) Full text and rfc822 format available.

Message #85 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 33059 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>,
 Eric Bavier <ericbavier <at> centurylink.net>,
 Ludovic Courtès <ludo <at> gnu.org>
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH v2 1/9] gnu: Add python-mpi4py.
Date: Mon, 12 Nov 2018 16:00:33 +0000
* gnu/packages/mpi.scm (python-mpi4py): New variable.
---
 gnu/packages/mpi.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index fc8aade..f08a7f5 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2017 Dave Love <fx <at> gnu.org>
 ;;; Copyright © 2017 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me <at> tobias.gr>
+;;; Copyright © 2018 Paul Garlick <pgarlick <at> tourbillion-technology.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29,6 +30,7 @@
   #:use-module (guix download)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages linux)
@@ -263,3 +265,43 @@ only provides @code{MPI_THREAD_FUNNELED}.")))
      ;; in the build environment than the package wants while testing.
      (setenv "OMPI_MCA_rmaps_base_oversubscribe" "yes")
      #t))
+
+(define-public python-mpi4py
+  (package
+    (name "python-mpi4py")
+    (version "3.0.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "mpi4py" version))
+        (sha256
+          (base32
+            "1mzgd26dfv4vwbci8gq77ss9f0x26i9aqzq9b9vs9ndxhlnv0mxl"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'build 'mpi-setup
+           ,%openmpi-setup)
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; Skip BaseTestSpawn class (causes error 'ompi_dpm_dyn_init()
+             ;; failed --> Returned "Unreachable"' in chroot environment).
+             (substitute* "test/test_spawn.py"
+               (("unittest.skipMPI\\('openmpi\\(<3.0.0\\)'\\)")
+                "unittest.skipMPI('openmpi')"))
+             #t)))))
+    (inputs
+     `(("openmpi" ,openmpi)))
+    (home-page "https://bitbucket.org/mpi4py/mpi4py/")
+    (synopsis "Python bindings for the Message Passing Interface standard")
+    (description "MPI for Python (mpi4py) provides bindings of the Message
+Passing Interface (MPI) standard for the Python programming language, allowing
+any Python program to exploit multiple processors.
+
+mpi4py is constructed on top of the MPI-1/MPI-2 specification and provides an
+object oriented interface which closely follows MPI-2 C++ bindings.  It
+supports point-to-point and collective communications of any picklable Python
+object as well as optimized communications of Python objects (such as NumPy
+arrays) that expose a buffer interface.")
+    (license bsd-3)))
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Mon, 12 Nov 2018 16:04:02 GMT) Full text and rfc822 format available.

Message #88 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 33059 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>,
 Eric Bavier <ericbavier <at> centurylink.net>,
 Ludovic Courtès <ludo <at> gnu.org>
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH v2 2/9] gnu: Add python-petsc4py.
Date: Mon, 12 Nov 2018 16:00:34 +0000
* gnu/packages/maths.scm (python-petsc4py): New variable.
---
 gnu/packages/maths.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 0d040bf..e36a574 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1808,6 +1808,41 @@ scientific applications modeled by partial differential equations.")
            ,@(delete "--with-mpi=0" ,cf)))))
     (synopsis "Library to solve PDEs (with complex scalars and MPI support)")))
 
+(define-public python-petsc4py
+  (package
+    (name "python-petsc4py")
+    (version "3.9.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "petsc4py" version))
+        (sha256
+          (base32
+            "1f8zd1ac9irsgkyqmzq30d9kl10fy1nh6zk312dhs43g449fkkhc"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'pre-build
+           (lambda _
+             ;; Define path to PETSc installation.
+             (setenv "PETSC_DIR" (assoc-ref %build-inputs "petsc"))
+             #t))
+         (add-before 'check 'mpi-setup
+           ,%openmpi-setup))))
+    (inputs
+     `(("petsc" ,petsc-openmpi)
+       ("python-numpy" ,python-numpy)))
+    (home-page "https://bitbucket.org/petsc/petsc4py/")
+    (synopsis "Python bindings for PETSc")
+    (description "PETSc, the Portable, Extensible Toolkit for
+Scientific Computation, is a suite of data structures and routines for
+the scalable (parallel) solution of scientific applications modeled by
+partial differential equations.  It employs the MPI standard for all
+message-passing communication.  @code{petsc4py} provides Python
+bindings to almost all functions of PETSc.")
+    (license license:bsd-3)))
+
 (define-public python-kiwisolver
   (package
     (name "python-kiwisolver")
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Mon, 12 Nov 2018 16:04:02 GMT) Full text and rfc822 format available.

Message #91 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 33059 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>,
 Eric Bavier <ericbavier <at> centurylink.net>,
 Ludovic Courtès <ludo <at> gnu.org>
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH v2 3/9] gnu: Add python-slepc4py.
Date: Mon, 12 Nov 2018 16:00:35 +0000
* gnu/packages/maths.scm (python-slepc4py): New variable.
---
 gnu/packages/maths.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index e36a574..b1cddfd 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1974,6 +1974,43 @@ arising after the discretization of partial differential equations.")
        ,@(alist-delete "petsc" (package-propagated-inputs slepc-openmpi))))
     (synopsis "Scalable library for eigenproblems (with complex scalars and MPI support)")))
 
+(define-public python-slepc4py
+  (package
+    (name "python-slepc4py")
+    (version "3.9.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "slepc4py" version))
+        (sha256
+          (base32
+            "02xr0vndgibgkz3rgprqk05n3mk5mpgqw550sr4681vcsgz4zvb7"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'pre-build
+           (lambda _
+             ;; Define path to PETSc installation.
+             (setenv "PETSC_DIR" (assoc-ref %build-inputs "petsc"))
+             ;; Define path to SLEPc installation.
+             (setenv "SLEPC_DIR" (assoc-ref %build-inputs "slepc"))
+             #t))
+         (add-before 'check 'mpi-setup
+           ,%openmpi-setup))))
+    (inputs
+     `(("python-numpy" ,python-numpy)
+       ("python-petsc4py" ,python-petsc4py)
+       ("slepc" ,slepc-openmpi)))
+    (home-page "https://bitbucket.org/slepc/slepc4py/")
+    (synopsis "Python bindings for SLEPc")
+    (description "SLEPc, the Scalable Library for Eigenvalue Problem
+Computations, is based on PETSc, the Portable, Extensible Toolkit for
+Scientific Computation.  It employs the MPI standard for all
+message-passing communication.  @code{slepc4py} provides Python
+bindings to almost all functions of SLEPc.")
+    (license license:bsd-3)))
+
 (define-public mumps
   (package
     (name "mumps")
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Mon, 12 Nov 2018 16:04:03 GMT) Full text and rfc822 format available.

Message #94 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 33059 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>,
 Eric Bavier <ericbavier <at> centurylink.net>,
 Ludovic Courtès <ludo <at> gnu.org>
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH v2 4/9] gnu: Add python-fenics-dijitso.
Date: Mon, 12 Nov 2018 16:00:36 +0000
* gnu/packages/simulation.scm (python-fenics-dijitso): New varaible.
---
 gnu/packages/simulation.scm | 51 ++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 50 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index a5b661e..86b1aba 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017 Paul Garlick <pgarlick <at> tourbillion-technology.com>
+;;; Copyright © 2017, 2018 Paul Garlick <pgarlick <at> tourbillion-technology.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,6 +22,7 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
+  #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages gettext)
@@ -35,6 +36,7 @@
   #:use-module (gnu packages mpi)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages version-control)
@@ -43,6 +45,7 @@
   #:use-module (guix download)
   #:use-module (guix build utils)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system python)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils)
@@ -221,3 +224,49 @@ with gas/liquid interfaces.  Large problems may be split into smaller, connected
 problems for efficient solution on parallel systems.")
     (license license:gpl3+)
     (home-page "https://openfoam.org")))
+
+(define-public python-fenics-dijitso
+  (package
+    (name "python-fenics-dijitso")
+    (version "2018.1.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "fenics-dijitso" version))
+        (sha256
+          (base32
+            "1qax2f52qsjbd1h5lk5i5shp448qlakxabjjybrfc1w823p0yql9"))))
+    (build-system python-build-system)
+    (inputs
+     `(("openmpi" ,openmpi)
+       ("python-numpy" ,python-numpy)))
+    (native-inputs
+     `(("python-pytest-cov" ,python-pytest-cov)))
+    (propagated-inputs
+     `(("python-mpi4py" ,python-mpi4py)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'build 'mpi-setup
+           ,%openmpi-setup)
+         (replace 'check
+           (lambda _
+             (setenv "HOME" "/tmp")
+             (setenv "PYTHONPATH"
+                     (string-append (getcwd) ":" (getenv "PYTHONPATH")))
+             (with-directory-excursion "test"
+               (invoke "./runtests.sh"))
+             #t)))))
+    (home-page "https://bitbucket.org/fenics-project/dijitso/")
+    (synopsis "Distributed just-in-time building of shared libraries")
+    (description
+      "Dijitso provides a core component of the @code{FEniCS} framework,
+namely the just-in-time compilation of C++ code that is generated from
+Python modules.  It is called from within a C++ library, using ctypes
+to import the dynamic shared library directly.
+
+As long as the compiled code can provide a simple factory function to
+a class implementing a predefined C++ interface, there is no limit to
+the complexity of that interface.  Parallel support depends on the
+@code{mpi4py} interface.")
+    (license license:lgpl3+)))
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Mon, 12 Nov 2018 16:04:03 GMT) Full text and rfc822 format available.

Message #97 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 33059 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>,
 Eric Bavier <ericbavier <at> centurylink.net>,
 Ludovic Courtès <ludo <at> gnu.org>
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH v2 5/9] gnu: Add python-fenics-ufl.
Date: Mon, 12 Nov 2018 16:00:37 +0000
* gnu/packages/simulation.scm (python-fenics-ufl): New variable.
---
 gnu/packages/simulation.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 86b1aba..7165fb5 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -270,3 +270,40 @@ a class implementing a predefined C++ interface, there is no limit to
 the complexity of that interface.  Parallel support depends on the
 @code{mpi4py} interface.")
     (license license:lgpl3+)))
+
+(define-public python-fenics-ufl
+  (package
+    (name "python-fenics-ufl")
+    (version "2018.1.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "fenics-ufl" version))
+        (sha256
+          (base32
+            "1fq8yc86s1s3c8c0b1rc2vf265q0hrkzg57100fg1nghcz0p4vla"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python-numpy" ,python-numpy)))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (setenv "PYTHONPATH"
+                     (string-append (getcwd) ":" (getenv "PYTHONPATH")))
+             (with-directory-excursion "test"
+               (invoke "py.test"))
+             #t)))))
+    (home-page "https://bitbucket.org/fenics-project/ufl/")
+    (synopsis "Unified language for form-compilers")
+    (description "The Unified Form Language (UFL) is a domain specific
+language for declaration of finite element discretizations of
+variational forms.  More precisely, it defines a flexible interface
+for choosing finite element spaces and defining expressions for weak
+forms in a notation close to mathematical notation.
+
+UFL is part of the FEniCS Project.")
+    (license license:lgpl3+)))
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Mon, 12 Nov 2018 16:04:04 GMT) Full text and rfc822 format available.

Message #100 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 33059 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>,
 Eric Bavier <ericbavier <at> centurylink.net>,
 Ludovic Courtès <ludo <at> gnu.org>
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH v2 6/9] gnu: Add python-fenics-fiat.
Date: Mon, 12 Nov 2018 16:00:38 +0000
* gnu/packages/simulation.scm (python-fenics-fiat): New variable.
---
 gnu/packages/simulation.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 7165fb5..ecdb2b2 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -307,3 +307,45 @@ forms in a notation close to mathematical notation.
 
 UFL is part of the FEniCS Project.")
     (license license:lgpl3+)))
+
+(define-public python-fenics-fiat
+  (package
+    (name "python-fenics-fiat")
+    (version "2018.1.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "fenics-fiat" version))
+        (sha256
+          (base32
+            "0fmjd93r6bwf6xs8csw86qzphrnr66xwv7f372w59gmq8mg6rljc"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (propagated-inputs
+     `(("python-numpy" ,python-numpy)
+       ("python-sympy" ,python-sympy)))
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (setenv "PYTHONPATH"
+                     (string-append (getcwd) ":" (getenv "PYTHONPATH")))
+             (with-directory-excursion "test"
+               (invoke "py.test" "unit/"))
+             #t)))))
+    (home-page "https://bitbucket.org/fenics-project/fiat/")
+    (synopsis "Tabulation of finite element function spaces")
+    (description
+      "The FInite element Automatic Tabulator (FIAT) supports
+generation of arbitrary order instances of the Lagrange elements on
+lines, triangles, and tetrahedra.  It is also capable of generating
+arbitrary order instances of Jacobi-type quadrature rules on the same
+element shapes.  Further, H(div) and H(curl) conforming finite element
+spaces such as the families of Raviart-Thomas, Brezzi-Douglas-Marini
+and Nedelec are supported on triangles and tetrahedra.  Upcoming
+versions will also support Hermite and nonconforming elements.
+
+FIAT is part of the FEniCS Project.")
+    (license license:lgpl3+)))
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Mon, 12 Nov 2018 16:04:05 GMT) Full text and rfc822 format available.

Message #103 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 33059 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>,
 Eric Bavier <ericbavier <at> centurylink.net>,
 Ludovic Courtès <ludo <at> gnu.org>
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH v2 7/9] gnu: Add python-fenics-ffc.
Date: Mon, 12 Nov 2018 16:00:39 +0000
* gnu/packages/simulation.scm (python-fenics-ffc): New variable.
---
 gnu/packages/simulation.scm | 52 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index ecdb2b2..d1a5e46 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -349,3 +349,55 @@ versions will also support Hermite and nonconforming elements.
 
 FIAT is part of the FEniCS Project.")
     (license license:lgpl3+)))
+
+(define-public python-fenics-ffc
+  (package
+    (name "python-fenics-ffc")
+    (version "2018.1.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "fenics-ffc" version))
+        (sha256
+          (base32
+            "1b2ia5vlkw298x7rf0k2p3ihlpwkwgc98p3s6sbpds3hqmfrzdz9"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (propagated-inputs
+     `(("python-fenics-dijitso" ,python-fenics-dijitso)
+       ("python-fenics-fiat" ,python-fenics-fiat)
+       ("python-fenics-ufl" ,python-fenics-ufl)))
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (setenv "HOME" (getcwd))
+             (setenv "PYTHONPATH"
+                     (string-append (getcwd) ":" (getenv "PYTHONPATH")))
+             (with-directory-excursion "test"
+               ;; FIXME: the tests in subdirectory
+               ;; 'unit/ufc/finite_element' require the ffc_factory
+               ;; extension module.  This module, located in the 'libs'
+               ;; subdirectory, needs to be built and made accessible
+               ;; prior to running the tests.
+               (invoke "py.test" "unit/" "--ignore=unit/ufc/")
+               (with-directory-excursion "uflacs"
+                 (invoke "py.test" "unit/")))
+             #t)))))
+    (home-page "https://bitbucket.org/fenics-project/ffc/")
+    (synopsis "Compiler for finite element variational forms")
+    (description "The FEniCS Form Compiler (FFC) is a compiler for
+finite element variational forms.  From a high-level description of
+the form, it generates efficient low-level C++ code that can be used
+to assemble the corresponding discrete operator (tensor).  In
+particular, a bilinear form may be assembled into a matrix and a
+linear form may be assembled into a vector.  FFC may be used either
+from the command line (by invoking the @code{ffc} command) or as a
+Python module (@code{import ffc}).
+
+FFC is part of the FEniCS Project.")
+    ;; There are two files released with a public domain licence;
+    ;; ufc.h and ufc_geometry.h, in subdirectory 'ffc/backends/ufc'.
+    (license (list license:public-domain license:lgpl3+))))
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Mon, 12 Nov 2018 16:04:05 GMT) Full text and rfc822 format available.

Message #106 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 33059 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>,
 Eric Bavier <ericbavier <at> centurylink.net>,
 Ludovic Courtès <ludo <at> gnu.org>
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH v2 8/9] gnu: Add fenics-dolfin.
Date: Mon, 12 Nov 2018 16:00:40 +0000
* gnu/packages/simulation.scm (fenics-dolfin): New variable.
---
 gnu/packages/simulation.scm | 191 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 191 insertions(+)

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index d1a5e46..bd139d3 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -18,11 +18,13 @@
 
 (define-module (gnu packages simulation)
   #:use-module (gnu packages)
+  #:use-module (gnu packages algebra)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages gettext)
@@ -36,6 +38,7 @@
   #:use-module (gnu packages mpi)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages tls)
@@ -44,6 +47,7 @@
   #:use-module (gnu packages xorg)
   #:use-module (guix download)
   #:use-module (guix build utils)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module ((guix licenses) #:prefix license:)
@@ -401,3 +405,190 @@ FFC is part of the FEniCS Project.")
     ;; There are two files released with a public domain licence;
     ;; ufc.h and ufc_geometry.h, in subdirectory 'ffc/backends/ufc'.
     (license (list license:public-domain license:lgpl3+))))
+
+(define-public fenics-dolfin
+  (package
+    (name "fenics-dolfin")
+    (version "2018.1.0.post1")
+    (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
+           "12zkk8j3xsg6l8p0ggwsl03084vlcivw4h99b7z9kndg7k89b3ya"))
+        (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 <catch.hpp>\n"))
+            (substitute* "test/unit/cpp/CMakeLists.txt"
+              ;; Add extra include directories required by the unit tests.
+              (("(^target_link_libraries.*)" line)
+               (string-append line "\n"
+                              "target_include_directories("
+                              "unittests PRIVATE "
+                              "${DOLFIN_SOURCE_DIR} "
+                              "${DOLFIN_SOURCE_DIR}/dolfin "
+                              "${DOLFIN_BINARY_DIR})\n"))
+              (("(^set\\(CATCH_INCLUDE_DIR ).*(/catch\\))" _ front back)
+               (string-append front
+                              "$ENV{CATCH_DIR}"
+                              "/include" back "\n")))
+            (substitute* "demo/CMakeLists.txt"
+              ;; Add extra include directories required by the demo tests.
+              (("(^#find_package.*)" line)
+               (string-append line "\n"
+                              "include_directories("
+                              "${DOLFIN_SOURCE_DIR} "
+                              "${DOLFIN_SOURCE_DIR}/dolfin "
+                              "${DOLFIN_BINARY_DIR})\n")))
+            #t))))
+    (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)))
+    (native-inputs
+     `(("catch" ,catch-framework2)
+       ("pkg-config" ,pkg-config)))
+    (propagated-inputs
+     `(("ffc" ,python-fenics-ffc)
+       ("petsc" ,petsc-openmpi)
+       ("slepc" ,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"))
+             #t))
+         (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.
+             ;;
+             ;; Two other serial tests fail and are skipped.
+             ;; i) demo_stokes-iterative_serial,
+             ;;   The MPI_Comm_rank() function was called before MPI_INIT was
+             ;;   invoked
+             ;; ii) 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_serial "
+                    "demo_stokes-iterative_mpi "
+                    ")\n") port)))
+             #t))
+         (replace 'check
+           (lambda _
+             (and (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
+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
+system on a computational mesh.  A compact syntax, similar to
+mathematical notation, is made available for defining function spaces
+and expressing variational forms.  Interfaces to specialized matrix
+solvers are provided for solving the resultant linear systems.
+
+@code{fenics-dolfin} is part of the FEniCS project.  It is the C++
+user interface to the FEniCS core components and external libraries.")
+    ;; The source code for the DOLFIN C++ library is licensed under the
+    ;; GNU Lesser General Public License, version 3 or later, with the
+    ;; following exceptions:
+    ;;
+    ;; public-domain: dolfin/geometry/predicates.cpp
+    ;;                dolfin/geometry/predicates.h
+    ;;
+    ;; zlib:          dolfin/io/base64.cpp
+    ;;                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
+                   license:lgpl3+))))
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Mon, 12 Nov 2018 16:04:05 GMT) Full text and rfc822 format available.

Message #109 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 33059 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>,
 Eric Bavier <ericbavier <at> centurylink.net>,
 Ludovic Courtès <ludo <at> gnu.org>
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH v2 9/9] gnu: Add fenics.
Date: Mon, 12 Nov 2018 16:00:41 +0000
* gnu/packages/simulation.scm (fenics): New variable.
---
 gnu/packages/simulation.scm | 117 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 117 insertions(+)

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index bd139d3..6144e23 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -592,3 +592,120 @@ user interface to the FEniCS core components and external libraries.")
                    license:zlib
                    license:expat
                    license:lgpl3+))))
+
+(define-public fenics
+  (package (inherit fenics-dolfin)
+    (name "fenics")
+    (build-system python-build-system)
+    (inputs
+     `(("pybind11" ,pybind11)
+       ("python-matplotlib" ,python-matplotlib)
+       ,@(alist-delete "python" (package-inputs fenics-dolfin))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("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)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (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")
+             #t))
+         (add-after 'build 'mpi-setup
+           ,%openmpi-setup)
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; Exclude tests that require meshes supplied by git-lfs.
+             (substitute* "demo/test.py"
+               (("(.*stem !.*)" line)
+                (string-append
+                 line "\n"
+                 "excludeList = [\n"
+                 "'multimesh-quadrature', \n"
+                 "'multimesh-marking', \n"
+                 "'mixed-poisson-sphere', \n"
+                 "'mesh-quality', \n"
+                 "'lift-drag', \n"
+                 "'elastodynamics', \n"
+                 "'dg-advection-diffusion', \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))
+             (setenv "PYTHONPATH"
+                     (string-append
+                      (getcwd) "/build/lib.linux-x86_64-"
+                      ,(version-major+minor (package-version python)) ":"
+                      (getenv "PYTHONPATH")))
+             ;; Restrict OpenBLAS to MPI-only in preference to MPI+OpenMP.
+             (setenv "OPENBLAS_NUM_THREADS" "1")
+             #t))
+         (replace 'check
+           (lambda _
+             (with-directory-excursion "test"
+               ;; Note: The test test_snes_set_from_options() in the file
+               ;; unit/nls/test_PETScSNES_solver.py fails and is ignored.
+               (and (invoke "py.test" "unit" "--ignore"
+                            "unit/nls/test_PETScSNES_solver.py")
+                    (invoke "mpirun" "-np" "3" "python" "-B" "-m"
+                            "pytest" "unit" "--ignore"
+                            "unit/nls/test_PETScSNES_solver.py")))
+             (with-directory-excursion "demo"
+               ;; Check demos.
+               (invoke "python" "generate-demo-files.py")
+               (and (invoke "python" "-m" "pytest" "-v" "test.py")
+                    (invoke "python" "-m" "pytest" "-v" "test.py"
+                            "--mpiexec=mpiexec" "--num-proc=3")))
+             #t))
+         (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)$"))))
+             #t)))))
+    (home-page "https://fenicsproject.org/")
+    (synopsis "High-level environment for solving differential equations")
+    (description
+      "@code{fenics} is a computing platform for solving general classes of
+problems that involve differential equations.  @code{fenics} facilitates
+access to efficient methods for dealing with ordinary differential
+equations (ODEs) and partial differential equations (PDEs).  Systems of
+equations such as these are commonly encountered in areas of engineering,
+mathematics and the physical sciences.  It is particularly well-suited to
+problems that can be solved using the Finite Element Method (FEM).
+
+@code{fenics} is the top level of the set of packages that are developed
+within the FEniCS project.  It provides the python user interface to the
+FEniCS core components and external libraries.")
+    (license license:lgpl3+)))
-- 
1.8.3.1





Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Wed, 14 Nov 2018 20:40:02 GMT) Full text and rfc822 format available.

Notification sent to Paul Garlick <pgarlick <at> tourbillion-technology.com>:
bug acknowledged by developer. (Wed, 14 Nov 2018 20:40:02 GMT) Full text and rfc822 format available.

Message #114 received at 33059-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Cc: Eric Bavier <ericbavier <at> centurylink.net>, 33059-done <at> debbugs.gnu.org,
 Efraim Flashner <efraim <at> flashner.co.il>
Subject: Re: [PATCH v2 0/9] Add the FEniCS Project, v2 patches
Date: Wed, 14 Nov 2018 21:38:48 +0100
Hello Paul and all,

Paul Garlick <pgarlick <at> tourbillion-technology.com> skribis:

> Hi Efraim, Hi Eric, Hi Ludo,
>
> Thank you for your comments on the patch series for the FEniCS Project
> packages.  I have been able to make changes to address all of the
> suggestions with one exception, noted below.
>
> The main differences between the original and v2 patches are:
>
> i) python-mpi4py is now part of (gnu packages mpi)
> ii) python-petsc4py is now part of (gnu packages maths)
> iii) python-slepc4py is now part of (gnu packages maths)
> iv) temporary directory changes use 'with-directory-excursion'
> v) 'substitute*' is used in preference to 'with-atomic-file-replacement'
> vi) the Guix 'catch' package is used in preference to the bundled version
> vii) the 'python-fenics-dolfin' package has been renamed 'fenics'
> viii) the 'fenics' package has an updated home-page and synopsis
>
> The remaining suggestion was in the 'fenics-dolfin' package:
>
>> +                   (string-append
>> +                    "set(CTEST_CUSTOM_TESTS_IGNORE "
>> +                    "demo_bcs_serial "
>> +                    "demo_bcs_mpi "
>> +                    "demo_eigenvalue_serial "
>> +                    "demo_eigenvalue_mpi "
>> +                    "demo_navier-stokes_serial "
>
>> Could we avoid listing all the files here?
>
> I tried a few ideas to avoid listing the demos to ignore.  These are the ones
> with the 'git-lfs' links.  However, this proved to be awkward.
>
> The source code lists the demos that cmake expects to be present.  So, one
> may either make a list of demos to ignore (as in the original patch) or delete
> the same members from a list to include (plus delete the subdirectories
> themselves).  Simply deleting the subdirectories from the build directory does
> not work.  Since they exist as Makefile targets they are re-created by the
> 'make demos' step.
>
> I think the original method is preferable.  An advantage is that users may
> readily access the demos if they are using Guix on a host system that has
> a git-lfs package available.

Thanks a lot for taking the time to address the comments we made on this
patch series.  I’ve applied the whole series on ‘master’; everything
lints and builds for me on x86_64-linux (there are new versions of the
PETSc and SLEPSc bindings available, BTW.)

Thank you!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#33059; Package guix-patches. (Wed, 14 Nov 2018 21:12:01 GMT) Full text and rfc822 format available.

Message #117 received at 33059 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Cc: 33059 <at> debbugs.gnu.org, Efraim Flashner <efraim <at> flashner.co.il>,
 Eric Bavier <ericbavier <at> centurylink.net>
Subject: Re: [PATCH v2 6/9] gnu: Add python-fenics-fiat.
Date: Wed, 14 Nov 2018 22:11:20 +0100
Paul Garlick <pgarlick <at> tourbillion-technology.com> skribis:

> * gnu/packages/simulation.scm (python-fenics-fiat): New variable.

Apparently this one has a test failure on i686-linux:

  https://berlin.guixsd.org/build/623722/log/raw

It’s not uncommon for numerical software tests to break on 32-bit
platforms.  Perhaps you could ask upstream what they think about it?

Thanks,
Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 13 Dec 2018 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 129 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.