From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCLit-0006Rb-Aj for guix-patches@gnu.org; Tue, 16 Oct 2018 05:33:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCLio-0004RL-Kg for guix-patches@gnu.org; Tue, 16 Oct 2018 05:33:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:47566) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gCLio-0004RA-Fp for guix-patches@gnu.org; Tue, 16 Oct 2018 05:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gCLio-0003JX-AK for guix-patches@gnu.org; Tue, 16 Oct 2018 05:33:02 -0400 Subject: [bug#33059] [PATCH 01/10] gnu: Add python-mpi4py. References: <1539681428-6399-1-git-send-email-pgarlick@tourbillion-technology.com> In-Reply-To: <1539681428-6399-1-git-send-email-pgarlick@tourbillion-technology.com> Resent-Message-ID: From: Paul Garlick Date: Tue, 16 Oct 2018 10:31:15 +0100 Message-Id: <1539682284-6446-1-git-send-email-pgarlick@tourbillion-technology.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 33059@debbugs.gnu.org Cc: Paul Garlick * 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 +;;; Copyright © 2017, 2018 Paul Garlick ;;; ;;; 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