1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
3 ;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
5 ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
7 ;;; This file is part of GNU Guix.
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22 (define-module (gnu packages mpi)
23 #:use-module (guix packages)
24 #:use-module ((guix licenses)
26 #:use-module (guix download)
27 #:use-module (guix utils)
28 #:use-module (guix build-system gnu)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages gcc)
31 #:use-module (gnu packages linux)
32 #:use-module (gnu packages pciutils)
33 #:use-module (gnu packages xorg)
34 #:use-module (gnu packages gtk)
35 #:use-module (gnu packages xml)
36 #:use-module (gnu packages perl)
37 #:use-module (gnu packages ncurses)
38 #:use-module (gnu packages pkg-config)
39 #:use-module (gnu packages valgrind))
47 (uri (string-append "http://www.open-mpi.org/software/hwloc/v"
48 (version-major+minor version)
49 "/downloads/hwloc-" version ".tar.bz2"))
52 "03vcr9f98z45xfkk34x376mfrwyi7ff4ay60gvn4v95sqihl0qa8"))))
53 (build-system gnu-build-system)
59 ,@(if (not (string-prefix? "armhf"
60 (or (%current-target-system)
62 `(("numactl" ,numactl))
65 ;; hwloc.pc lists it in 'Requires.private'.
66 `(("libpciaccess" ,libpciaccess)))
68 `(("pkg-config" ,pkg-config)))
71 (modify-phases %standard-phases
73 'install 'refine-libnuma
74 ;; Give -L arguments for libraries to avoid propagation
75 (lambda* (#:key inputs outputs #:allow-other-keys)
76 (let ((out (assoc-ref outputs "out"))
77 (numa (assoc-ref inputs "numactl")))
78 (substitute* (map (lambda (f) (string-append out "/" f))
79 '("lib/pkgconfig/hwloc.pc" "lib/libhwloc.la"))
81 (string-append "-L" numa "/lib " lib)))))))))
82 (home-page "http://www.open-mpi.org/projects/hwloc/")
83 (synopsis "Abstraction of hardware architectures")
85 "hwloc provides a portable abstraction (across OS,
86 versions, architectures, ...) of the hierarchical topology of modern
87 architectures, including NUMA memory nodes, sockets, shared caches, cores and
88 simultaneous multithreading. It also gathers various attributes such as cache
89 and memory information. It primarily aims at helping high-performance
90 computing applications with gathering information about the hardware so as to
91 exploit it accordingly and efficiently.
93 hwloc may display the topology in multiple convenient formats. It also offers
94 a powerful programming interface to gather information about the hardware,
95 bind processes, and much more.")
98 (define-public openmpi
105 (uri (string-append "http://www.open-mpi.org/software/ompi/v"
106 (version-major+minor version)
107 "/downloads/openmpi-" version ".tar.bz2"))
110 "14p4px9a3qzjc22lnl6braxrcrmd9rgmy7fh4qpanawn2pgfq6br"))))
111 (build-system gnu-build-system)
114 ("gfortran" ,gfortran)
115 ("valgrind" ,valgrind)))
117 `(("pkg-config" ,pkg-config)
120 `(#:configure-flags `("--enable-static"
122 "--enable-mpi-thread-multiple"
123 "--enable-builtin-atomics"
125 "--enable-mpi-ext=all"
126 "--with-devel-headers"
127 "--enable-memchecker"
128 ,(string-append "--with-valgrind="
129 (assoc-ref %build-inputs "valgrind"))
130 ,(string-append "--with-hwloc="
131 (assoc-ref %build-inputs "hwloc")))))
132 (home-page "http://www.open-mpi.org")
133 (synopsis "MPI-2 implementation")
135 "The Open MPI Project is an MPI-2 implementation that is developed and
136 maintained by a consortium of academic, research, and industry partners. Open
137 MPI is therefore able to combine the expertise, technologies, and resources
138 from all across the High Performance Computing community in order to build the
139 best MPI library available. Open MPI offers advantages for system and
140 software vendors, application developers and computer science researchers.")
141 ;; See file://LICENSE