From: Paul Garlick <pgarlick@tourbillion-technology.com>
To: 33059@debbugs.gnu.org
Cc: Paul Garlick <pgarlick@tourbillion-technology.com>
Subject: [bug#33059] [PATCH 08/10] gnu: Add fenics-dolfin.
Date: Tue, 16 Oct 2018 10:31:22 +0100 [thread overview]
Message-ID: <1539682284-6446-8-git-send-email-pgarlick@tourbillion-technology.com> (raw)
In-Reply-To: <1539682284-6446-1-git-send-email-pgarlick@tourbillion-technology.com>
* 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
next prev parent reply other threads:[~2018-10-16 9:33 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-16 9:17 [bug#33059] [PATCH 00/10] Add the FEniCS Project Paul Garlick
2018-10-16 9:31 ` [bug#33059] [PATCH 01/10] gnu: Add python-mpi4py Paul Garlick
2018-10-16 9:31 ` [bug#33059] [PATCH 02/10] gnu: Add python-petsc4py Paul Garlick
2018-10-24 21:45 ` Ludovic Courtès
2018-10-16 9:31 ` [bug#33059] [PATCH 03/10] gnu: Add python-slepc4py Paul Garlick
2018-10-24 21:46 ` Ludovic Courtès
2018-10-16 9:31 ` [bug#33059] [PATCH 04/10] gnu: Add python-fenics-dijitso Paul Garlick
2018-10-16 18:30 ` Efraim Flashner
2018-10-17 9:09 ` Paul Garlick
2018-10-24 21:48 ` Ludovic Courtès
2018-10-16 9:31 ` [bug#33059] [PATCH 05/10] gnu: Add python-fenics-ufl Paul Garlick
2018-10-24 21:52 ` Ludovic Courtès
2018-10-16 9:31 ` [bug#33059] [PATCH 06/10] gnu: Add python-fenics-fiat Paul Garlick
2018-10-24 21:53 ` Ludovic Courtès
2018-10-16 9:31 ` [bug#33059] [PATCH 07/10] gnu: Add python-fenics-ffc Paul Garlick
2018-10-24 21:55 ` Ludovic Courtès
2018-10-16 9:31 ` Paul Garlick [this message]
2018-10-24 22:12 ` [bug#33059] [PATCH 08/10] gnu: Add fenics-dolfin Ludovic Courtès
2018-10-16 9:31 ` [bug#33059] [PATCH 09/10] gnu: Add python-fenics-dolfin Paul Garlick
2018-10-24 22:15 ` Ludovic Courtès
2018-10-16 9:31 ` [bug#33059] [PATCH 10/10] gnu: Add fenics Paul Garlick
2018-10-24 22:17 ` Ludovic Courtès
2018-11-12 16:00 ` [bug#33059] [PATCH v2 0/9] Add the FEniCS Project, v2 patches Paul Garlick
2018-11-12 16:00 ` [bug#33059] [PATCH v2 1/9] gnu: Add python-mpi4py Paul Garlick
2018-11-12 16:00 ` [bug#33059] [PATCH v2 2/9] gnu: Add python-petsc4py Paul Garlick
2018-11-12 16:00 ` [bug#33059] [PATCH v2 3/9] gnu: Add python-slepc4py Paul Garlick
2018-11-12 16:00 ` [bug#33059] [PATCH v2 4/9] gnu: Add python-fenics-dijitso Paul Garlick
2018-11-12 16:00 ` [bug#33059] [PATCH v2 5/9] gnu: Add python-fenics-ufl Paul Garlick
2018-11-12 16:00 ` [bug#33059] [PATCH v2 6/9] gnu: Add python-fenics-fiat Paul Garlick
2018-11-14 21:11 ` Ludovic Courtès
2018-11-12 16:00 ` [bug#33059] [PATCH v2 7/9] gnu: Add python-fenics-ffc Paul Garlick
2018-11-12 16:00 ` [bug#33059] [PATCH v2 8/9] gnu: Add fenics-dolfin Paul Garlick
2018-11-12 16:00 ` [bug#33059] [PATCH v2 9/9] gnu: Add fenics Paul Garlick
2018-11-14 20:38 ` bug#33059: [PATCH v2 0/9] Add the FEniCS Project, v2 patches Ludovic Courtès
2018-10-19 16:03 ` [bug#33059] [PATCH 01/10] gnu: Add python-mpi4py Eric Bavier
2018-10-22 8:51 ` Paul Garlick
2018-10-24 21:44 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1539682284-6446-8-git-send-email-pgarlick@tourbillion-technology.com \
--to=pgarlick@tourbillion-technology.com \
--cc=33059@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).