summaryrefslogtreecommitdiff
path: root/gnu/packages/mpi.scm
diff options
context:
space:
mode:
authorChristopher Baines <[email protected]>2023-03-02 10:37:28 +0000
committerChristopher Baines <[email protected]>2023-03-02 10:55:08 +0000
commit7df09ee0ab3e7962ef27859ce87e06a323059284 (patch)
treed81334f742ddcb9a1ee63961ca6410922980af1c /gnu/packages/mpi.scm
parent2ac51ec99b58b50c08ba719a8c7e9dba0330b065 (diff)
parentaf95f2d8f98eb2c8c64954bb2fd0b70838899174 (diff)
Merge remote-tracking branch 'savannah/master' into core-updates
Conflicts: gnu/local.mk gnu/packages/autotools.scm gnu/packages/cmake.scm gnu/packages/gnuzilla.scm gnu/packages/haskell.scm gnu/packages/pdf.scm gnu/packages/python-xyz.scm gnu/packages/samba.scm gnu/packages/tex.scm gnu/packages/tls.scm gnu/packages/wxwidgets.scm
Diffstat (limited to 'gnu/packages/mpi.scm')
-rw-r--r--gnu/packages/mpi.scm211
1 files changed, 110 insertions, 101 deletions
diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index 70b14c30b3..baef62616f 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -25,6 +25,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages mpi)
+ #:use-module (guix gexp)
#:use-module (guix packages)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix download)
@@ -53,8 +54,6 @@
#:use-module (ice-9 match))
(define-public hwloc-1
- ;; Note: For now we keep 1.x as the default because many packages have yet
- ;; to migrate to 2.0.
(package
(name "hwloc")
(version "1.11.13")
@@ -140,7 +139,6 @@ bind processes, and much more.")
(license license:bsd-3)))
(define-public hwloc-2
- ;; Note: 2.x isn't the default yet, see above.
(package
(inherit hwloc-1)
(version "2.9.0")
@@ -167,10 +165,19 @@ bind processes, and much more.")
(substitute* "tests/hwloc/linux-libnuma.c"
(("numa_available\\(\\)")
"-1"))))
- (add-before 'check 'skip-test-that-requires-/sys
+ (add-before 'check 'skip-tests-that-require-/sys
(lambda _
;; 'test-gather-topology.sh' requires /sys as of 2.9.0; skip it.
- (setenv "HWLOC_TEST_GATHER_TOPOLOGY" "0")))
+ (setenv "HWLOC_TEST_GATHER_TOPOLOGY" "0")
+
+ ;; 'hwloc_backends' also requires /sys on non-x86 systems, for
+ ;; which hwloc lacks a topology backend not reliant on the
+ ;; operating system; skip it also on these machines.
+ (substitute* "tests/hwloc/hwloc_backends.c"
+ ,@(if (not (target-x86?))
+ '((("putenv\\(\\(char \\*\\) \"HWLOC_L" all)
+ (string-append "exit (77);\n" all)))
+ '()))))
(add-before 'check 'skip-test-that-fails-on-qemu
(lambda _
;; Skip test that fails on emulated hardware due to QEMU bug:
@@ -191,13 +198,13 @@ bind processes, and much more.")
(version "4.1.4")
(source
(origin
- (method url-fetch)
- (uri (string-append "https://www.open-mpi.org/software/ompi/v"
- (version-major+minor version)
- "/downloads/openmpi-" version ".tar.bz2"))
- (sha256
- (base32 "03ckngrff1cl0l81vfvrfhp99rbgk7s0633kr1l468yibwbjx4cj"))
- (patches (search-patches "openmpi-mtl-priorities.patch"))))
+ (method url-fetch)
+ (uri (string-append "https://www.open-mpi.org/software/ompi/v"
+ (version-major+minor version)
+ "/downloads/openmpi-" version ".tar.bz2"))
+ (sha256
+ (base32 "03ckngrff1cl0l81vfvrfhp99rbgk7s0633kr1l468yibwbjx4cj"))
+ (patches (search-patches "openmpi-mtl-priorities.patch"))))
(properties
;; Tell the 'generic-html' updater to monitor this URL for updates.
@@ -228,68 +235,69 @@ bind processes, and much more.")
(list pkg-config perl))
(outputs '("out" "debug"))
(arguments
- `(#:configure-flags `("--enable-mpi-ext=affinity" ;cr doesn't work
- "--with-sge"
-
- ,@(if ,(package? (this-package-input "valgrind"))
- `("--enable-memchecker"
- "--with-valgrind")
- `("--without-valgrind"))
-
- "--with-hwloc=external"
- "--with-libevent"
-
- ;; Help 'orterun' and 'mpirun' find their tools
- ;; under $prefix by default.
- "--enable-mpirun-prefix-by-default"
-
- ;; InfiniBand support
- "--enable-openib-control-hdr-padding"
- "--enable-openib-dynamic-sl"
- "--enable-openib-udcm"
- "--enable-openib-rdmacm"
- "--enable-openib-rdmacm-ibaddr"
-
- ;; Enable support for SLURM's Process Manager
- ;; Interface (PMI).
- ,(string-append "--with-pmi="
- (assoc-ref %build-inputs "slurm")))
- #:phases (modify-phases %standard-phases
- ;; opensm is needed for InfiniBand support.
- (add-after 'unpack 'find-opensm-headers
- (lambda* (#:key inputs #:allow-other-keys)
- (setenv "C_INCLUDE_PATH"
- (search-input-directory inputs
- "/include/infiniband"))
- (setenv "CPLUS_INCLUDE_PATH"
- (search-input-directory inputs
- "/include/infiniband"))))
- (add-before 'build 'remove-absolute
- (lambda _
- ;; Remove compiler absolute file names (OPAL_FC_ABSOLUTE
- ;; etc.) to reduce the closure size. See
- ;; <https://lists.gnu.org/archive/html/guix-devel/2017-07/msg00388.html>
- ;; and
- ;; <https://www.mail-archive.com/[email protected]//msg31397.html>.
- (substitute* '("orte/tools/orte-info/param.c"
- "oshmem/tools/oshmem_info/param.c"
- "ompi/tools/ompi_info/param.c")
- (("_ABSOLUTE") ""))
- ;; Avoid valgrind (which pulls in gdb etc.).
- (substitute*
- '("./ompi/mca/io/romio321/src/io_romio321_component.c")
- (("MCA_io_romio321_COMPLETE_CONFIGURE_FLAGS")
- "\"[elided to reduce closure]\""))))
- (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.*") ""))))
- (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"))))))))
+ (list
+ #:configure-flags #~`("--enable-mpi-ext=affinity" ;cr doesn't work
+ "--with-sge"
+
+ #$@(if (package? (this-package-input "valgrind"))
+ #~("--enable-memchecker"
+ "--with-valgrind")
+ #~("--without-valgrind"))
+
+ "--with-hwloc=external"
+ "--with-libevent"
+
+ ;; Help 'orterun' and 'mpirun' find their tools
+ ;; under $prefix by default.
+ "--enable-mpirun-prefix-by-default"
+
+ ;; InfiniBand support
+ "--enable-openib-control-hdr-padding"
+ "--enable-openib-dynamic-sl"
+ "--enable-openib-udcm"
+ "--enable-openib-rdmacm"
+ "--enable-openib-rdmacm-ibaddr"
+
+ ;; Enable support for SLURM's Process Manager
+ ;; Interface (PMI).
+ ,(string-append "--with-pmi="
+ #$(this-package-input "slurm")))
+ #:phases #~(modify-phases %standard-phases
+ ;; opensm is needed for InfiniBand support.
+ (add-after 'unpack 'find-opensm-headers
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "C_INCLUDE_PATH"
+ (search-input-directory inputs
+ "/include/infiniband"))
+ (setenv "CPLUS_INCLUDE_PATH"
+ (search-input-directory inputs
+ "/include/infiniband"))))
+ (add-before 'build 'remove-absolute
+ (lambda _
+ ;; Remove compiler absolute file names (OPAL_FC_ABSOLUTE
+ ;; etc.) to reduce the closure size. See
+ ;; <https://lists.gnu.org/archive/html/guix-devel/2017-07/msg00388.html>
+ ;; and
+ ;; <https://www.mail-archive.com/[email protected]//msg31397.html>.
+ (substitute* '("orte/tools/orte-info/param.c"
+ "oshmem/tools/oshmem_info/param.c"
+ "ompi/tools/ompi_info/param.c")
+ (("_ABSOLUTE") ""))
+ ;; Avoid valgrind (which pulls in gdb etc.).
+ (substitute*
+ '("./ompi/mca/io/romio321/src/io_romio321_component.c")
+ (("MCA_io_romio321_COMPLETE_CONFIGURE_FLAGS")
+ "\"[elided to reduce closure]\""))))
+ (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.*") ""))))
+ (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"))))))))
(home-page "https://www.open-mpi.org")
(synopsis "MPI-3 implementation")
(description
@@ -309,7 +317,7 @@ software vendors, application developers and computer science researchers.")
(arguments
(substitute-keyword-arguments (package-arguments openmpi)
((#:configure-flags flags)
- `(cons "--enable-mpi-cxx" ,flags))))
+ #~(cons "--enable-mpi-cxx" #$flags))))
(synopsis "C++ bindings for MPI")))
;; TODO: javadoc files contain timestamps.
@@ -325,34 +333,35 @@ software vendors, application developers and computer science researchers.")
,@(package-native-inputs openmpi)))
(outputs '("out"))
(arguments
- `(#:modules ((guix build gnu-build-system)
+ (cons*
+ #:modules '((guix build gnu-build-system)
((guix build ant-build-system) #:prefix ant:)
(guix build utils))
- #:imported-modules ((guix build ant-build-system)
+ #:imported-modules `((guix build ant-build-system)
,@%gnu-build-system-modules)
- ,@(substitute-keyword-arguments (package-arguments openmpi)
- ((#:configure-flags flags)
- `(cons "--enable-mpi-java" ,flags))
- ((#:make-flags flags ''())
- `(append '("-C" "ompi/mpi/java")
- ,flags))
- ((#:phases phases)
- `(modify-phases ,phases
- ;; We could provide the location of the JDK in the configure
- ;; flags, but since the configure flags are embedded in the
- ;; info binaries that would leave a reference to the JDK in
- ;; the "out" output. To avoid this we set JAVA_HOME.
- (add-after 'unpack 'set-JAVA_HOME
- (lambda* (#:key inputs #:allow-other-keys)
- (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
- #t))
- (add-after 'unpack 'link-with-existing-mpi-libraries
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "ompi/mpi/java/c/Makefile.in"
- (("\\$\\(top_builddir\\)/ompi/lib@[email protected]")
- (search-input-file inputs "/lib/libmpi.la")))))
- (add-after 'install 'strip-jar-timestamps
- (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
+ (substitute-keyword-arguments (package-arguments openmpi)
+ ((#:configure-flags flags)
+ #~(cons "--enable-mpi-java" #$flags))
+ ((#:make-flags flags ''())
+ #~(append '("-C" "ompi/mpi/java")
+ #$flags))
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ ;; We could provide the location of the JDK in the configure
+ ;; flags, but since the configure flags are embedded in the
+ ;; info binaries that would leave a reference to the JDK in
+ ;; the "out" output. To avoid this we set JAVA_HOME.
+ (add-after 'unpack 'set-JAVA_HOME
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
+ #t))
+ (add-after 'unpack 'link-with-existing-mpi-libraries
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "ompi/mpi/java/c/Makefile.in"
+ (("\\$\\(top_builddir\\)/ompi/lib@[email protected]")
+ (search-input-file inputs "/lib/libmpi.la")))))
+ (add-after 'install 'strip-jar-timestamps
+ (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
(synopsis "Java bindings for MPI")))
(define-public openmpi-thread-multiple
@@ -361,7 +370,7 @@ software vendors, application developers and computer science researchers.")
(arguments
(substitute-keyword-arguments (package-arguments openmpi)
((#:configure-flags flags)
- `(cons "--enable-mpi-thread-multiple" ,flags))))
+ #~(cons "--enable-mpi-thread-multiple" #$flags))))
(description "This version of Open@tie{}MPI has an implementation of
@code{MPI_Init_thread} that provides @code{MPI_THREAD_MULTIPLE}. This won't
work correctly with all transports (such as @code{openib}), and the