2014-05-01 19:16:16 +02:00
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2015-06-15 00:11:00 +02:00
|
|
|
;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
|
2017-05-11 14:36:12 +02:00
|
|
|
;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
2014-10-19 04:03:42 +02:00
|
|
|
;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
|
2016-02-03 21:05:51 +01:00
|
|
|
;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
|
2017-07-23 23:00:21 +02:00
|
|
|
;;; Copyright © 2017 Dave Love <fx@gnu.org>
|
2014-05-01 19:16:16 +02:00
|
|
|
;;;
|
|
|
|
;;; 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 <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
(define-module (gnu packages mpi)
|
|
|
|
#:use-module (guix packages)
|
2014-05-09 15:49:08 +02:00
|
|
|
#:use-module ((guix licenses)
|
|
|
|
#:hide (expat))
|
2014-05-01 19:16:16 +02:00
|
|
|
#:use-module (guix download)
|
2014-10-19 04:03:42 +02:00
|
|
|
#:use-module (guix utils)
|
2014-05-01 19:16:16 +02:00
|
|
|
#:use-module (guix build-system gnu)
|
|
|
|
#:use-module (gnu packages)
|
|
|
|
#:use-module (gnu packages gcc)
|
2014-05-09 15:49:08 +02:00
|
|
|
#: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)
|
2015-06-15 09:24:14 +02:00
|
|
|
#:use-module (gnu packages perl)
|
2014-05-09 15:49:08 +02:00
|
|
|
#:use-module (gnu packages ncurses)
|
|
|
|
#:use-module (gnu packages pkg-config)
|
2014-10-19 04:03:42 +02:00
|
|
|
#:use-module (gnu packages valgrind))
|
2014-05-01 19:16:16 +02:00
|
|
|
|
2014-05-09 15:49:08 +02:00
|
|
|
(define-public hwloc
|
|
|
|
(package
|
|
|
|
(name "hwloc")
|
2017-05-11 14:36:12 +02:00
|
|
|
(version "1.11.7")
|
2014-05-09 15:49:08 +02:00
|
|
|
(source (origin
|
|
|
|
(method url-fetch)
|
2016-04-14 10:19:40 +02:00
|
|
|
(uri (string-append "https://www.open-mpi.org/software/hwloc/v"
|
2015-06-15 00:11:00 +02:00
|
|
|
(version-major+minor version)
|
|
|
|
"/downloads/hwloc-" version ".tar.bz2"))
|
2014-05-09 15:49:08 +02:00
|
|
|
(sha256
|
|
|
|
(base32
|
2017-05-11 14:36:12 +02:00
|
|
|
"0acph1mf7588hfx8ds26ncr6nw5fd9x92adm11fwin7f93i10sdb"))))
|
2014-05-09 15:49:08 +02:00
|
|
|
(build-system gnu-build-system)
|
2017-06-30 17:55:41 +02:00
|
|
|
(outputs '("out" ;'lstopo' & co., depends on Cairo, libx11, etc.
|
|
|
|
"lib" ;small closure
|
|
|
|
"debug"))
|
2014-05-09 15:49:08 +02:00
|
|
|
(inputs
|
2014-05-12 23:43:04 +02:00
|
|
|
`(("libx11" ,libx11)
|
2014-05-09 15:49:08 +02:00
|
|
|
("cairo" ,cairo)
|
|
|
|
("ncurses" ,ncurses)
|
2016-02-03 21:05:51 +01:00
|
|
|
("expat" ,expat)
|
|
|
|
,@(if (not (string-prefix? "armhf"
|
|
|
|
(or (%current-target-system)
|
|
|
|
(%current-system))))
|
|
|
|
`(("numactl" ,numactl))
|
|
|
|
'())))
|
2015-08-24 00:28:36 +02:00
|
|
|
(propagated-inputs
|
|
|
|
;; hwloc.pc lists it in 'Requires.private'.
|
|
|
|
`(("libpciaccess" ,libpciaccess)))
|
2014-05-09 15:49:08 +02:00
|
|
|
(native-inputs
|
|
|
|
`(("pkg-config" ,pkg-config)))
|
2015-06-17 11:17:10 +02:00
|
|
|
(arguments
|
2017-06-30 17:31:03 +02:00
|
|
|
`(#:configure-flags '("--localstatedir=/var")
|
|
|
|
#:phases
|
2015-06-17 11:17:10 +02:00
|
|
|
(modify-phases %standard-phases
|
2017-06-30 17:55:41 +02:00
|
|
|
(add-after 'install 'refine-libnuma
|
|
|
|
;; Give -L arguments for libraries to avoid propagation
|
|
|
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
|
|
(let ((out (assoc-ref outputs "lib"))
|
|
|
|
(numa (assoc-ref inputs "numactl")))
|
|
|
|
(substitute* (map (lambda (f) (string-append out "/" f))
|
|
|
|
'("lib/pkgconfig/hwloc.pc" "lib/libhwloc.la"))
|
|
|
|
(("-lnuma" lib)
|
|
|
|
(string-append "-L" numa "/lib " lib))))))
|
|
|
|
(add-after 'install 'avoid-circular-references
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
(let ((lib (assoc-ref outputs "lib")))
|
|
|
|
;; Suppress the 'prefix=' and 'exec_prefix=' lines so that the
|
|
|
|
;; "lib" output doesn't refer to "out".
|
|
|
|
(substitute* (string-append lib "/lib/pkgconfig/hwloc.pc")
|
|
|
|
(("^.*prefix=.*$")
|
|
|
|
""))
|
|
|
|
#t))))))
|
2016-04-14 10:19:40 +02:00
|
|
|
(home-page "https://www.open-mpi.org/projects/hwloc/")
|
2014-05-09 15:49:08 +02:00
|
|
|
(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.")
|
|
|
|
(license bsd-3)))
|
|
|
|
|
2014-05-01 19:16:16 +02:00
|
|
|
(define-public openmpi
|
|
|
|
(package
|
|
|
|
(name "openmpi")
|
2017-07-23 23:00:21 +02:00
|
|
|
(version "1.10.7")
|
2014-05-01 19:16:16 +02:00
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
2016-07-08 19:15:38 +02:00
|
|
|
(uri (string-append "https://www.open-mpi.org/software/ompi/v"
|
2014-10-19 04:03:42 +02:00
|
|
|
(version-major+minor version)
|
2014-05-01 19:16:16 +02:00
|
|
|
"/downloads/openmpi-" version ".tar.bz2"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
2017-07-23 23:00:21 +02:00
|
|
|
"142s1vny9gllkq336yafxayjgcirj2jv0ddabj879jgya7hyr2d0"))))
|
2014-05-01 19:16:16 +02:00
|
|
|
(build-system gnu-build-system)
|
2017-07-27 10:46:52 +02:00
|
|
|
(outputs '("out" "static"))
|
2014-05-12 23:43:04 +02:00
|
|
|
(inputs
|
2017-06-30 17:55:41 +02:00
|
|
|
`(("hwloc" ,hwloc "lib")
|
2015-06-25 17:56:07 +02:00
|
|
|
("gfortran" ,gfortran)
|
2014-05-18 18:08:17 +02:00
|
|
|
("valgrind" ,valgrind)))
|
2014-05-12 23:43:04 +02:00
|
|
|
(native-inputs
|
2015-06-15 09:24:14 +02:00
|
|
|
`(("pkg-config" ,pkg-config)
|
|
|
|
("perl" ,perl)))
|
2014-05-01 19:16:16 +02:00
|
|
|
(arguments
|
2014-05-12 23:43:04 +02:00
|
|
|
`(#:configure-flags `("--enable-static"
|
2015-06-15 09:24:14 +02:00
|
|
|
|
|
|
|
"--enable-mpi-thread-multiple"
|
2015-11-20 00:51:39 +01:00
|
|
|
"--enable-builtin-atomics"
|
2015-06-15 09:24:14 +02:00
|
|
|
|
2014-05-01 19:16:16 +02:00
|
|
|
"--enable-mpi-ext=all"
|
2014-05-12 23:43:04 +02:00
|
|
|
"--with-devel-headers"
|
2014-05-18 18:08:17 +02:00
|
|
|
"--enable-memchecker"
|
2017-07-23 23:02:54 +02:00
|
|
|
"--with-sge"
|
2014-05-18 18:08:17 +02:00
|
|
|
,(string-append "--with-valgrind="
|
|
|
|
(assoc-ref %build-inputs "valgrind"))
|
2014-05-12 23:43:04 +02:00
|
|
|
,(string-append "--with-hwloc="
|
2016-07-08 23:00:07 +02:00
|
|
|
(assoc-ref %build-inputs "hwloc")))
|
|
|
|
#:phases (modify-phases %standard-phases
|
|
|
|
(add-before 'build 'scrub-timestamps ;reproducibility
|
|
|
|
(lambda _
|
|
|
|
(substitute* '("ompi/tools/ompi_info/param.c"
|
|
|
|
"orte/tools/orte-info/param.c"
|
|
|
|
"oshmem/tools/oshmem_info/param.c")
|
|
|
|
((".*(Built|Configured) on.*") ""))
|
|
|
|
#t))
|
|
|
|
(add-after 'install 'remove-logs ;reproducibility
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
(let ((out (assoc-ref outputs "out")))
|
|
|
|
(for-each delete-file (find-files out "config.log"))
|
2017-07-27 10:46:52 +02:00
|
|
|
#t)))
|
|
|
|
(add-after 'install 'move-static-libraries
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
;; Move 19 MiB of static libraries to 'static'.
|
|
|
|
(let* ((out (assoc-ref outputs "out"))
|
|
|
|
(static (assoc-ref outputs "static"))
|
|
|
|
(lib (string-append out "/lib"))
|
|
|
|
(slib (string-append static "/lib")))
|
|
|
|
(mkdir-p slib)
|
|
|
|
(for-each (lambda (file)
|
|
|
|
(rename-file
|
|
|
|
file
|
|
|
|
(string-append slib "/" (basename file))))
|
|
|
|
(find-files lib "\\.a$"))
|
2016-07-08 23:00:07 +02:00
|
|
|
#t))))))
|
2014-05-01 19:16:16 +02:00
|
|
|
(home-page "http://www.open-mpi.org")
|
2017-07-23 23:30:40 +02:00
|
|
|
(synopsis "MPI-3 implementation")
|
2014-05-01 19:16:16 +02:00
|
|
|
(description
|
2017-07-23 23:30:40 +02:00
|
|
|
"The Open MPI Project is an MPI-3 implementation that is developed and
|
2014-05-08 21:48:59 +02:00
|
|
|
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.")
|
2014-05-01 19:16:16 +02:00
|
|
|
;; See file://LICENSE
|
|
|
|
(license bsd-2)))
|