diff options
Diffstat (limited to 'gnu/packages/mpi.scm')
-rw-r--r-- | gnu/packages/mpi.scm | 188 |
1 files changed, 102 insertions, 86 deletions
diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm index 631a276282..ea5cc62b39 100644 --- a/gnu/packages/mpi.scm +++ b/gnu/packages/mpi.scm @@ -36,7 +36,7 @@ #:use-module (guix deprecation) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) - #:use-module (guix build-system python) + #:use-module (guix build-system pyproject) #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages bash) @@ -62,6 +62,8 @@ #:use-module (gnu packages parallel) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) + #:use-module (gnu packages python-xyz) #:use-module (gnu packages ssh) #:use-module (gnu packages valgrind) #:use-module (gnu packages version-control) @@ -158,7 +160,7 @@ bind processes, and much more.") (define-public hwloc-2 (package (inherit hwloc-1) - (version "2.12.1") + (version "2.12.2") (source (origin (method url-fetch) (uri (string-append "https://download.open-mpi.org/release/hwloc/v" @@ -166,7 +168,7 @@ bind processes, and much more.") "/hwloc-" version ".tar.bz2")) (sha256 (base32 - "0sy63p99bz9xyaz1501mwv8i3qa1v1zwa7gynadry9c6pcl07a9q")))) + "182v0n2mpnbvdsw0gjnbmaj027k2jxmw7yphi89i9dgb1zbn2gjn")))) (native-inputs (modify-inputs (package-native-inputs hwloc-1) (append bash))) ;for completion tests @@ -356,18 +358,11 @@ software vendors, application developers and computer science researchers.") '(begin ;; XXX: 'delete-all-but' is copied from the turbovnc package. (define (delete-all-but directory . preserve) - (define (directory? x) - (and=> (stat x #f) - (compose (cut eq? 'directory <>) stat:type))) (with-directory-excursion directory - (let* ((pred - (negate (cut member <> (append '("." "..") preserve)))) + (let* ((pred (negate (cut member <> + (cons* "." ".." preserve)))) (items (scandir "." pred))) - (for-each (lambda (item) - (if (directory? item) - (delete-file-recursively item) - (delete-file item))) - items)))) + (for-each (cut delete-file-recursively <>) items)))) ;; Delete as many bundled libraries as permitted by the build ;; system. (delete-all-but "3rd-party" "treematch" "Makefile.in" "Makefile.am") @@ -381,8 +376,8 @@ software vendors, application developers and computer science researchers.") ;; 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 openpmix) ;for PMI support (launching via "srun") - (append prrte))) ;for PMI support (launching via "srun") + (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))) @@ -392,7 +387,7 @@ software vendors, application developers and computer science researchers.") #~(list #$(string-append "CFLAGS=-g -O2" " -Wno-error=incompatible-pointer-types") - "--enable-mpi-ext=affinity" ;cr doesn't work + "--enable-mpi-ext=affinity" ;cr doesn't work "--with-sge" "--disable-static" @@ -535,36 +530,48 @@ only provides @code{MPI_THREAD_FUNNELED}."))) (define-public python-mpi4py (package (name "python-mpi4py") - (version "3.1.4") + (version "4.1.0") (source (origin - (method url-fetch) - (uri (pypi-uri "mpi4py" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/mpi4py/mpi4py") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "101lz7bnm9l17nrkbg6497kxscyh53aah7qd2b820ck2php8z18p")))) - (build-system python-build-system) + (base32 "1r4n2d3nacpa6sq18jp0xk4a81ha0iipgvlsdv0bhfmdvgpv2vqy")))) + (build-system pyproject-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")))) + (list + #:test-flags + #~(list ;; MPI errors are unrecoverable. + "--ignore=test/test_spawn.py" + "--ignore=test/test_util_pool.py" + "--ignore=demo/futures/test_futures.py") + #: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')")))) + (replace 'check + (lambda* (#:key tests? test-flags #:allow-other-keys) + (if tests? + (apply invoke "mpiexec" "pytest" "-vv" test-flags) + (format #t "test suite not run~%"))))))) + (native-inputs (list python-cython python-pytest python-setuptools)) + (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. + (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 @@ -738,57 +745,66 @@ programmable API.") (define (make-scorep mpi) (package (name (string-append "scorep-" (package-name mpi))) - (version "3.1") + (version "9.0") (source (origin - (method url-fetch) - (uri (string-append - "http://www.vi-hps.org/upload/packages/scorep/scorep-" - version ".tar.gz")) - (sha256 - (base32 - "0h45357djna4dn9jyxx0n36fhhms3jrf22988m9agz1aw2jfivs9")) - (modules '((guix build utils))) - (snippet - ;; Remove bundled software. - '(begin - (for-each delete-file-recursively - '("vendor/opari2" "vendor/cube")) - #t)))) + (method url-fetch) + (uri (string-append + "https://perftools.pages.jsc.fz-juelich.de/cicd/scorep/tags/" + "scorep-" version "/scorep-" version ".tar.gz")) + (sha256 + (base32 + "15q93rc8wblbzqgh99rqzyq6fdp88mi6yziww05c6cbgrjs5s2jx")) + (modules '((guix build utils))) + (snippet + ;; Remove bundled software. + '(begin + (for-each delete-file-recursively + '("vendor/otf2" "vendor/opari2" + "vendor/cubelib" "vendor/cubew")))))) (build-system gnu-build-system) (inputs - `(("mpi" ,mpi) - ("papi" ,papi) - ("opari2" ,opari2) - ("libunwind" ,libunwind) - ("otf2" ,otf2) - ("cubelib" ,cube "lib") ;for lib, include - ("openmpi" ,openmpi) - ("zlib" ,zlib))) + (list mpi + papi + opari2 + libunwind + otf2 + cubelib + cubew + gotcha + libbfd + libiberty + openmpi + zlib)) (native-inputs - (list gfortran - flex - cube ;for cube-config - bison - python - doxygen - which)) + (list gfortran + flex + bison + python + doxygen + which)) (arguments - `(#:configure-flags - (list "--enable-shared" "--disable-static" - (string-append "--with-opari2=" - (assoc-ref %build-inputs "opari2")) - (string-append "--with-cube=" - (assoc-ref %build-inputs "cube"))) - #:parallel-tests? #f - #:make-flags '("V=1") - #:phases - (modify-phases %standard-phases - (add-after 'install 'licence - (lambda* (#:key outputs #:allow-other-keys) - (let ((doc (string-append (assoc-ref outputs "out") - "/share/doc/scorep"))) - (install-file "COPYING" doc) - #t)))))) + (list + #:configure-flags + #~(list "--enable-shared" "--disable-static" + "MPI_LIBS=-lmpi" "SHMEM_LIBS=-loshmem" + (string-append "--with-cubelib=" + #$(this-package-input "cubelib")) + (string-append "--with-cubew=" + #$(this-package-input "cubew")) + (string-append "--with-libbfd=" + #$(this-package-input "libbfd")) + (string-append "--with-otf2=" + #$(this-package-input "otf2")) + (string-append "--with-opari2=" + #$(this-package-input "opari2"))) + #:parallel-tests? #f + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'licence + (lambda* (#:key outputs #:allow-other-keys) + (let ((doc (string-append (assoc-ref outputs "out") + "/share/doc/scorep"))) + (install-file "COPYING" doc))))))) (home-page "https://www.vi-hps.org/projects/score-p/") (synopsis "Performance measurement infrastructure for parallel code") (description |