mpi.scm 24 KB

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