;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2015, 2018, 2019 Eric Bavier ;;; Copyright © 2014-2024 Ludovic Courtès ;;; Copyright © 2014 Ian Denhardt ;;; Copyright © 2016 Andreas Enge ;;; Copyright © 2017 Dave Love ;;; Copyright © 2017, 2022 Efraim Flashner ;;; Copyright © 2018–2022 Tobias Geerinckx-Rice ;;; Copyright © 2018 Paul Garlick ;;; Copyright © 2019, 2021 Ricardo Wurmus ;;; Copyright © 2024 Romain Garbage ;;; ;;; 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 WARRA
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-11-02 22:22:36 +0100
committerLudovic Courtès <ludo@gnu.org>2015-11-02 22:25:12 +0100
commitbeca0807ebd85c367eb88fdce04d826b6901c5fe (patch)
tree9e1bea4a37330085a4b33d2ca7ad7e15f36a5cce /gnu/services
parent1065bed9c41f8a9b0718ae2db0fd42f286c1b8be (diff)
downloadguix-beca0807ebd85c367eb88fdce04d826b6901c5fe.tar.gz
guix-beca0807ebd85c367eb88fdce04d826b6901c5fe.zip
services: udisks: Add UDisks to the system profile.
* gnu/services/desktop.scm (udisks-service-type): Extend PROFILE-SERVICE-TYPE.
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/desktop.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 31d196da78..1986764697 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -490,6 +490,10 @@ site} for more information."
(service-extension dbus-root-service-type
udisks-package)
(service-extension udev-service-type
+ udisks-package)
+
+ ;; Profile 'udisksctl' & co. in the system profile.
+ (service-extension profile-service-type
udisks-package))))))
(define* (udisks-service #:key (udisks udisks))
/github.com/open-mpi/hwloc/issues/213>. (substitute* "tests/hwloc/linux-libnuma.c" (("numa_available\\(\\)") "-1")))) (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"))) (add-before 'check 'skip-test-that-fails-on-qemu (lambda _ ;; Skip test that fails on emulated hardware due to QEMU bug: ;; . (substitute* "tests/hwloc/hwloc_get_last_cpu_location.c" (("hwloc_topology_init" all) (string-append "exit (77);\n" all))))))))))) (define-public hwloc ;; The latest stable series of hwloc. hwloc-2) (define-public openmpi-4 (package (name "openmpi") (version "4.1.6") (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 "05g4245v0pdqcyjmgn50519ry5v5q8ig26iinmiynvaihm29jh7p")) (patches (search-patches "openmpi-mtl-priorities.patch")))) (properties ;; Tell the 'generic-html' updater to monitor this URL for updates. `((release-monitoring-url . "https://www.open-mpi.org/software/ompi/current"))) (build-system gnu-build-system) (inputs (let ((if-supported (lambda (package) (if (and (not (%current-target-system)) (member (%current-system) (package-supported-systems package))) (list package) '())))) (append (list `(,hwloc-2 "lib") gfortran libfabric libevent opensm) (if-supported psm) (if-supported psm2) (if-supported ucx) (if-supported valgrind) (list rdma-core slurm)))) ;for PMI support (launching via "srun") (native-inputs (list pkg-config perl)) (outputs '("out" "debug")) (arguments (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 the 'Process Management ;; Interface for Exascale' (PMIx) used e.g. by ;; Slurm for the management communication and ;; coordination of MPI processes. "--with-pmix=internal" ;; 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 ;; ;; and ;; . (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 "The Open MPI Project is an MPI-3 implementation that is developed and 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.") ;; See file://LICENSE (license license:bsd-2))) (define-public openmpi openmpi-4) (define-public openmpi-5 (package (inherit openmpi) (version "5.0.3") (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 "02x9xmpggw77mdpikjjx83j6i4v3gkqbncda73lk5axk0vr841cr")))) (inputs (modify-inputs (package-inputs openmpi) ;; As of Open MPI 5.0.X, PMIx is used to communicate ;; with SLURM, so SLURM'S PMI is no longer needed. (delete "slurm") (append ucx) ;for Infiniband support (append openpmix) ;for PMI support (launching via "srun") (append prrte))) ;for PMI support (launching via "srun") (native-inputs (modify-inputs (package-native-inputs openmpi) (append python))) (outputs '("out" "debug")) (arguments (substitute-keyword-arguments (package-arguments openmpi) ((#:configure-flags _) #~(list "--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" ;; This replaces --enable-mpirun-prefix-by-default wich is deprecated ;; since 5.x. "--enable-prte-prefix-by-default" ;; Enable support for the 'Process Management Interface for Exascale' ;; (PMIx) used e.g. by Slurm for the management communication and ;; coordination of MPI processes. (string-append "--with-pmix=" #$(this-package-input "openpmix")) (string-append "--with-prrte=" #$(this-package-input "prrte")) ;; Since 5.x, Infiniband support is provided by ucx. ;; See https://docs.open-mpi.org/en/main/release-notes/networks.html#miscellaneous-network-notes (string-append "--with-ucx=" #$(this-package-input "ucx")))) ((#:phases phases) #~(modify-phases #$phases (delete 'remove-absolute) (delete 'scrub-timestamps))))))) (define-public openmpi-c++ (package/inherit openmpi (name "openmpi-c++") (outputs '("out")) (arguments (substitute-keyword-arguments (package-arguments openmpi) ((#:configure-flags flags) #~(cons "--enable-mpi-cxx" #$flags)))) (synopsis "C++ bindings for MPI"))) ;; TODO: javadoc files contain timestamps. (define-public java-openmpi (package/inherit openmpi (name "java-openmpi") (inputs `(("openmpi" ,openmpi) ,@(package-inputs openmpi))) (native-inputs `(("jdk" ,openjdk11 "jdk") ("zip" ,(@ (gnu packages compression) zip)) ,@(package-native-inputs openmpi))) (outputs '("out")) (arguments (cons* #:modules '((guix build gnu-build-system) ((guix build ant-build-system) #:prefix ant:) (guix build utils)) #:imported-modules `((guix build ant-build-system) ,@%default-gnu-imported-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@OMPI_LIBMPI_NAME@.la") (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 (package/inherit openmpi (name "openmpi-thread-multiple") (arguments (substitute-keyword-arguments (package-arguments openmpi) ((#:configure-flags 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 performance is generally worse than the vanilla @code{openmpi} package, which only provides @code{MPI_THREAD_FUNNELED}."))) ;;; Build phase to be used for packages that execute MPI code. (define-public %openmpi-setup '(lambda _ ;; By default, running the test suite would fail because 'ssh' could not ;; be found in $PATH. Define this variable to placate Open MPI without ;; adding a dependency on OpenSSH (the agent isn't used anyway.) (setenv "OMPI_MCA_plm_rsh_agent" (which "false")) ;; Allow oversubscription in case there are less physical cores available ;; in the build environment than the package wants while testing. (setenv "OMPI_MCA_rmaps_base_mapping_policy" "core:OVERSUBSCRIBE") ;; UCX sometimes outputs uninteresting warnings such as: ;; ;; mpool.c:38 UCX WARN object 0x7ffff44fffc0 was not returned to mpool ucp_am_bufs ;; ;; These in turn leads to failures of test suites that capture and ;; compare stdout, such as that of 'hdf5-parallel-openmpi'. Thus, tell ;; UCX to not emit those warnings. (setenv "UCX_LOG_LEVEL" "error") ;; Starting from 2.9.0, hwloc fails when /sys is unavailable: ;; ;; [hwloc/linux] failed to find sysfs cpu topology directory, aborting linux discovery. ;; ;; This in turn breaks Open MPI users. To work around it, define a fake ;; topology with 4 cores. That silently disables CPU binding, though ;; 'get_cpubind' will report there's no binding. (setenv "HWLOC_SYNTHETIC" "4") #t)) (define-public python-mpi4py (package (name "python-mpi4py") (version "3.1.4") (source (origin (method url-fetch) (uri (pypi-uri "mpi4py" version)) (sha256 (base32 "101lz7bnm9l17nrkbg6497kxscyh53aah7qd2b820ck2php8z18p")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-after 'build 'mpi-setup ,%openmpi-setup) (add-before 'check 'pre-check (lambda _ ;; Skip BaseTestSpawn class (causes error 'ompi_dpm_dyn_init() ;; failed --> Returned "Unreachable"' in chroot environment). (substitute* "test/test_spawn.py" (("unittest.skipMPI\\('openmpi\\(<3.0.0\\)'\\)") "unittest.skipMPI('openmpi')")) #t))))) (inputs (list openmpi)) (properties '((updater-extra-inputs . ("openmpi")))) (home-page "https://github.com/mpi4py/mpi4py") (synopsis "Python bindings for the Message Passing Interface standard") (description "MPI for Python (mpi4py) provides bindings of the Message Passing Interface (MPI) standard for the Python programming language, allowing any Python program to exploit multiple processors. mpi4py is constructed on top of the MPI-1/MPI-2 specification and provides an object oriented interface which closely follows MPI-2 C++ bindings. It supports point-to-point and collective communications of any picklable Python object as well as optimized communications of Python objects (such as NumPy arrays) that expose a buffer interface.") (license license:bsd-3))) (define-public mpich (package (name "mpich") (version "4.2.2") (source (origin (method url-fetch) (uri (string-append "http://www.mpich.org/static/downloads/" version "/mpich-" version ".tar.gz")) (sha256 (base32 "0h8xg1wi2d88hnfmj3xydf1hj78r7fh05jljhk5jgxmbmsrmngw8")))) (build-system gnu-build-system) (inputs `(,zlib (,hwloc-2 "lib") ,slurm ,@(if (and (not (%current-target-system)) (member (%current-system) (package-supported-systems ucx))) (list ucx) '()))) (native-inputs (list perl which gfortran python-minimal)) (outputs '("out" "debug")) (arguments `(#:configure-flags (list "--disable-silent-rules" ;let's see what's happening "--enable-debuginfo" ;; Default to "ch4", as will be the case in 3.4. It also works ;; around issues when running test suites of packages that use ;; MPICH: . "--with-device=ch4:ucx" ; --with-device=ch4:ofi segfaults in tests (string-append "--with-hwloc-prefix=" (assoc-ref %build-inputs "hwloc")) ,@(if (assoc "ucx" (package-inputs this-package)) `((string-append "--with-ucx=" (assoc-ref %build-inputs "ucx"))) '())) #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-sources (lambda _ (substitute* "./maint/gen_subcfg_m4" (("/usr/bin/env") (which "env"))) (substitute* "src/glue/romio/all_romio_symbols" (("/usr/bin/env") (which "env"))) (substitute* (find-files "." "buildiface") (("/usr/bin/env") (which "env"))) (substitute* "maint/extracterrmsgs" (("/usr/bin/env") (which "env"))) (substitute* (find-files "." "f77tof90") (("/usr/bin/env") (which "env"))) (substitute* (find-files "." "\\.sh$") (("/bin/sh") (which "sh"))))) (add-before 'configure 'fix-makefile (lambda _ ;; Remove "@hwloclib@" from 'pmpi_convenience_libs'. ;; This fixes "No rule to make target '-lhwloc', needed ;; by 'lib/libmpi.la'". (substitute* "Makefile.in" (("^pmpi_convenience_libs = (.*) @hwloclib@ (.*)$" _ before after) (string-append "pmpi_convenience_libs = " before " " after))))) (add-before 'configure 'define-gfortran-wrapper (lambda* (#:key inputs #:allow-other-keys) ;; 'configure' checks whether the Fortran compiler ;; allows argument type mismatch. Since gfortran >= 10 ;; does not, provide a wrapper that passes ;; '-fallow-argument-mismatch' to get the desired ;; behavior. (mkdir-p ".gfortran-wrapper/bin") (call-with-output-file ".gfortran-wrapper/bin/gfortran" (lambda (port) (display (string-append "#!" (which "sh") "\n") port) (display (string-append "exec \"" (which "gfortran") "\" -fallow-argument-mismatch" " \"$@\"\n") port) (chmod port #o755))) (setenv "PATH" (string-append (getcwd) "/" ".gfortran-wrapper/bin:" (getenv "PATH")))))))) (home-page "https://www.mpich.org/") (synopsis "Implementation of the Message Passing Interface (MPI)") (description "MPICH is a high-performance and portable implementation of the Message Passing Interface (MPI) standard (MPI-1, MPI-2 and MPI-3). MPICH provides an MPI implementation that efficiently supports different computation and communication platforms including commodity clusters, high-speed networks (10 Gigabit Ethernet, InfiniBand, Myrinet, Quadrics), and proprietary high-end computing systems (Blue Gene, Cray). It enables research in MPI through a modular framework for other derived implementations.") (license license:bsd-2))) (define-public mpich-ofi (package/inherit mpich (name "mpich-ofi") (inputs (modify-inputs (package-inputs mpich) (delete ucx) (append libfabric) (append rdma-core) (append psm2))) (arguments (substitute-keyword-arguments (package-arguments mpich) ((#:configure-flags flags) #~(list "--disable-silent-rules" ;let's see what's happening "--enable-debuginfo" "--with-device=ch4:ofi" (string-append "--with-hwloc-prefix=" #$(this-package-input "hwloc")) (string-append "--with-libfabric=" #$(this-package-input "libfabric")))) ((#:phases phases '%standard-phases) phases))) (synopsis "Implementation of the Message Passing Interface (MPI) for OmniPath")))