gnu: intel-mpi-benchmarks: Merge with "imb-openmpi".

* gnu/packages/mpi.scm (intel-mpi-benchmarks): Remove.
* gnu/packages/benchmark.scm (imb): Rename to...
(intel-mpi-benchmarks): ... this.  Change 'name'.  Update to 2019.3.
[arguments]: Remove 'build phase.  Rewrite 'install phase.  Pass
 #:parallel-build? and #:make-flags.
(intel-mpi-benchmarks/openmpi): New variable.
(imb-openmpi): Rewrite in terms of 'deprecated-package'.
This commit is contained in:
Ludovic Courtès 2019-12-20 22:35:12 +01:00
parent f94f9d67e6
commit 2d6f68aa3b
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 35 additions and 78 deletions

View file

@ -5,6 +5,7 @@
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2019 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com> ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com>
;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -118,18 +119,22 @@ (define-public fio
license:public-domain)))) license:public-domain))))
;; Parameterized in anticipation of m(va)pich support ;; Parameterized in anticipation of m(va)pich support
(define (imb mpi) (define (intel-mpi-benchmarks mpi)
(package (package
(name (string-append "imb-" (package-name mpi))) (name (string-append "intel-mpi-benchmarks"
(version "2019.1") (if (string=? (package-name mpi) "openmpi")
(source ""
(origin (string-append "-" (package-name mpi)))))
(version "2019.3")
(source (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
(url "https://github.com/intel/mpi-benchmarks.git") (url "https://github.com/intel/mpi-benchmarks.git")
(commit (string-append "v" version)))) (commit (string-append "IMB-v" version))))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (base32 "18hfdyvl5i172gadiq9si1qxif5rvic0lifxpbrr7s59ylg8f9c4")))) (sha256
(base32
"0si5xi6ilhd3w0gbsg124589pvp094hvf366rvjjb9pi7pdk5p4i"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs (inputs
`(("mpi" ,mpi))) `(("mpi" ,mpi)))
@ -138,25 +143,25 @@ (define (imb mpi)
(modify-phases %standard-phases (modify-phases %standard-phases
(delete 'configure) (delete 'configure)
(delete 'check) (delete 'check)
(replace 'build
(lambda* (#:key inputs #:allow-other-keys)
(let ((mpi-home (assoc-ref inputs "mpi")))
;; Override default parallelism
(substitute* "Makefile"
(("make -j[[:digit:]]+")
(format #f "make -j~d" (parallel-job-count))))
(invoke "make" "SHELL=sh" "CC=mpicc" "CXX=mpic++"))))
(replace 'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(define (benchmark? file stat)
(and (string-prefix? "IMB-" (basename file))
(executable-file? file)))
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))) (bin (string-append out "/bin")))
(for-each (for-each (lambda (file)
(lambda (file)
(install-file file bin)) (install-file file bin))
'("IMB-IO" "IMB-EXT" "IMB-MPI1" "IMB-NBC" "IMB-RMA" "IMB-MT"))) (find-files "." benchmark?))
#t))))) #t))))
;; The makefile doesn't express all the dependencies, it seems.
#:parallel-build? #t
#:make-flags '("CC=mpicc" "CXX=mpicxx")))
(home-page "https://software.intel.com/en-us/articles/intel-mpi-benchmarks") (home-page "https://software.intel.com/en-us/articles/intel-mpi-benchmarks")
(synopsis "Intel MPI Benchmarks") (synopsis "Benchmarks for the Message Passing Interface (MPI)")
(description (description
"This package provides benchmarks for implementations of the @dfn{Message "This package provides benchmarks for implementations of the @dfn{Message
Passing Interface} (MPI). It contains MPI performance measurements for Passing Interface} (MPI). It contains MPI performance measurements for
@ -172,7 +177,11 @@ (define (imb mpi)
@end itemize") @end itemize")
(license license:cpl1.0))) (license license:cpl1.0)))
(define-public imb-openmpi (imb openmpi)) (define-public intel-mpi-benchmarks/openmpi
(intel-mpi-benchmarks openmpi))
(define-public imb-openmpi
(deprecated-package "imb-openmpi" intel-mpi-benchmarks/openmpi))
(define-public multitime (define-public multitime
(package (package

View file

@ -29,7 +29,6 @@ (define-module (gnu packages mpi)
#:use-module ((guix licenses) #:use-module ((guix licenses)
#:hide (expat)) #:hide (expat))
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix utils) #:use-module (guix utils)
#:use-module (guix deprecation) #:use-module (guix deprecation)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
@ -357,57 +356,6 @@ (define-public %openmpi-setup
(setenv "UCX_LOG_LEVEL" "error") (setenv "UCX_LOG_LEVEL" "error")
#t)) #t))
(define-public intel-mpi-benchmarks
(package
(name "intel-mpi-benchmarks")
(version "2019.3")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/intel/mpi-benchmarks.git")
(commit (string-append "IMB-v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"0si5xi6ilhd3w0gbsg124589pvp094hvf366rvjjb9pi7pdk5p4i"))))
(build-system gnu-build-system)
(arguments
'(#:phases (modify-phases %standard-phases
(delete 'configure)
(delete 'check)
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(define (benchmark? file stat)
(and (string-prefix? "IMB-" (basename file))
(executable-file? file)))
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(for-each (lambda (file)
(install-file file bin))
(find-files "." benchmark?))
#t))))
;; The makefile doesn't express all the dependencies, it seems.
#:parallel-build? #t
#:make-flags (list (string-append "CC="
(assoc-ref %build-inputs "openmpi")
"/bin/mpicc")
(string-append "CXX="
(assoc-ref %build-inputs "openmpi")
"/bin/mpicxx"))))
(inputs
`(("openmpi" ,openmpi)))
(home-page "https://github.com/intel/mpi-benchmarks")
(synopsis "Benchmarks for the Message Passing Interface (MPI)")
(description
"Intel MPI Benchmarks (IMB) provides a set of elementary benchmarks that
conform with versions 1, 2, and 3 of the Message Passing Interface (MPI).")
(license
(fsf-free "https://directory.fsf.org/wiki/License:CPL-1.0"
"https://www.gnu.org/licenses/license-list.html#CommonPublicLicense10"))))
(define-public python-mpi4py (define-public python-mpi4py
(package (package
(name "python-mpi4py") (name "python-mpi4py")