| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 |
|
| 40 | (define-module (gnu packages parallel)
|
| 41 | #:use-module (guix download)
|
| 42 | #:use-module (guix git-download)
|
| 43 | #:use-module (guix build-system cmake)
|
| 44 | #:use-module (guix build-system gnu)
|
| 45 | #:use-module (guix build-system pyproject)
|
| 46 | #:use-module ((guix licenses) #:prefix license:)
|
| 47 | #:use-module ((guix utils) #:select (target-32bit?))
|
| 48 | #:use-module (guix packages)
|
| 49 | #:use-module (guix utils)
|
| 50 | #:use-module (guix gexp)
|
| 51 | #:use-module (gnu packages)
|
| 52 | #:use-module (gnu packages admin)
|
| 53 | #:use-module (gnu packages autotools)
|
| 54 | #:use-module (gnu packages base)
|
| 55 | #:use-module (gnu packages bash)
|
| 56 | #:use-module (gnu packages check)
|
| 57 | #:use-module (gnu packages compression)
|
| 58 | #:use-module (gnu packages databases)
|
| 59 | #:use-module (gnu packages documentation)
|
| 60 | #:use-module (gnu packages compiler-tools)
|
| 61 | #:use-module (gnu packages freeipmi)
|
| 62 | #:use-module (gnu packages gcc)
|
| 63 | #:use-module (gnu packages glib)
|
| 64 | #:use-module (gnu packages libevent)
|
| 65 | #:use-module (gnu packages linux)
|
| 66 | #:use-module (gnu packages maths)
|
| 67 | #:use-module (gnu packages mpi)
|
| 68 | #:use-module (gnu packages networking)
|
| 69 | #:use-module (gnu packages perl)
|
| 70 | #:use-module (gnu packages pkg-config)
|
| 71 | #:use-module (gnu packages python)
|
| 72 | #:use-module (gnu packages python-build)
|
| 73 | #:use-module (gnu packages python-science)
|
| 74 | #:use-module (gnu packages python-xyz)
|
| 75 | #:use-module (gnu packages readline)
|
| 76 | #:use-module (gnu packages serialization)
|
| 77 | #:use-module (gnu packages texinfo)
|
| 78 | #:use-module (gnu packages tcl)
|
| 79 | #:use-module (gnu packages tls)
|
| 80 | #:use-module (gnu packages web))
|
| 81 |
|
| 82 | (define-public parallel
|
| 83 | (package
|
| 84 | (name "parallel")
|
| 85 | (version "20260822")
|
| 86 | (outputs '("out" "doc"))
|
| 87 | (source
|
| 88 | (origin
|
| 89 | (method url-fetch)
|
| 90 | (uri (string-append "mirror://gnu/parallel/parallel-"
|
| 91 | version ".tar.bz2"))
|
| 92 | (sha256
|
| 93 | (base32 "1s6ryzsbbnwbbf28wklfyr7lx4hb6j9y5vm6ln95l0cnhwjsff0x"))
|
| 94 | (snippet
|
| 95 | '(begin
|
| 96 | (use-modules (guix build utils))
|
| 97 | |
| 98 | |
| 99 | |
| 100 | (rename-file "src/parallel_cheat_bw.pdf"
|
| 101 | "src/parallel_cheat_bw.pdf-keep")
|
| 102 | (for-each delete-file (find-files "src" "\\.(1|7|html|pdf)$"))
|
| 103 | (rename-file "src/parallel_cheat_bw.pdf-keep"
|
| 104 | "src/parallel_cheat_bw.pdf")))))
|
| 105 | (build-system gnu-build-system)
|
| 106 | (arguments
|
| 107 | (list
|
| 108 | #:configure-flags
|
| 109 | #~(list (string-append "--docdir=" #$output:doc "/share/doc/parallel"))
|
| 110 | #:phases
|
| 111 | #~(modify-phases %standard-phases
|
| 112 | (add-after 'unpack 'patch-bin-sh
|
| 113 | (lambda _
|
| 114 | (for-each
|
| 115 | (lambda (file)
|
| 116 | (substitute* file
|
| 117 | |
| 118 | |
| 119 | |
| 120 | (("/bin/sh\\\";\n$") (string-append (which "sh") "\";\n"))))
|
| 121 | (list "src/parallel" "src/sem"))))
|
| 122 | (add-before 'install 'add-install-to-path
|
| 123 | (lambda _
|
| 124 | (setenv "PATH"
|
| 125 | (string-append (getenv "PATH") ":" #$output "/bin"))))
|
| 126 | (add-after 'install 'wrap-program
|
| 127 | (lambda* (#:key inputs #:allow-other-keys)
|
| 128 | (wrap-program (string-append #$output "/bin/parallel")
|
| 129 | `("PATH" ":" prefix
|
| 130 | ,(map (lambda (input)
|
| 131 | (string-append (assoc-ref inputs input) "/bin"))
|
| 132 | '("perl" "procps"))))))
|
| 133 | (add-after 'wrap-program 'post-install-test
|
| 134 | (lambda* (#:key tests? #:allow-other-keys)
|
| 135 | (when tests?
|
| 136 | (invoke (string-append #$output "/bin/parallel")
|
| 137 | "echo"
|
| 138 | ":::" "1" "2" "3"))))
|
| 139 | (add-after 'post-install-test 'replace-texi-files
|
| 140 | (lambda _
|
| 141 | |
| 142 | (for-each
|
| 143 | (lambda (file)
|
| 144 | (let ((info-file
|
| 145 | (string-append (car (string-split file #\.)) ".info")))
|
| 146 | (invoke "makeinfo" "--no-split" "-o" info-file file)
|
| 147 | (install-file info-file
|
| 148 | (string-append #$output:doc "/share/info"))))
|
| 149 | (find-files "src" "\\.texi$"))
|
| 150 | |
| 151 | (for-each
|
| 152 | delete-file
|
| 153 | (find-files (string-append #$output:doc "/share/doc/parallel")
|
| 154 | "\\.texi$")))))))
|
| 155 | (native-inputs
|
| 156 | (list perl pod2pdf texinfo))
|
| 157 | (inputs
|
| 158 | (list bash-minimal perl procps))
|
| 159 | (home-page "https://www.gnu.org/software/parallel/")
|
| 160 | (synopsis "Build and execute command lines in parallel")
|
| 161 | (description
|
| 162 | "GNU Parallel is a tool for executing shell jobs in parallel using one
|
| 163 | or more computers. Jobs can consist of single commands or of scripts
|
| 164 | and they are executed on lists of files, hosts, users or other items.")
|
| 165 | (license license:gpl3+)))
|
| 166 |
|
| 167 | (define-public xe
|
| 168 | (package
|
| 169 | (name "xe")
|
| 170 | (version "1.0")
|
| 171 | (source
|
| 172 | (origin
|
| 173 | (method git-fetch)
|
| 174 | (uri (git-reference
|
| 175 | (url "https://github.com/leahneukirchen/xe")
|
| 176 | (commit (string-append "v" version))))
|
| 177 | (file-name (git-file-name name version))
|
| 178 | (sha256
|
| 179 | (base32 "1ijvf7q5pxk4rlj7p9q6fmpdqiwmc28gffkk6yg390k1a1z3msf9"))))
|
| 180 | (build-system gnu-build-system)
|
| 181 | (arguments
|
| 182 | (list #:tests? #f
|
| 183 | #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
|
| 184 | (string-append "PREFIX=" #$output))
|
| 185 | #:phases #~(modify-phases %standard-phases
|
| 186 | (delete 'configure))))
|
| 187 | (synopsis "Execute a command for every argument")
|
| 188 | (description
|
| 189 | "The xe utility constructs command lines from specified arguments,
|
| 190 | combining some of the best features of xargs(1) and apply(1). Parallel
|
| 191 | execution is also possible.")
|
| 192 | (home-page "https://github.com/leahneukirchen/xe")
|
| 193 | (license license:public-domain)))
|
| 194 |
|
| 195 | (define-public xjobs
|
| 196 | (package
|
| 197 | (name "xjobs")
|
| 198 | (version "20250529")
|
| 199 | (source (origin
|
| 200 | (method url-fetch)
|
| 201 | (uri (string-append
|
| 202 | "http://www.maier-komor.de/xjobs/xjobs-"
|
| 203 | version ".tgz"))
|
| 204 | (sha256
|
| 205 | (base32
|
| 206 | "13hkaipl3cgr9cvama34b442n35ckr42p1f24kygkrad3ymy87hx"))))
|
| 207 | (build-system gnu-build-system)
|
| 208 | (arguments `(#:tests? #f)) |
| 209 | (native-inputs
|
| 210 | (list flex))
|
| 211 | (home-page "https://www.maier-komor.de/xjobs.html")
|
| 212 | (properties `((release-monitoring-url . ,home-page)))
|
| 213 | (synopsis
|
| 214 | "Parallel execution of jobs with several useful options")
|
| 215 | (description
|
| 216 | "xjobs reads job descriptions line by line and executes them in
|
| 217 | parallel. It limits the number of parallel executing jobs and starts new jobs
|
| 218 | when jobs finish.")
|
| 219 | (license license:gpl2+)))
|
| 220 |
|
| 221 | (define-public slurm-minimal
|
| 222 | (package
|
| 223 | (name "slurm-minimal")
|
| 224 | (version "23.11.10")
|
| 225 | (source (origin
|
| 226 | (method url-fetch)
|
| 227 | (uri (string-append
|
| 228 | "https://download.schedmd.com/slurm/slurm-"
|
| 229 | version ".tar.bz2"))
|
| 230 | (sha256
|
| 231 | (base32
|
| 232 | "0gf7x85bzpkrx87mb16wyiyvkjxqq01sbajsjxwrspyi2v675hgr"))
|
| 233 | (modules '((guix build utils)))
|
| 234 | (snippet
|
| 235 | '(begin
|
| 236 | |
| 237 | |
| 238 | |
| 239 | |
| 240 | |
| 241 | |
| 242 | (substitute* "configure.ac"
|
| 243 | (("^[[:space:]]+contribs/(.*)$" all directory)
|
| 244 | (if (string-prefix? "pmi" directory)
|
| 245 | all
|
| 246 | "")))
|
| 247 |
|
| 248 | (rename-file "contribs/pmi" "tmp-pmi")
|
| 249 | (rename-file "contribs/pmi2" "tmp-pmi2")
|
| 250 | (delete-file-recursively "contribs")
|
| 251 | (mkdir "contribs")
|
| 252 | (rename-file "tmp-pmi" "contribs/pmi")
|
| 253 | (rename-file "tmp-pmi2" "contribs/pmi2")))))
|
| 254 | (inputs
|
| 255 | (append
|
| 256 | (list freeipmi
|
| 257 | `(,hwloc "lib")
|
| 258 | json-c
|
| 259 | linux-pam)
|
| 260 | (if (supported-package? openpmix-5)
|
| 261 | (list openpmix-5)
|
| 262 | '())
|
| 263 | (list munge
|
| 264 | numactl
|
| 265 | readline)))
|
| 266 | (native-inputs
|
| 267 | (list autoconf expect perl pkg-config python-wrapper))
|
| 268 | (build-system gnu-build-system)
|
| 269 | (arguments
|
| 270 | (list #:configure-flags
|
| 271 | #~(list "--enable-pam" "--sysconfdir=/etc/slurm"
|
| 272 | "--disable-static"
|
| 273 | (string-append "--with-freeipmi=" #$(this-package-input "freeipmi"))
|
| 274 | (string-append "--with-hwloc="
|
| 275 | (ungexp (this-package-input "hwloc") "lib"))
|
| 276 | (string-append "--with-json=" #$(this-package-input "json-c"))
|
| 277 | (string-append "--with-munge=" #$(this-package-input "munge"))
|
| 278 |
|
| 279 | |
| 280 | |
| 281 | |
| 282 | #$(let ((openmpix (this-package-input "openpmix")))
|
| 283 | (if openmpix
|
| 284 | #~(string-append "--with-pmix=" #$openmpix)
|
| 285 | "--without-pmix"))
|
| 286 |
|
| 287 | |
| 288 | |
| 289 | #$@(if (target-32bit?) '("--enable-deprecated") '()))
|
| 290 | #:phases
|
| 291 | #~(modify-phases %standard-phases
|
| 292 | (add-after 'unpack 'patch-plugin-linker-flags
|
| 293 | (lambda _
|
| 294 | (substitute* (find-files "src/plugins/" "Makefile.in")
|
| 295 | (("_la_LDFLAGS = ")
|
| 296 | "_la_LDFLAGS = ../../../api/libslurm.la "))))
|
| 297 | (add-after 'patch-plugin-linker-flags 'autoconf
|
| 298 | (lambda _ (invoke "autoconf"))) |
| 299 | (add-after 'install 'install-libpmi
|
| 300 | (lambda _
|
| 301 | |
| 302 | (invoke "make" "install" "-C" "contribs/pmi")
|
| 303 |
|
| 304 | |
| 305 | (invoke "make" "install" "-C" "contribs/pmi2"))))))
|
| 306 | (home-page "https://slurm.schedmd.com/")
|
| 307 | (synopsis "Workload manager for cluster computing")
|
| 308 | (description
|
| 309 | "SLURM is a fault-tolerant and highly scalable cluster management and job
|
| 310 | scheduling system for large and small clusters. It allocates access to
|
| 311 | resources (computer nodes) to users for some duration of time, provides a
|
| 312 | framework for starting, executing, and monitoring work (typically a parallel
|
| 313 | job) on a set of allocated nodes, and arbitrates contention for resources
|
| 314 | by managing a queue of pending work.")
|
| 315 | (license (list license:bsd-2 |
| 316 | license:expat |
| 317 | license:isc |
| 318 | license:lgpl2.1+ |
| 319 | license:zlib |
| 320 | (license:non-copyleft |
| 321 | "https://github.com/SchedMD/slurm/blob/master/contribs/pmi2/COPYRIGHT")
|
| 322 | license:gpl2+)))) |
| 323 |
|
| 324 | (define (make-slurm base-slurm)
|
| 325 | "Make a slurm package with all optional features enabled. Base it off of the
|
| 326 | minimal slurm package BASE-SLURM."
|
| 327 | (package
|
| 328 | (inherit base-slurm)
|
| 329 | (name "slurm")
|
| 330 | (arguments
|
| 331 | (substitute-keyword-arguments arguments
|
| 332 | ((#:configure-flags flags #~'())
|
| 333 | #~(cons* "--enable-slurmrestd"
|
| 334 | (string-append "--with-bpf="
|
| 335 | (dirname
|
| 336 | (dirname (search-input-directory
|
| 337 | %build-inputs "include/linux"))))
|
| 338 | (string-append "--with-http-parser="
|
| 339 | #$(this-package-input "http-parser"))
|
| 340 | (string-append "--with-rdkafka="
|
| 341 | #$(this-package-input "librdkafka"))
|
| 342 | (string-append "--with-yaml="
|
| 343 | #$(this-package-input "libyaml"))
|
| 344 | #$flags))))
|
| 345 | |
| 346 | (inputs
|
| 347 | (modify-inputs inputs
|
| 348 | |
| 349 | (prepend dbus freeipmi http-parser
|
| 350 | libjwt librdkafka libyaml (list mariadb "dev"))))))
|
| 351 |
|
| 352 | (define-public slurm (make-slurm slurm-minimal))
|
| 353 |
|
| 354 | |
| 355 | |
| 356 | |
| 357 | |
| 358 | |
| 359 | |
| 360 |
|
| 361 | (define-public slurm-minimal-25.05
|
| 362 | (package
|
| 363 | (inherit slurm-minimal)
|
| 364 | (version "25.05.4")
|
| 365 | (source (origin
|
| 366 | (inherit (package-source slurm))
|
| 367 | (method url-fetch)
|
| 368 | (uri (string-append
|
| 369 | "https://download.schedmd.com/slurm/slurm-"
|
| 370 | version ".tar.bz2"))
|
| 371 | (sha256
|
| 372 | (base32
|
| 373 | "130pjygqk794dchknjqdsinciv2b7c7r5agqsgca7m804xp09wnl"))))
|
| 374 | (inputs (modify-inputs inputs
|
| 375 | (replace "openpmix" openpmix))))) |
| 376 |
|
| 377 | (define-public slurm-25.05 (make-slurm slurm-minimal-25.05))
|
| 378 |
|
| 379 | (define-public slurm-minimal-24.05
|
| 380 | (package
|
| 381 | (inherit slurm-minimal)
|
| 382 | (version "24.05.5")
|
| 383 | (source (origin
|
| 384 | (inherit (package-source slurm))
|
| 385 | (method url-fetch)
|
| 386 | (uri (string-append
|
| 387 | "https://download.schedmd.com/slurm/slurm-"
|
| 388 | version ".tar.bz2"))
|
| 389 | (sha256
|
| 390 | (base32
|
| 391 | "0vxiymp40lgcb1z76cyqdpqpy7w14r483v54dk4aq84v0aw0mixl"))))))
|
| 392 |
|
| 393 | (define-public slurm-24.05 (make-slurm slurm-minimal-24.05))
|
| 394 |
|
| 395 | (define-public slurm-minimal-23.11
|
| 396 | (package
|
| 397 | (inherit slurm-minimal)
|
| 398 | (version "23.11.11")
|
| 399 | (source (origin
|
| 400 | (inherit (package-source slurm))
|
| 401 | (method url-fetch)
|
| 402 | (uri (string-append
|
| 403 | "https://download.schedmd.com/slurm/slurm-"
|
| 404 | version ".tar.bz2"))
|
| 405 | (patches
|
| 406 | (search-patches "slurm-23-salloc-fallback-shell.patch"))
|
| 407 | (sha256
|
| 408 | (base32
|
| 409 | "0pg4liysbppfgynwsj3i1lzr60rnybnvzja37x6xgyjvxgf165sa"))))))
|
| 410 |
|
| 411 | (define-public slurm-23.11 (make-slurm slurm-minimal-23.11))
|
| 412 |
|
| 413 | (define-public slurm-minimal-22.05
|
| 414 | (package
|
| 415 | (inherit slurm-minimal-23.11)
|
| 416 | (version "22.05.1")
|
| 417 | (source (origin
|
| 418 | (inherit (package-source slurm-minimal-23.11))
|
| 419 | (method url-fetch)
|
| 420 | (uri (string-append
|
| 421 | "https://download.schedmd.com/slurm/slurm-"
|
| 422 | version ".tar.bz2"))
|
| 423 | (patches '()) |
| 424 | (sha256
|
| 425 | (base32
|
| 426 | "0f3hhlki8g7slllsnyj1qikbsvr62i0hig85lcdcfnmsagzlhbyi"))))))
|
| 427 |
|
| 428 | (define-public slurm-22.05 (make-slurm slurm-minimal-22.05))
|
| 429 |
|
| 430 | (define-public slurm-drmaa
|
| 431 | (package
|
| 432 | (name "slurm-drmaa")
|
| 433 | (version "1.1.5")
|
| 434 | (source (origin
|
| 435 | (method url-fetch)
|
| 436 | (uri (string-append
|
| 437 | "https://github.com/natefoo/slurm-drmaa/releases/download/"
|
| 438 | version "/slurm-drmaa-" version ".tar.gz"))
|
| 439 | (sha256
|
| 440 | (base32
|
| 441 | "1vydd44wp1xns7dd6zh7yin7i5p0ia3x2bk7ql56wfzhi22yf9sd"))
|
| 442 | (patches (search-patches "slurm-drmaa-25.patch"))
|
| 443 | (modules '((guix build utils)))
|
| 444 | (snippet
|
| 445 | |
| 446 | |
| 447 | '(substitute* "slurm_drmaa/util.h"
|
| 448 | (("slurmdrmaa__init") "slurmdrmaa_init")))))
|
| 449 | (build-system gnu-build-system)
|
| 450 | (arguments `(#:tests? #f)) |
| 451 | (inputs
|
| 452 | (list slurm))
|
| 453 | (native-inputs
|
| 454 | (list which))
|
| 455 | (home-page "https://github.com/natefoo/slurm-drmaa")
|
| 456 | (synopsis "Distributed resource management application API for SLURM")
|
| 457 | (description
|
| 458 | "PSNC DRMAA for Simple Linux Utility for Resource Management (SLURM) is
|
| 459 | an implementation of Open Grid Forum DRMAA 1.0 (Distributed Resource
|
| 460 | Management Application API) specification for submission and control of jobs
|
| 461 | to SLURM. Using DRMAA, grid applications builders, portal developers and ISVs
|
| 462 | can use the same high-level API to link their software with different
|
| 463 | cluster/resource management systems.")
|
| 464 | (license license:gpl3+)))
|
| 465 |
|
| 466 | (define-public python-pathos
|
| 467 | (package
|
| 468 | (name "python-pathos")
|
| 469 | (version "0.3.4")
|
| 470 | (source
|
| 471 | (origin
|
| 472 | (method url-fetch)
|
| 473 | (uri (pypi-uri "pathos" version))
|
| 474 | (sha256
|
| 475 | (base32 "0m077iw5fml4r7csgi4j7ngvdmg1y9jxly64gi56argq1qnr3m5s"))))
|
| 476 | (build-system pyproject-build-system)
|
| 477 | (arguments
|
| 478 | (list
|
| 479 | #:phases
|
| 480 | #~(modify-phases %standard-phases
|
| 481 | (replace 'check
|
| 482 | |
| 483 | |
| 484 | (lambda* (#:key tests? inputs outputs #:allow-other-keys)
|
| 485 | (when tests?
|
| 486 | (invoke "python" "./pathos/tests/__main__.py")))))))
|
| 487 | (native-inputs
|
| 488 | (list python-setuptools))
|
| 489 | (propagated-inputs
|
| 490 | (list python-dill
|
| 491 | python-multiprocess
|
| 492 | python-pox
|
| 493 | python-ppft))
|
| 494 | (home-page "https://pypi.org/project/pathos/")
|
| 495 | (synopsis
|
| 496 | "Parallel graph management and execution in heterogeneous computing")
|
| 497 | (description
|
| 498 | "Python-pathos is a framework for heterogeneous computing. It provides a
|
| 499 | consistent high-level interface for configuring and launching parallel
|
| 500 | computations across heterogeneous resources. Python-pathos provides
|
| 501 | configurable launchers for parallel and distributed computing, where each
|
| 502 | launcher contains the syntactic logic to configure and launch jobs in an
|
| 503 | execution environment.")
|
| 504 | (license license:bsd-3)))
|
| 505 |
|
| 506 | (define-public python-ppft
|
| 507 | (package
|
| 508 | (name "python-ppft")
|
| 509 | (version "1.7.7")
|
| 510 | (source
|
| 511 | (origin
|
| 512 | (method url-fetch)
|
| 513 | (uri (pypi-uri "ppft" version))
|
| 514 | (sha256
|
| 515 | (base32
|
| 516 | "15hvw39m2r3chm8zbqgkld0m1cl049rxidln4a6jnk72rx479xzk"))))
|
| 517 | (build-system pyproject-build-system)
|
| 518 | (arguments
|
| 519 | (list
|
| 520 | #:phases
|
| 521 | #~(modify-phases %standard-phases
|
| 522 | (replace 'check
|
| 523 | (lambda* (#:key tests? inputs outputs #:allow-other-keys)
|
| 524 | (when tests?
|
| 525 | (invoke "python" "./ppft/tests/__main__.py")))))))
|
| 526 | (native-inputs
|
| 527 | (list python-setuptools))
|
| 528 | (home-page "https://pypi.org/project/ppft/")
|
| 529 | (synopsis "Fork of Parallel Python")
|
| 530 | (description
|
| 531 | "This package is a fork of Parallel Python. The Parallel Python
|
| 532 | module (@code{pp}) provides an easy and efficient way to create
|
| 533 | parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
|
| 534 | computers and clusters. It features cross-platform portability and dynamic
|
| 535 | load balancing.")
|
| 536 | (license license:bsd-3)))
|
| 537 |
|
| 538 | (define-public python-schwimmbad
|
| 539 | (package
|
| 540 | (name "python-schwimmbad")
|
| 541 | (version "0.4.2")
|
| 542 | (source
|
| 543 | (origin
|
| 544 | (method url-fetch)
|
| 545 | (uri (pypi-uri "schwimmbad" version))
|
| 546 | (sha256
|
| 547 | (base32 "1aac1rswb0r0vzbxvjj2jyx5j0vqyjj7mygc71n9zbkpmr8m1rpg"))))
|
| 548 | (build-system pyproject-build-system)
|
| 549 | (propagated-inputs
|
| 550 | (list python-dill
|
| 551 | python-joblib
|
| 552 | python-mpi4py
|
| 553 | python-multiprocess))
|
| 554 | (native-inputs
|
| 555 | (list python-hatch-vcs python-hatchling python-pytest))
|
| 556 | (home-page "https://github.com/adrn/schwimmbad")
|
| 557 | (synopsis "Common interface for parallel processing pools")
|
| 558 | (description
|
| 559 | "@code{schwimmbad} provides a uniform interface to parallel processing
|
| 560 | pools and enables switching easily between local development (e.g., serial
|
| 561 | processing or with @code{multiprocessing}) and deployment on a cluster or
|
| 562 | supercomputer (via, e.g., MPI or JobLib).")
|
| 563 | (license license:expat)))
|
| 564 |
|
| 565 | (define-public pthreadpool
|
| 566 | |
| 567 | |
| 568 | (let ((commit "560c60d342a76076f0557a3946924c6478470044")
|
| 569 | (version "0.1")
|
| 570 | (revision "3"))
|
| 571 | (package
|
| 572 | (name "pthreadpool")
|
| 573 | (version (git-version version revision commit))
|
| 574 | (home-page "https://github.com/Maratyszcza/pthreadpool")
|
| 575 | (source (origin
|
| 576 | (method git-fetch)
|
| 577 | (uri (git-reference (url home-page) (commit commit)))
|
| 578 | (file-name (git-file-name name version))
|
| 579 | (sha256
|
| 580 | (base32
|
| 581 | "0l82ix1h8pmjikf15bvmlap355gmyfjpahmgz4lbd6g40ab3ls5c"))
|
| 582 | (patches (search-patches "pthreadpool-system-libraries.patch"))))
|
| 583 | (build-system cmake-build-system)
|
| 584 | (arguments '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
|
| 585 | (inputs
|
| 586 | (list googletest-1.12 googlebenchmark fxdiv))
|
| 587 | (synopsis "Efficient thread pool implementation")
|
| 588 | (description
|
| 589 | "The pthreadpool library implements an efficient and portable thread
|
| 590 | pool, similar to those implemented by OpenMP run-time support libraries for
|
| 591 | constructs such as @code{#pragma omp parallel for}, with additional
|
| 592 | features.")
|
| 593 | (license license:bsd-2))))
|
| 594 |
|
| 595 | (define-public cpuinfo
|
| 596 | |
| 597 | (let ((revision "8")
|
| 598 | (commit "84818a41e074779dbb00521a4731d3e14160ff15"))
|
| 599 | (package
|
| 600 | (name "cpuinfo")
|
| 601 | (version (git-version "0.0" revision commit))
|
| 602 | (home-page "https://github.com/pytorch/cpuinfo")
|
| 603 | (source (origin
|
| 604 | (method git-fetch)
|
| 605 | (uri (git-reference (url home-page) (commit commit)))
|
| 606 | (file-name (git-file-name name version))
|
| 607 | (sha256
|
| 608 | (base32
|
| 609 | "16mjs2ii45vzjm5fd98698gjfx7fmx2brgwcca03405la9wdyykr"))))
|
| 610 | (build-system cmake-build-system)
|
| 611 | (arguments
|
| 612 | (list
|
| 613 | |
| 614 | |
| 615 | #:tests? (not (or (target-aarch64?)
|
| 616 | (target-riscv64?)))
|
| 617 | #:configure-flags
|
| 618 | #~(list "-DBUILD_SHARED_LIBS=ON"
|
| 619 | "-DUSE_SYSTEM_LIBS=ON")))
|
| 620 | (inputs
|
| 621 | (list googletest googlebenchmark))
|
| 622 | (native-inputs
|
| 623 | (list python-setuptools python-wrapper))
|
| 624 | (synopsis "C/C++ library to obtain information about the CPU")
|
| 625 | (description
|
| 626 | "The cpuinfo library provides a C/C++ and a command-line interface to
|
| 627 | obtain information about the CPU being used: supported instruction set,
|
| 628 | processor name, cache information, and topology information.")
|
| 629 | (license license:bsd-2))))
|
| 630 |
|
| 631 | (define-public clog
|
| 632 | (package
|
| 633 | (inherit cpuinfo) |
| 634 | (name "clog")
|
| 635 | (source (origin
|
| 636 | (inherit (package-source cpuinfo))
|
| 637 | (patches (search-patches "clog-fix-shared-build.patch"))))
|
| 638 | (arguments
|
| 639 | (list
|
| 640 | #:configure-flags
|
| 641 | ''("-DBUILD_SHARED_LIBS=ON"
|
| 642 | "-DUSE_SYSTEM_LIBS=ON")
|
| 643 | #:phases #~(modify-phases %standard-phases
|
| 644 | (add-after 'unpack 'chdir
|
| 645 | (lambda _
|
| 646 | (chdir "deps/clog"))))))
|
| 647 | (native-inputs (list googletest-1.8))
|
| 648 | (inputs '())
|
| 649 | (synopsis "C-style logging library based on printf")
|
| 650 | (description
|
| 651 | "This package provides a C-style library for logging errors,
|
| 652 | warnings, information notes, and debug information. Its features are:
|
| 653 | @itemize
|
| 654 | @item printf-style interface for formatting variadic parameters.
|
| 655 | @item Separate functions for logging errors, warnings, information notes, and
|
| 656 | debug information.
|
| 657 | @item Independent logging settings for different modules.
|
| 658 | @item Logging to logcat on Android and stderr/stdout on other platforms.
|
| 659 | @item Compatible with C99 and C++.
|
| 660 | @item Covered with unit tests.
|
| 661 | @end itemize")))
|
| 662 |
|
| 663 | (define-public massivethreads
|
| 664 | (package
|
| 665 | (name "massivethreads")
|
| 666 | (version "1.02")
|
| 667 | (source
|
| 668 | (origin
|
| 669 | (method git-fetch)
|
| 670 | (uri (git-reference
|
| 671 | (url "https://github.com/massivethreads/massivethreads")
|
| 672 | (commit (string-append "v" version))))
|
| 673 | (file-name (git-file-name name version))
|
| 674 | (sha256
|
| 675 | (base32 "1bhl577jg4ss0j757711mw596j5x7kjs4znmfphw8pfdlz1sh9gp"))))
|
| 676 | (build-system gnu-build-system)
|
| 677 | (home-page
|
| 678 | "https://www.eidos.ic.i.u-tokyo.ac.jp/en/contents/research/massivethreads")
|
| 679 | (synopsis "Lightweight thread library")
|
| 680 | (description
|
| 681 | "MassiveThreads is a thread library that can spawn threads two orders of
|
| 682 | magnitude faster than native operating system threads. It provides three APIs
|
| 683 | to use: native intefrace, pthread-compatible interface, and TBB-like
|
| 684 | interface.")
|
| 685 | (license license:bsd-2)))
|
| 686 |
|
| 687 | (define-public psimd
|
| 688 | |
| 689 | (let ((commit "072586a71b55b7f8c584153d223e95687148a900")
|
| 690 | (version "0.0")
|
| 691 | (revision "1"))
|
| 692 | (package
|
| 693 | (name "psimd")
|
| 694 | (version (git-version version revision commit))
|
| 695 | (home-page "https://github.com/Maratyszcza/Psimd")
|
| 696 | (source (origin
|
| 697 | (method git-fetch)
|
| 698 | (uri (git-reference (url home-page) (commit commit)))
|
| 699 | (file-name (git-file-name name version))
|
| 700 | (sha256
|
| 701 | (base32
|
| 702 | "16mslhvqs0gpqbg7kkq566a8gkn58cgjpqca8ljj9qcv5mk9apwm"))))
|
| 703 | (build-system cmake-build-system)
|
| 704 | (arguments '(#:tests? #f)) |
| 705 | (synopsis "Portable 128-bit SIMD intrinsics")
|
| 706 | (description
|
| 707 | "This header-only C++ library provides a portable interface to
|
| 708 | single-instruction multiple-data (SIMD) intrinsics.")
|
| 709 | (license license:expat))))
|
| 710 |
|
| 711 | (define-public openpmix
|
| 712 | (package
|
| 713 | (name "openpmix")
|
| 714 | (version "6.1.0")
|
| 715 | (source (origin
|
| 716 | (method git-fetch)
|
| 717 | (uri (git-reference
|
| 718 | (url "https://github.com/openpmix/openpmix")
|
| 719 | (commit (string-append "v" version))
|
| 720 | (recursive? #t))) |
| 721 | (file-name (git-file-name name version))
|
| 722 | (sha256
|
| 723 | (base32
|
| 724 | "1sj4hqnbis0a8466qv47fp9ii6akvbl6n9scha0hg9cpljk6kif0"))))
|
| 725 | (build-system gnu-build-system)
|
| 726 | (arguments
|
| 727 | (list
|
| 728 | #:configure-flags
|
| 729 | #~(list "--enable-python-bindings") |
| 730 |
|
| 731 | |
| 732 | #:disallowed-references (and (not (%current-target-system))
|
| 733 | (list (canonical-package gcc)))
|
| 734 | #:phases
|
| 735 | #~(modify-phases %standard-phases
|
| 736 | (replace 'bootstrap
|
| 737 | (lambda _
|
| 738 | (for-each patch-shebang
|
| 739 | (cons "autogen.pl" (find-files "config")))
|
| 740 | (invoke "./autogen.pl")))
|
| 741 | (add-after 'unpack 'set-LDFLAGS
|
| 742 | (lambda _
|
| 743 | |
| 744 | |
| 745 | (setenv "LDFLAGS"
|
| 746 | (string-append "-Wl,-rpath=" #$output "/lib"))))
|
| 747 | (add-before 'configure 'strip-pmix-cc-absolute
|
| 748 | (lambda _
|
| 749 | |
| 750 | |
| 751 | |
| 752 | (substitute* "configure"
|
| 753 | (("PMIX_CC_ABSOLUTE=\"(.*)\"" _ cc)
|
| 754 | (string-append "PMIX_CC_ABSOLUTE=\"$(basename \""
|
| 755 | cc "\")\"\n")))))
|
| 756 | (add-after 'configure 'strip-pmix-config-header
|
| 757 | (lambda _
|
| 758 | (substitute* "src/include/pmix_config.h"
|
| 759 | (("#define PMIX_CONFIGURE_CLI .*")
|
| 760 | "#define PMIX_CONFIGURE_CLI \"[scrubbed]\"\n")))))))
|
| 761 | (inputs (list libevent `(,hwloc "lib") munge zlib))
|
| 762 | (native-inputs
|
| 763 | (list autoconf
|
| 764 | automake
|
| 765 | libtool
|
| 766 | perl
|
| 767 | flex
|
| 768 | python
|
| 769 | python-cython
|
| 770 | python-setuptools))
|
| 771 | (synopsis "PMIx library")
|
| 772 | (description
|
| 773 | "PMIx is an application programming interface standard that provides
|
| 774 | libraries and programming models with portable and well-defined access to
|
| 775 | commonly needed services in distributed and parallel computing systems.")
|
| 776 | (home-page "https://openpmix.org/")
|
| 777 | |
| 778 | (supported-systems %64bit-supported-systems)
|
| 779 | |
| 780 | (license (license:fsf-free "https://github.com/openpmix/openpmix?tab=License-1-ov-file#License-1-ov-file"))))
|
| 781 |
|
| 782 | (define-public openpmix-5
|
| 783 | (package
|
| 784 | (inherit openpmix)
|
| 785 | (name "openpmix")
|
| 786 | (version "5.0.10")
|
| 787 | (source (origin
|
| 788 | (method git-fetch)
|
| 789 | (uri (git-reference
|
| 790 | (url "https://github.com/openpmix/openpmix")
|
| 791 | (commit (string-append "v" version))
|
| 792 | (recursive? #t))) |
| 793 | (file-name (git-file-name name version))
|
| 794 | (sha256
|
| 795 | (base32
|
| 796 | "0m1zg6bgrbchpfvcvhiznpb5bk98lm0vfxrac08kghldjw4dkc4b"))))
|
| 797 | (arguments
|
| 798 | (substitute-keyword-arguments arguments
|
| 799 | ((#:configure-flags flags #~'())
|
| 800 | #~(list (string-append "--with-hwloc="
|
| 801 | (ungexp (this-package-input "hwloc") "lib"))
|
| 802 | "--enable-python-bindings"))))))
|
| 803 |
|
| 804 | |
| 805 | (define-deprecated-package openpmix-4 openpmix-5)
|
| 806 |
|
| 807 | (define-public prrte
|
| 808 | (package
|
| 809 | (name "prrte")
|
| 810 | (version "4.1.0")
|
| 811 | (source (origin
|
| 812 | (method git-fetch)
|
| 813 | (uri (git-reference
|
| 814 | (url "https://github.com/openpmix/prrte")
|
| 815 | (commit (string-append "v" version))
|
| 816 | (recursive? #t))) |
| 817 | (file-name (git-file-name name version))
|
| 818 | (sha256
|
| 819 | (base32
|
| 820 | "0f40hpppvfcc2ckryb1v6wckjqw6j0480dmixrf0ip69mcb9vv8l"))
|
| 821 | (modules '((guix build utils)))
|
| 822 | (snippet
|
| 823 | |
| 824 | #~(substitute* "autogen.pl"
|
| 825 | (("-f \".gitmodules\"")
|
| 826 | "0")))))
|
| 827 | (build-system gnu-build-system)
|
| 828 | (arguments
|
| 829 | (list #:configure-flags
|
| 830 | #~(list "--disable-static")
|
| 831 |
|
| 832 | #:phases
|
| 833 | #~(modify-phases %standard-phases
|
| 834 | (add-after 'unpack 'remove-absolute-references
|
| 835 | (lambda _
|
| 836 | |
| 837 | |
| 838 | (substitute* "config/prte_setup_cc.m4"
|
| 839 | (("AC_SUBST\\(PRTE_CC_ABSOLUTE\\)")
|
| 840 | (string-append
|
| 841 | "PRTE_CC_ABSOLUTE=\"$(basename $PRTE_CC_ABSOLUTE)\"\n"
|
| 842 | "AC_SUBST([PRTE_CC_ABSOLUTE])\n")))
|
| 843 | (substitute* "configure.ac"
|
| 844 | (("PRTE_CAPTURE_CONFIGURE_CLI\\(\\[PRTE_CONFIGURE_CLI\\]\\)"
|
| 845 | all)
|
| 846 | (string-append
|
| 847 | "dnl " all "\n"
|
| 848 | "PRTE_CONFIGURE_CLI=\"[elided to reduce closure]\"\n"
|
| 849 | "AC_SUBST([PRTE_CONFIGURE_CLI])\n"
|
| 850 | "AC_DEFINE_UNQUOTED([PRTE_CONFIGURE_CLI],"
|
| 851 | " [\"$PRTE_CONFIGURE_CLI\"],"
|
| 852 | " [Capture the configure cmd line])\n")))))
|
| 853 | (replace 'bootstrap
|
| 854 | (lambda _
|
| 855 | (for-each patch-shebang
|
| 856 | (cons "autogen.pl" (find-files "config")))
|
| 857 | (invoke "./autogen.pl")))
|
| 858 | (add-after 'unpack 'patch-prted-reference
|
| 859 | (lambda _
|
| 860 | |
| 861 | |
| 862 | (substitute* "src/runtime/prte_mca_params.c"
|
| 863 | (("prte_launch_agent =.*")
|
| 864 | (string-append "prte_launch_agent = \""
|
| 865 | #$output "/bin/prted\";\n")))))
|
| 866 | (add-after 'install 'adjust-pcc-link
|
| 867 | (lambda* (#:key inputs #:allow-other-keys)
|
| 868 | |
| 869 | |
| 870 | (let* ((pcc (string-append #$output "/bin/pcc"))
|
| 871 | (target (string-append "/bin/" (readlink pcc))))
|
| 872 | (delete-file pcc)
|
| 873 | (symlink (search-input-file inputs target)
|
| 874 | pcc)))))
|
| 875 |
|
| 876 | #:disallowed-references (list (canonical-package gcc))))
|
| 877 | (inputs (list libevent
|
| 878 | `(,hwloc "lib")
|
| 879 | openpmix
|
| 880 | libnl))
|
| 881 | (native-inputs
|
| 882 | (list autoconf
|
| 883 | automake
|
| 884 | flex
|
| 885 | libtool
|
| 886 | perl
|
| 887 | pkg-config
|
| 888 | python)) |
| 889 | (synopsis "PMIx Reference RunTime Environment (PRRTE)")
|
| 890 | (description
|
| 891 | "The PMIx Reference RunTime Environment is a runtime environment
|
| 892 | containing the reference implementation and capable of operating
|
| 893 | within a host SMS. The reference RTE therefore provides an easy way of
|
| 894 | exploring PMIx capabilities and testing PMIx-based applications
|
| 895 | outside of a PMIx-enabled environment.")
|
| 896 | (home-page "https://openpmix.github.io/")
|
| 897 | |
| 898 | (license (license:fsf-free "https://github.com/openpmix/prrte?tab=License-1-ov-file#License-1-ov-file"))))
|
| 899 |
|
| 900 | (define-public python-simple-slurm
|
| 901 | (package
|
| 902 | (name "python-simple-slurm")
|
| 903 | (version "0.3.6")
|
| 904 | (source (origin
|
| 905 | (method git-fetch)
|
| 906 | (uri (git-reference
|
| 907 | (url "https://github.com/amq92/simple_slurm")
|
| 908 | (commit (string-append "v" version))))
|
| 909 | (file-name (git-file-name name version))
|
| 910 | (sha256
|
| 911 | (base32
|
| 912 | "1vfbd8rp4qd9375f2v26dm99c53jc3x3dpcllz812ly964qi7rnd"))))
|
| 913 | (build-system pyproject-build-system)
|
| 914 | (arguments
|
| 915 | (list
|
| 916 | #:test-flags
|
| 917 | #~(list
|
| 918 | |
| 919 | "--deselect=test/test_cli.py::Testing::test_01_using_equal"
|
| 920 | "--deselect=test/test_cli.py::Testing::test_02_using_spaces"
|
| 921 | "--deselect=test/test_cli.py::Testing::test_03_using_equal_and_spaces"
|
| 922 | "--deselect=test/test_core.py::Testing::test_14_srun_returncode"
|
| 923 | "--deselect=test/test_core.py::Testing::test_15_sbatch_execution"
|
| 924 | "--deselect=test/test_core.py::Testing::test_19_sbatch_execution_with_job_file"
|
| 925 | "--deselect=test/test_core.py::Testing::test_22_parsable_sbatch_execution")
|
| 926 | #:phases
|
| 927 | #~(modify-phases %standard-phases
|
| 928 | (add-after 'unpack 'hardcode-sbatch-and-srun-command
|
| 929 | (lambda* (#:key inputs #:allow-other-keys)
|
| 930 | (substitute* "simple_slurm/core.py"
|
| 931 | (("\"sbatch\"")
|
| 932 | (string-append "\"" (search-input-file inputs "/bin/sbatch") "\""))
|
| 933 | (("\"srun\"")
|
| 934 | (string-append "\"" (search-input-file inputs "/bin/srun") "\""))))))))
|
| 935 | (native-inputs (list python-setuptools python-pytest))
|
| 936 | (inputs (list slurm))
|
| 937 | (home-page "https://github.com/amq92/simple_slurm")
|
| 938 | (synopsis "Simple Python wrapper for Slurm with flexibility in mind")
|
| 939 | (description
|
| 940 | "This package provides a simple Python wrapper for Slurm with flexibility in
|
| 941 | mind.")
|
| 942 | (license license:agpl3)))
|