From fb0e3709280639fce796edc0f3fa8e0d1a6de46d Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Thu, 1 May 2014 12:16:16 -0500 Subject: gnu: Add OpenMPI * gnu/packages/mpi.scm: New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. --- gnu/packages/mpi.scm | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 gnu/packages/mpi.scm (limited to 'gnu/packages/mpi.scm') diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm new file mode 100644 index 0000000000..14626acbb0 --- /dev/null +++ b/gnu/packages/mpi.scm @@ -0,0 +1,66 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2014 Eric Bavier +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages mpi) + #:use-module (guix packages) + #:use-module (guix licenses) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages gcc) + #:use-module (srfi srfi-1)) + +(define-public openmpi + (package + (name "openmpi") + (version "1.8.1") + (source + (origin + (method url-fetch) + (uri (string-append "http://www.open-mpi.org/softawre/ompi/v" + (string-join (take (string-split version #\.) 2) + ".") + "/downloads/openmpi-" version ".tar.bz2")) + (sha256 + (base32 + "13z1q69f3qwmmhpglarfjminfy2yw4rfqr9jydjk5507q3mjf50p")))) + (build-system gnu-build-system) + (propagated-inputs + `(("gfortran" ,gfortran-4.8))) + (arguments + `(#:configure-flags '("--enable-static" + "--enable-oshmem" + ;; Thread support causes some applications to hang + ;; "--enable-event-thread-support" + ;; "--enable-opal-multi-threads" + ;; "--enable-orte-progress-threads" + ;; "--enable-mpi-thread-multiple" + "--enable-mpi-ext=all" + "--with-devel-headers"))) + (home-page "http://www.open-mpi.org") + (synopsis "Open source MPI-2 implementation") + (description + "The Open MPI Project is an open source MPI-2 implementation that is +developed and maintained by a consortium of academic, research, and industry +partners. Open MPI is therefore able to combine the expertise, technologies, +and resources from all across the High Performance Computing community in +order to build the best MPI library available. Open MPI offers advantages for +system and software vendors, application developers and computer science +researchers.") + ;; See file://LICENSE + (license bsd-2))) -- cgit 1.4.1 From 8ede638c4b84d5e26844fdc5726992ed78244cfd Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Thu, 8 May 2014 14:48:59 -0500 Subject: gnu: openmpi: Avoid "open source" verbiage * gnu/packages/mpi.scm (openmpi)[synopsis,description]: Remove mention of "open source". --- gnu/packages/mpi.scm | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'gnu/packages/mpi.scm') diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm index 14626acbb0..eae5722078 100644 --- a/gnu/packages/mpi.scm +++ b/gnu/packages/mpi.scm @@ -53,14 +53,13 @@ "--enable-mpi-ext=all" "--with-devel-headers"))) (home-page "http://www.open-mpi.org") - (synopsis "Open source MPI-2 implementation") + (synopsis "MPI-2 implementation") (description - "The Open MPI Project is an open source MPI-2 implementation that is -developed and maintained by a consortium of academic, research, and industry -partners. Open MPI is therefore able to combine the expertise, technologies, -and resources from all across the High Performance Computing community in -order to build the best MPI library available. Open MPI offers advantages for -system and software vendors, application developers and computer science -researchers.") + "The Open MPI Project is an MPI-2 implementation that is developed and +maintained by a consortium of academic, research, and industry partners. Open +MPI is therefore able to combine the expertise, technologies, and resources +from all across the High Performance Computing community in order to build the +best MPI library available. Open MPI offers advantages for system and +software vendors, application developers and computer science researchers.") ;; See file://LICENSE (license bsd-2))) -- cgit 1.4.1 From 85a84cbd83b90d132035c3b20456bd241e0ef86d Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Thu, 8 May 2014 17:06:46 -0500 Subject: gnu: openmpi: Fix typo in download uri * gnu/packages/mpi.scm (openmpi)[origin]: Fix typo. --- gnu/packages/mpi.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/mpi.scm') diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm index eae5722078..eea218799d 100644 --- a/gnu/packages/mpi.scm +++ b/gnu/packages/mpi.scm @@ -32,7 +32,7 @@ (source (origin (method url-fetch) - (uri (string-append "http://www.open-mpi.org/softawre/ompi/v" + (uri (string-append "http://www.open-mpi.org/software/ompi/v" (string-join (take (string-split version #\.) 2) ".") "/downloads/openmpi-" version ".tar.bz2")) -- cgit 1.4.1 From 2b0d560a3f41d9973c53ac03cf3531f9e4cab0ad Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 9 May 2014 15:49:08 +0200 Subject: gnu: Add hwloc. * gnu/packages/mpi.scm (hwloc): New variable. (openmpi): Add TODO comment. --- gnu/packages/mpi.scm | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) (limited to 'gnu/packages/mpi.scm') diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm index eea218799d..071229214b 100644 --- a/gnu/packages/mpi.scm +++ b/gnu/packages/mpi.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 Eric Bavier +;;; Copyright © 2014 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,13 +19,66 @@ (define-module (gnu packages mpi) #:use-module (guix packages) - #:use-module (guix licenses) + #:use-module ((guix licenses) + #:hide (expat)) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages gcc) + #:use-module (gnu packages linux) + #:use-module (gnu packages pciutils) + #:use-module (gnu packages xorg) + #:use-module (gnu packages gtk) + #:use-module (gnu packages xml) + #:use-module (gnu packages ncurses) + #:use-module (gnu packages pkg-config) #:use-module (srfi srfi-1)) +(define-public hwloc + (package + (name "hwloc") + (version "1.9") + (source (origin + (method url-fetch) + (uri (string-append "http://www.open-mpi.org/software/hwloc/v" + version "/downloads/hwloc-" + version ".tar.bz2")) + (sha256 + (base32 + "0zjgiili2a8v63s8ly3a8qp8ibxv1jw3zbgm7diic3w1qgqiza14")))) + (build-system gnu-build-system) + (arguments + ;; Enable libpci support, which effectively makes hwloc GPLv2+. + '(#:configure-flags '("--enable-libpci"))) + (inputs + `(("numactl" ,numactl) + ("libx11" ,libx11) + ("cairo" ,cairo) + ("ncurses" ,ncurses) + ("expat" ,expat))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (propagated-inputs + ;; 'hwloc.pc' refers to libpci, hence the propagation. + `(("pciutils" ,pciutils))) + (home-page "http://www.open-mpi.org/projects/hwloc/") + (synopsis "Abstraction of hardware architectures") + (description + "hwloc provides a portable abstraction (across OS, +versions, architectures, ...) of the hierarchical topology of modern +architectures, including NUMA memory nodes, sockets, shared caches, cores and +simultaneous multithreading. It also gathers various attributes such as cache +and memory information. It primarily aims at helping high-performance +computing applications with gathering information about the hardware so as to +exploit it accordingly and efficiently. + +hwloc may display the topology in multiple convenient formats. It also offers +a powerful programming interface to gather information about the hardware, +bind processes, and much more.") + + ;; But see above about linking against libpci. + (license bsd-3))) + (define-public openmpi (package (name "openmpi") @@ -40,6 +94,7 @@ (base32 "13z1q69f3qwmmhpglarfjminfy2yw4rfqr9jydjk5507q3mjf50p")))) (build-system gnu-build-system) + ;; TODO: Use our hwloc instead of the bundled one. (propagated-inputs `(("gfortran" ,gfortran-4.8))) (arguments -- cgit 1.4.1 From 5b527256ee8d280ec6f5d445522beb120005ad84 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Mon, 12 May 2014 16:43:04 -0500 Subject: gnu: openmpi: Use our hwloc. * gnu/packages/mpi.scm (hwloc): Propagate numactl. (openmpi)[inputs]: Add hwloc. [native-inputs]: Add pkg-config. [argument]: Add hwloc configure flags. --- gnu/packages/mpi.scm | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'gnu/packages/mpi.scm') diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm index 071229214b..37b7858469 100644 --- a/gnu/packages/mpi.scm +++ b/gnu/packages/mpi.scm @@ -51,16 +51,16 @@ ;; Enable libpci support, which effectively makes hwloc GPLv2+. '(#:configure-flags '("--enable-libpci"))) (inputs - `(("numactl" ,numactl) - ("libx11" ,libx11) + `(("libx11" ,libx11) ("cairo" ,cairo) ("ncurses" ,ncurses) ("expat" ,expat))) (native-inputs `(("pkg-config" ,pkg-config))) (propagated-inputs - ;; 'hwloc.pc' refers to libpci, hence the propagation. - `(("pciutils" ,pciutils))) + ;; 'hwloc.pc' refers to libpci and libnuma, hence the propagation. + `(("numactl" ,numactl) + ("pciutils" ,pciutils))) (home-page "http://www.open-mpi.org/projects/hwloc/") (synopsis "Abstraction of hardware architectures") (description @@ -94,11 +94,14 @@ bind processes, and much more.") (base32 "13z1q69f3qwmmhpglarfjminfy2yw4rfqr9jydjk5507q3mjf50p")))) (build-system gnu-build-system) - ;; TODO: Use our hwloc instead of the bundled one. + (inputs + `(("hwloc" ,hwloc))) + (native-inputs + `(("pkg-config" ,pkg-config))) (propagated-inputs `(("gfortran" ,gfortran-4.8))) (arguments - `(#:configure-flags '("--enable-static" + `(#:configure-flags `("--enable-static" "--enable-oshmem" ;; Thread support causes some applications to hang ;; "--enable-event-thread-support" @@ -106,7 +109,9 @@ bind processes, and much more.") ;; "--enable-orte-progress-threads" ;; "--enable-mpi-thread-multiple" "--enable-mpi-ext=all" - "--with-devel-headers"))) + "--with-devel-headers" + ,(string-append "--with-hwloc=" + (assoc-ref %build-inputs "hwloc"))))) (home-page "http://www.open-mpi.org") (synopsis "MPI-2 implementation") (description -- cgit 1.4.1 From 1691b4cdc619caf47700eef22023066985afb877 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Sun, 18 May 2014 11:08:17 -0500 Subject: gnu: openmpi: Add memchecker support. * gnu/packages/mpi.scm (openmpi) [inputs]: Add valgrind. Unpropagate gfortran. [arguments]: Add configure flags for memchecker. --- gnu/packages/mpi.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gnu/packages/mpi.scm') diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm index 37b7858469..e7919bc436 100644 --- a/gnu/packages/mpi.scm +++ b/gnu/packages/mpi.scm @@ -32,6 +32,7 @@ #:use-module (gnu packages xml) #:use-module (gnu packages ncurses) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages valgrind) #:use-module (srfi srfi-1)) (define-public hwloc @@ -95,11 +96,11 @@ bind processes, and much more.") "13z1q69f3qwmmhpglarfjminfy2yw4rfqr9jydjk5507q3mjf50p")))) (build-system gnu-build-system) (inputs - `(("hwloc" ,hwloc))) + `(("hwloc" ,hwloc) + ("gfortran" ,gfortran-4.8) + ("valgrind" ,valgrind))) (native-inputs `(("pkg-config" ,pkg-config))) - (propagated-inputs - `(("gfortran" ,gfortran-4.8))) (arguments `(#:configure-flags `("--enable-static" "--enable-oshmem" @@ -110,6 +111,10 @@ bind processes, and much more.") ;; "--enable-mpi-thread-multiple" "--enable-mpi-ext=all" "--with-devel-headers" + "--enable-debug" + "--enable-memchecker" + ,(string-append "--with-valgrind=" + (assoc-ref %build-inputs "valgrind")) ,(string-append "--with-hwloc=" (assoc-ref %build-inputs "hwloc"))))) (home-page "http://www.open-mpi.org") -- cgit 1.4.1