gnu: slepc: Set origin file-name.
[jackhill/guix/guix.git] / gnu / packages / mpi.scm
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>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
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.
13 ;;;
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.
18 ;;;
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/>.
21
22 (define-module (gnu packages mpi)
23 #:use-module (guix packages)
24 #:use-module ((guix licenses)
25 #:hide (expat))
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))
40
41 (define-public hwloc
42 (package
43 (name "hwloc")
44 (version "1.11.1")
45 (source (origin
46 (method url-fetch)
47 (uri (string-append "http://www.open-mpi.org/software/hwloc/v"
48 (version-major+minor version)
49 "/downloads/hwloc-" version ".tar.bz2"))
50 (sha256
51 (base32
52 "03vcr9f98z45xfkk34x376mfrwyi7ff4ay60gvn4v95sqihl0qa8"))))
53 (build-system gnu-build-system)
54 (inputs
55 `(("libx11" ,libx11)
56 ("cairo" ,cairo)
57 ("ncurses" ,ncurses)
58 ("expat" ,expat)
59 ,@(if (not (string-prefix? "armhf"
60 (or (%current-target-system)
61 (%current-system))))
62 `(("numactl" ,numactl))
63 '())))
64 (propagated-inputs
65 ;; hwloc.pc lists it in 'Requires.private'.
66 `(("libpciaccess" ,libpciaccess)))
67 (native-inputs
68 `(("pkg-config" ,pkg-config)))
69 (arguments
70 `(#:phases
71 (modify-phases %standard-phases
72 (add-after
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"))
80 (("-lnuma" lib)
81 (string-append "-L" numa "/lib " lib)))))))))
82 (home-page "http://www.open-mpi.org/projects/hwloc/")
83 (synopsis "Abstraction of hardware architectures")
84 (description
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.
92
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.")
96 (license bsd-3)))
97
98 (define-public openmpi
99 (package
100 (name "openmpi")
101 (version "1.10.1")
102 (source
103 (origin
104 (method url-fetch)
105 (uri (string-append "http://www.open-mpi.org/software/ompi/v"
106 (version-major+minor version)
107 "/downloads/openmpi-" version ".tar.bz2"))
108 (sha256
109 (base32
110 "14p4px9a3qzjc22lnl6braxrcrmd9rgmy7fh4qpanawn2pgfq6br"))))
111 (build-system gnu-build-system)
112 (inputs
113 `(("hwloc" ,hwloc)
114 ("gfortran" ,gfortran)
115 ("valgrind" ,valgrind)))
116 (native-inputs
117 `(("pkg-config" ,pkg-config)
118 ("perl" ,perl)))
119 (arguments
120 `(#:configure-flags `("--enable-static"
121
122 "--enable-mpi-thread-multiple"
123 "--enable-builtin-atomics"
124
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")
134 (description
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
142 (license bsd-2)))