gnu: sssd: Update to 2.7.4.
[jackhill/guix/guix.git] / gnu / packages / mpi.scm
CommitLineData
fb0e3709 1;;; GNU Guix --- Functional package management for GNU
41313ace 2;;; Copyright © 2014, 2015, 2018, 2019 Eric Bavier <bavier@member.fsf.org>
7bf85e63 3;;; Copyright © 2014-2022 Ludovic Courtès <ludo@gnu.org>
29a7c98a 4;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
37d6b097 5;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
1f9bff41 6;;; Copyright © 2017 Dave Love <fx@gnu.org>
c8045fa0 7;;; Copyright © 2017, 2022 Efraim Flashner <efraim@flashner.co.il>
8578b8d8 8;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <me@tobias.gr>
54fcd547 9;;; Copyright © 2018 Paul Garlick <pgarlick@tourbillion-technology.com>
2d6be35e 10;;; Copyright © 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
fb0e3709
EB
11;;;
12;;; This file is part of GNU Guix.
13;;;
14;;; GNU Guix is free software; you can redistribute it and/or modify it
15;;; under the terms of the GNU General Public License as published by
16;;; the Free Software Foundation; either version 3 of the License, or (at
17;;; your option) any later version.
18;;;
19;;; GNU Guix is distributed in the hope that it will be useful, but
20;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;;; GNU General Public License for more details.
23;;;
24;;; You should have received a copy of the GNU General Public License
25;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27(define-module (gnu packages mpi)
28 #:use-module (guix packages)
15e62623 29 #:use-module ((guix licenses) #:prefix license:)
fb0e3709 30 #:use-module (guix download)
29a7c98a 31 #:use-module (guix utils)
8c8e1089 32 #:use-module (guix deprecation)
fb0e3709 33 #:use-module (guix build-system gnu)
54fcd547 34 #:use-module (guix build-system python)
fb0e3709 35 #:use-module (gnu packages)
c70261bf
MB
36 #:use-module (gnu packages base)
37 #:use-module (gnu packages compression)
e9823f9c 38 #:use-module (gnu packages fabric-management)
fb0e3709 39 #:use-module (gnu packages gcc)
fa5a2538 40 #:use-module (gnu packages java)
41313ace 41 #:use-module (gnu packages libevent)
2b0d560a
LC
42 #:use-module (gnu packages linux)
43 #:use-module (gnu packages pciutils)
44 #:use-module (gnu packages xorg)
45 #:use-module (gnu packages gtk)
46 #:use-module (gnu packages xml)
38f0a2ba 47 #:use-module (gnu packages perl)
2b0d560a 48 #:use-module (gnu packages ncurses)
b07712bf 49 #:use-module (gnu packages parallel)
2b0d560a 50 #:use-module (gnu packages pkg-config)
91298042 51 #:use-module (gnu packages valgrind)
71e78931 52 #:use-module (srfi srfi-1)
91298042 53 #:use-module (ice-9 match))
fb0e3709 54
8ec7ca22 55(define-public hwloc-1
71e78931
LC
56 ;; Note: For now we keep 1.x as the default because many packages have yet
57 ;; to migrate to 2.0.
2b0d560a
LC
58 (package
59 (name "hwloc")
37fa6136 60 (version "1.11.13")
2b0d560a
LC
61 (source (origin
62 (method url-fetch)
a2d0e200 63 (uri (string-append "https://www.open-mpi.org/software/hwloc/v"
ce7d9c98
EB
64 (version-major+minor version)
65 "/downloads/hwloc-" version ".tar.bz2"))
2b0d560a
LC
66 (sha256
67 (base32
37fa6136
PS
68 "1j69p8a1pjpbpwn4w7l4dfxmaxxqikchjzqw1ncw05zmcmvlnjd4"))
69 (patches (search-patches "hwloc-1-test-btrfs.patch"))))
fe96f641
LC
70
71 (properties
72 ;; Tell the 'generic-html' updater to monitor this URL for updates.
73 `((release-monitoring-url
74 . "https://www-lb.open-mpi.org/software/hwloc/current")))
75
2b0d560a 76 (build-system gnu-build-system)
798b7678
LC
77 (outputs '("out" ;'lstopo' & co., depends on Cairo, libx11, etc.
78 "lib" ;small closure
305eefc0 79 "doc" ;400+ section 3 man pages
798b7678 80 "debug"))
2b0d560a 81 (inputs
d81d8b12 82 (append (list libx11 cairo ncurses expat)
ac2d3655 83 (if (target-arm32?) '() (list numactl))))
c6e59259
LC
84 (propagated-inputs
85 ;; hwloc.pc lists it in 'Requires.private'.
8394619b 86 (list libpciaccess))
2b0d560a 87 (native-inputs
8394619b 88 (list pkg-config))
579f5c8a 89 (arguments
7eb9f31c
LC
90 `(#:configure-flags '("--localstatedir=/var")
91 #:phases
579f5c8a 92 (modify-phases %standard-phases
10de06bd
LC
93 (add-before 'check 'skip-linux-libnuma-test
94 (lambda _
95 ;; Arrange to skip 'tests/linux-libnuma', which fails on some
96 ;; machines: <https://github.com/open-mpi/hwloc/issues/213>.
97 (substitute* "tests/linux-libnuma.c"
98 (("numa_available\\(\\)")
649556ea 99 "-1"))))
798b7678
LC
100 (add-after 'install 'refine-libnuma
101 ;; Give -L arguments for libraries to avoid propagation
102 (lambda* (#:key inputs outputs #:allow-other-keys)
103 (let ((out (assoc-ref outputs "lib"))
104 (numa (assoc-ref inputs "numactl")))
105 (substitute* (map (lambda (f) (string-append out "/" f))
106 '("lib/pkgconfig/hwloc.pc" "lib/libhwloc.la"))
107 (("-lnuma" lib)
108 (string-append "-L" numa "/lib " lib))))))
109 (add-after 'install 'avoid-circular-references
110 (lambda* (#:key outputs #:allow-other-keys)
111 (let ((lib (assoc-ref outputs "lib")))
112 ;; Suppress the 'prefix=' and 'exec_prefix=' lines so that the
113 ;; "lib" output doesn't refer to "out".
114 (substitute* (string-append lib "/lib/pkgconfig/hwloc.pc")
115 (("^.*prefix=.*$")
649556ea 116 "")))))
305eefc0
LC
117 (add-after 'install 'move-man3-pages
118 (lambda* (#:key outputs #:allow-other-keys)
119 ;; Move section 3 man pages to the "doc" output.
120 (let ((out (assoc-ref outputs "out"))
121 (doc (assoc-ref outputs "doc")))
122 (copy-recursively (string-append out "/share/man/man3")
123 (string-append doc "/share/man/man3"))
649556ea
LC
124 (delete-file-recursively
125 (string-append out "/share/man/man3"))))))))
a2d0e200 126 (home-page "https://www.open-mpi.org/projects/hwloc/")
2b0d560a
LC
127 (synopsis "Abstraction of hardware architectures")
128 (description
129 "hwloc provides a portable abstraction (across OS,
130versions, architectures, ...) of the hierarchical topology of modern
131architectures, including NUMA memory nodes, sockets, shared caches, cores and
132simultaneous multithreading. It also gathers various attributes such as cache
133and memory information. It primarily aims at helping high-performance
134computing applications with gathering information about the hardware so as to
135exploit it accordingly and efficiently.
136
137hwloc may display the topology in multiple convenient formats. It also offers
138a powerful programming interface to gather information about the hardware,
139bind processes, and much more.")
15e62623 140 (license license:bsd-3)))
2b0d560a 141
8c8e1089 142(define-public hwloc-2
1a1d0fe5 143 ;; Note: 2.x isn't the default yet, see above.
71e78931 144 (package
8ec7ca22 145 (inherit hwloc-1)
111bdcff 146 (version "2.8.0")
71e78931
LC
147 (source (origin
148 (method url-fetch)
1a1d0fe5 149 (uri (string-append "https://download.open-mpi.org/release/hwloc/v"
71e78931 150 (version-major+minor version)
1a1d0fe5 151 "/hwloc-" version ".tar.bz2"))
71e78931
LC
152 (sha256
153 (base32
111bdcff 154 "1ha23yqfx9kfxm5fcj9m0fnyf0r2k6p4k88xxqishclcsky752il"))))
71e78931
LC
155
156 ;; libnuma is no longer needed.
d81d8b12
LC
157 (inputs (modify-inputs (package-inputs hwloc-1)
158 (delete "numactl")))
10de06bd 159 (arguments
0d8a8234 160 (substitute-keyword-arguments (package-arguments hwloc-1)
10de06bd
LC
161 ((#:phases phases)
162 `(modify-phases ,phases
163 (replace 'skip-linux-libnuma-test
164 (lambda _
165 ;; Arrange to skip 'tests/hwloc/linux-libnuma', which fails on
166 ;; some machines: <https://github.com/open-mpi/hwloc/issues/213>.
167 (substitute* "tests/hwloc/linux-libnuma.c"
168 (("numa_available\\(\\)")
649556ea 169 "-1"))))
8db4e704
LC
170 (add-before 'check 'skip-test-that-fails-on-qemu
171 (lambda _
172 ;; Skip test that fails on emulated hardware due to QEMU bug:
173 ;; <https://bugs.gnu.org/40342>.
174 (substitute* "tests/hwloc/hwloc_get_last_cpu_location.c"
175 (("hwloc_topology_init" all)
649556ea 176 (string-append "exit (77);\n" all)))))))))))
71e78931 177
9b65dea8 178(define-deprecated hwloc-2.0 hwloc-2)
8c8e1089 179
8ec7ca22
LC
180(define-public hwloc
181 ;; The latest stable series of hwloc.
182 hwloc-2)
183
fb0e3709
EB
184(define-public openmpi
185 (package
186 (name "openmpi")
8578b8d8 187 (version "4.1.4")
fb0e3709
EB
188 (source
189 (origin
190 (method url-fetch)
6876590f 191 (uri (string-append "https://www.open-mpi.org/software/ompi/v"
29a7c98a 192 (version-major+minor version)
fb0e3709
EB
193 "/downloads/openmpi-" version ".tar.bz2"))
194 (sha256
8578b8d8 195 (base32 "03ckngrff1cl0l81vfvrfhp99rbgk7s0633kr1l468yibwbjx4cj"))
68ac34e1 196 (patches (search-patches "openmpi-mtl-priorities.patch"))))
14aa86e5
LC
197
198 (properties
199 ;; Tell the 'generic-html' updater to monitor this URL for updates.
200 `((release-monitoring-url
201 . "https://www.open-mpi.org/software/ompi/current")))
202
fb0e3709 203 (build-system gnu-build-system)
5b527256 204 (inputs
b478d55a
LC
205 (let ((if-supported
206 (lambda (package)
207 (if (and (not (%current-target-system))
208 (member (%current-system)
209 (package-supported-systems package)))
210 (list package)
211 '()))))
212 (append (list `(,hwloc-2 "lib")
213 gfortran
214 libfabric
215 libevent
216 opensm)
217 (if-supported psm)
218 (if-supported psm2)
219 (if-supported ucx)
c8045fa0 220 (if-supported valgrind)
b478d55a 221 (list rdma-core
b478d55a 222 slurm)))) ;for PMI support (launching via "srun")
5b527256 223 (native-inputs
8394619b 224 (list pkg-config perl))
c971d9ef 225 (outputs '("out" "debug"))
fb0e3709 226 (arguments
b08952f1 227 `(#:configure-flags `("--enable-mpi-ext=affinity" ;cr doesn't work
efcacc17 228 "--with-sge"
c8045fa0
EF
229
230 ,@(if ,(package? (this-package-input "valgrind"))
231 `("--enable-memchecker"
232 "--with-valgrind")
233 `("--without-valgrind"))
234
41313ace
EB
235 "--with-hwloc=external"
236 "--with-libevent"
e9823f9c 237
215b49a8
LC
238 ;; Help 'orterun' and 'mpirun' find their tools
239 ;; under $prefix by default.
240 "--enable-mpirun-prefix-by-default"
241
e9823f9c
RW
242 ;; InfiniBand support
243 "--enable-openib-control-hdr-padding"
244 "--enable-openib-dynamic-sl"
245 "--enable-openib-udcm"
246 "--enable-openib-rdmacm"
247 "--enable-openib-rdmacm-ibaddr"
248
b07712bf
LC
249 ;; Enable support for SLURM's Process Manager
250 ;; Interface (PMI).
251 ,(string-append "--with-pmi="
252 (assoc-ref %build-inputs "slurm")))
9474a4b3 253 #:phases (modify-phases %standard-phases
e9823f9c
RW
254 ;; opensm is needed for InfiniBand support.
255 (add-after 'unpack 'find-opensm-headers
256 (lambda* (#:key inputs #:allow-other-keys)
257 (setenv "C_INCLUDE_PATH"
425ccde6
LC
258 (search-input-directory inputs
259 "/include/infiniband"))
e9823f9c 260 (setenv "CPLUS_INCLUDE_PATH"
425ccde6
LC
261 (search-input-directory inputs
262 "/include/infiniband"))))
0d97d3cb 263 (add-before 'build 'remove-absolute
0d97d3cb 264 (lambda _
a247fe7b
DL
265 ;; Remove compiler absolute file names (OPAL_FC_ABSOLUTE
266 ;; etc.) to reduce the closure size. See
267 ;; <https://lists.gnu.org/archive/html/guix-devel/2017-07/msg00388.html>
268 ;; and
269 ;; <https://www.mail-archive.com/users@lists.open-mpi.org//msg31397.html>.
0d97d3cb
DL
270 (substitute* '("orte/tools/orte-info/param.c"
271 "oshmem/tools/oshmem_info/param.c"
272 "ompi/tools/ompi_info/param.c")
273 (("_ABSOLUTE") ""))
a247fe7b
DL
274 ;; Avoid valgrind (which pulls in gdb etc.).
275 (substitute*
41313ace
EB
276 '("./ompi/mca/io/romio321/src/io_romio321_component.c")
277 (("MCA_io_romio321_COMPLETE_CONFIGURE_FLAGS")
88d0b086 278 "\"[elided to reduce closure]\""))))
9474a4b3
EB
279 (add-before 'build 'scrub-timestamps ;reproducibility
280 (lambda _
281 (substitute* '("ompi/tools/ompi_info/param.c"
282 "orte/tools/orte-info/param.c"
283 "oshmem/tools/oshmem_info/param.c")
88d0b086 284 ((".*(Built|Configured) on.*") ""))))
9474a4b3
EB
285 (add-after 'install 'remove-logs ;reproducibility
286 (lambda* (#:key outputs #:allow-other-keys)
287 (let ((out (assoc-ref outputs "out")))
88d0b086 288 (for-each delete-file (find-files out "config.log"))))))))
f9a69e9b 289 (home-page "https://www.open-mpi.org")
bb0f6d75 290 (synopsis "MPI-3 implementation")
fb0e3709 291 (description
bb0f6d75 292 "The Open MPI Project is an MPI-3 implementation that is developed and
8ede638c
EB
293maintained by a consortium of academic, research, and industry partners. Open
294MPI is therefore able to combine the expertise, technologies, and resources
295from all across the High Performance Computing community in order to build the
296best MPI library available. Open MPI offers advantages for system and
297software vendors, application developers and computer science researchers.")
fb0e3709 298 ;; See file://LICENSE
15e62623 299 (license license:bsd-2)))
685bef2b 300
2d6be35e
RW
301(define-public openmpi-c++
302 (package/inherit openmpi
303 (name "openmpi-c++")
304 (outputs '("out"))
305 (arguments
306 (substitute-keyword-arguments (package-arguments openmpi)
307 ((#:configure-flags flags)
308 `(cons "--enable-mpi-cxx" ,flags))))
309 (synopsis "C++ bindings for MPI")))
310
fa5a2538
RW
311;; TODO: javadoc files contain timestamps.
312(define-public java-openmpi
1a265842 313 (package/inherit openmpi
fa5a2538
RW
314 (name "java-openmpi")
315 (inputs
316 `(("openmpi" ,openmpi)
317 ,@(package-inputs openmpi)))
318 (native-inputs
319 `(("jdk" ,openjdk11 "jdk")
320 ("zip" ,(@ (gnu packages compression) zip))
321 ,@(package-native-inputs openmpi)))
322 (outputs '("out"))
323 (arguments
324 `(#:modules ((guix build gnu-build-system)
325 ((guix build ant-build-system) #:prefix ant:)
326 (guix build utils))
327 #:imported-modules ((guix build ant-build-system)
328 (guix build syscalls)
329 ,@%gnu-build-system-modules)
330 ,@(substitute-keyword-arguments (package-arguments openmpi)
331 ((#:configure-flags flags)
332 `(cons "--enable-mpi-java" ,flags))
333 ((#:make-flags flags ''())
334 `(append '("-C" "ompi/mpi/java")
335 ,flags))
336 ((#:phases phases)
337 `(modify-phases ,phases
338 ;; We could provide the location of the JDK in the configure
339 ;; flags, but since the configure flags are embedded in the
340 ;; info binaries that would leave a reference to the JDK in
341 ;; the "out" output. To avoid this we set JAVA_HOME.
342 (add-after 'unpack 'set-JAVA_HOME
343 (lambda* (#:key inputs #:allow-other-keys)
344 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
345 #t))
346 (add-after 'unpack 'link-with-existing-mpi-libraries
347 (lambda* (#:key inputs #:allow-other-keys)
348 (substitute* "ompi/mpi/java/c/Makefile.in"
349 (("\\$\\(top_builddir\\)/ompi/lib@OMPI_LIBMPI_NAME@.la")
377e9453 350 (search-input-file inputs "/lib/libmpi.la")))))
fa5a2538
RW
351 (add-after 'install 'strip-jar-timestamps
352 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
353 (synopsis "Java bindings for MPI")))
354
685bef2b 355(define-public openmpi-thread-multiple
1a265842 356 (package/inherit openmpi
685bef2b
DL
357 (name "openmpi-thread-multiple")
358 (arguments
359 (substitute-keyword-arguments (package-arguments openmpi)
360 ((#:configure-flags flags)
361 `(cons "--enable-mpi-thread-multiple" ,flags))))
362 (description " This version of Open@tie{}MPI has an implementation of
363@code{MPI_Init_thread} that provides @code{MPI_THREAD_MULTIPLE}. This won't
364work correctly with all transports (such as @code{openib}), and the
365performance is generally worse than the vanilla @code{openmpi} package, which
366only provides @code{MPI_THREAD_FUNNELED}.")))
bbe46a4a
EB
367
368;;; Build phase to be used for packages that execute MPI code.
369(define-public %openmpi-setup
370 '(lambda _
371 ;; By default, running the test suite would fail because 'ssh' could not
372 ;; be found in $PATH. Define this variable to placate Open MPI without
373 ;; adding a dependency on OpenSSH (the agent isn't used anyway.)
374 (setenv "OMPI_MCA_plm_rsh_agent" (which "false"))
375 ;; Allow oversubscription in case there are less physical cores available
376 ;; in the build environment than the package wants while testing.
41313ace 377 (setenv "OMPI_MCA_rmaps_base_mapping_policy" "core:OVERSUBSCRIBE")
b1077c22
LC
378
379 ;; UCX sometimes outputs uninteresting warnings such as:
380 ;;
381 ;; mpool.c:38 UCX WARN object 0x7ffff44fffc0 was not returned to mpool ucp_am_bufs
382 ;;
383 ;; These in turn leads to failures of test suites that capture and
384 ;; compare stdout, such as that of 'hdf5-parallel-openmpi'. Thus, tell
385 ;; UCX to not emit those warnings.
386 (setenv "UCX_LOG_LEVEL" "error")
bbe46a4a 387 #t))
54fcd547
PG
388
389(define-public python-mpi4py
390 (package
391 (name "python-mpi4py")
fe390200 392 (version "3.0.3")
54fcd547 393 (source
fe390200
TGR
394 (origin
395 (method url-fetch)
396 (uri (pypi-uri "mpi4py" version))
397 (sha256
398 (base32 "07ssbhssv27rrjx1c5vd3vsr31vay5d8xcf4zh9yblcyidn72b81"))))
54fcd547
PG
399 (build-system python-build-system)
400 (arguments
401 `(#:phases
402 (modify-phases %standard-phases
403 (add-after 'build 'mpi-setup
404 ,%openmpi-setup)
405 (add-before 'check 'pre-check
406 (lambda _
407 ;; Skip BaseTestSpawn class (causes error 'ompi_dpm_dyn_init()
408 ;; failed --> Returned "Unreachable"' in chroot environment).
409 (substitute* "test/test_spawn.py"
410 (("unittest.skipMPI\\('openmpi\\(<3.0.0\\)'\\)")
411 "unittest.skipMPI('openmpi')"))
412 #t)))))
413 (inputs
8394619b 414 (list openmpi))
54fcd547
PG
415 (home-page "https://bitbucket.org/mpi4py/mpi4py/")
416 (synopsis "Python bindings for the Message Passing Interface standard")
417 (description "MPI for Python (mpi4py) provides bindings of the Message
418Passing Interface (MPI) standard for the Python programming language, allowing
419any Python program to exploit multiple processors.
420
421mpi4py is constructed on top of the MPI-1/MPI-2 specification and provides an
422object oriented interface which closely follows MPI-2 C++ bindings. It
423supports point-to-point and collective communications of any picklable Python
424object as well as optimized communications of Python objects (such as NumPy
425arrays) that expose a buffer interface.")
15e62623 426 (license license:bsd-3)))
c70261bf
MB
427
428(define-public mpich
429 (package
430 (name "mpich")
431 (version "3.3.2")
432 (source (origin
433 (method url-fetch)
434 (uri (string-append "http://www.mpich.org/static/downloads/"
435 version "/mpich-" version ".tar.gz"))
436 (sha256
437 (base32
438 "1farz5zfx4cd0c3a0wb9pgfypzw0xxql1j1294z1sxslga1ziyjb"))))
439 (build-system gnu-build-system)
440 (inputs
3f536e01
LC
441 `(,zlib
442 (,hwloc-2 "lib")
443 ,slurm
c70261bf
MB
444 ,@(if (and (not (%current-target-system))
445 (member (%current-system) (package-supported-systems ucx)))
3f536e01 446 (list ucx)
c70261bf
MB
447 '())))
448 (native-inputs
8394619b 449 (list perl which gfortran))
c70261bf
MB
450 (outputs '("out" "debug"))
451 (arguments
452 `(#:configure-flags
453 (list "--disable-silent-rules" ;let's see what's happening
454 "--enable-debuginfo"
c73496f4
LC
455
456 ;; Default to "ch4", as will be the case in 3.4. It also works
457 ;; around issues when running test suites of packages that use
458 ;; MPICH: <https://issues.guix.gnu.org/39588#15>.
459 "--with-device=ch4:ucx" ; --with-device=ch4:ofi segfaults in tests
460
c70261bf
MB
461 (string-append "--with-hwloc-prefix="
462 (assoc-ref %build-inputs "hwloc"))
463
464 ,@(if (assoc "ucx" (package-inputs this-package))
465 `((string-append "--with-ucx="
466 (assoc-ref %build-inputs "ucx")))
467 '()))
468
469 #:phases (modify-phases %standard-phases
470 (add-after 'unpack 'patch-sources
471 (lambda _
472 (substitute* "./maint/gen_subcfg_m4"
473 (("/usr/bin/env") (which "env")))
474 (substitute* "src/glue/romio/all_romio_symbols"
475 (("/usr/bin/env") (which "env")))
476 (substitute* (find-files "." "buildiface")
477 (("/usr/bin/env") (which "env")))
478 (substitute* "maint/extracterrmsgs"
479 (("/usr/bin/env") (which "env")))
480 (substitute* (find-files "." "f77tof90")
481 (("/usr/bin/env") (which "env")))
482 (substitute* (find-files "." "\\.sh$")
3f536e01 483 (("/bin/sh") (which "sh")))))
c70261bf
MB
484 (add-before 'configure 'fix-makefile
485 (lambda _
486 ;; Remove "@hwloclib@" from 'pmpi_convenience_libs'.
487 ;; This fixes "No rule to make target '-lhwloc', needed
488 ;; by 'lib/libmpi.la'".
489 (substitute* "Makefile.in"
490 (("^pmpi_convenience_libs = (.*) @hwloclib@ (.*)$" _
491 before after)
492 (string-append "pmpi_convenience_libs = "
3f536e01 493 before " " after)))))
7bf85e63
LC
494 (add-before 'configure 'define-gfortran-wrapper
495 (lambda* (#:key inputs #:allow-other-keys)
496 ;; 'configure' checks whether the Fortran compiler
497 ;; allows argument type mismatch. Since gfortran >= 10
498 ;; does not, provide a wrapper that passes
499 ;; '-fallow-argument-mismatch' to get the desired
500 ;; behavior.
501 (mkdir-p ".gfortran-wrapper/bin")
502 (call-with-output-file ".gfortran-wrapper/bin/gfortran"
503 (lambda (port)
504 (display (string-append "#!" (which "sh") "\n")
505 port)
506 (display
507 (string-append "exec \"" (which "gfortran")
508 "\" -fallow-argument-mismatch"
509 " \"$@\"\n")
510 port)
511 (chmod port #o755)))
512
513 (setenv "PATH"
514 (string-append (getcwd) "/"
515 ".gfortran-wrapper/bin:"
516 (getenv "PATH"))))))))
c70261bf
MB
517 (home-page "https://www.mpich.org/")
518 (synopsis "Implementation of the Message Passing Interface (MPI)")
519 (description
520 "MPICH is a high-performance and portable implementation of the Message
521Passing Interface (MPI) standard (MPI-1, MPI-2 and MPI-3). MPICH provides an
522MPI implementation that efficiently supports different computation and
523communication platforms including commodity clusters, high-speed networks (10
524Gigabit Ethernet, InfiniBand, Myrinet, Quadrics), and proprietary high-end
525computing systems (Blue Gene, Cray). It enables research in MPI through a
526modular framework for other derived implementations.")
15e62623 527 (license license:bsd-2)))