hiepacs.scm 40.3 KB
Newer Older
Ludovic Courtès's avatar
Ludovic Courtès committed
1
2
3
;;; This module extends GNU Guix and is licensed under the same terms, those
;;; of the GNU GPL version 3 or (at your option) any later version.
;;;
4
;;; Copyright © 2017, 2019 Inria
Ludovic Courtès's avatar
Ludovic Courtès committed
5
6
7

(define-module (inria hiepacs)
  #:use-module (guix)
Ludovic Courtès's avatar
Ludovic Courtès committed
8
  #:use-module (guix git-download)
MARAIT Gilles's avatar
MARAIT Gilles committed
9
  #:use-module (guix hg-download)
Ludovic Courtès's avatar
Ludovic Courtès committed
10
11
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix build-system cmake)
12
  #:use-module (guix build-system gnu)
Ludovic Courtès's avatar
Ludovic Courtès committed
13
  #:use-module (gnu packages)
14
15
  #:use-module (gnu packages bison)
  #:use-module (gnu packages flex)
Ludovic Courtès's avatar
Ludovic Courtès committed
16
17
18
19
  #:use-module (gnu packages gcc)
  #:use-module (gnu packages maths)
  #:use-module (gnu packages mpi)
  #:use-module (gnu packages pkg-config)
20
  #:use-module (gnu packages python)
Ludovic Courtès's avatar
Ludovic Courtès committed
21
  #:use-module (gnu packages python-xyz)
22
  #:use-module (gnu packages ssh)
23
24
  #:use-module (gnu packages perl)
  #:use-module (inria mpi)
PRUVOST Florent's avatar
PRUVOST Florent committed
25
  #:use-module (inria storm)
GUILBAUD Adrien's avatar
GUILBAUD Adrien committed
26
  #:use-module (inria tadaam)
27
  #:use-module (inria eztrace)
28
  #:use-module (inria simgrid)
PRUVOST Florent's avatar
PRUVOST Florent committed
29
  #:use-module (guix utils)
30
  #:use-module (srfi srfi-1)
31
32
  ;; To remove when/if python2 packages sympy and mpi4py
  ;; are fixed in official repo
33
  #:use-module (guix build-system python)
34
  )
Ludovic Courtès's avatar
Ludovic Courtès committed
35

36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
(define-public parsec
  (package
    (name "parsec")
    (version "210d9d2b8cb292b64c01a597047581f27cf8cb54")
    (home-page "https://bitbucket.org/mfaverge/parsec.git")
    (synopsis "Runtime system based on dynamic task generation mechanism")
    (description
     "PaRSEC is a generic framework for architecture aware scheduling
and management of micro-tasks on distributed many-core heterogeneous
architectures.")
    (license license:bsd-2)
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url home-page)
                    (commit "210d9d2b8cb292b64c01a597047581f27cf8cb54")
                    (recursive? #t)))
              (file-name (string-append name "-" version "-checkout"))
              (sha256
               (base32
                "1yfny4ra9v3nxal1mbi0jqpivc0qamrx7m270qqnxjjp95vvky4z"))))
    (build-system cmake-build-system)
    (arguments
     '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON"
                           "-DPARSEC_GPU_WITH_CUDA=OFF"
                           "-DPARSEC_DIST_WITH_MPI=OFF")
       #:tests? #f))
    (inputs `(("hwloc" ,hwloc)
              ("bison" ,bison)
              ("flex" ,flex)))
    (native-inputs `(("gfortran" ,gfortran)
                     ("python" ,python-2)))))

(define-public quark
  (package
    (name "quark")
    (version "db4aef9a66a00487d849cf8591927dcebe18ef2f")
    (home-page "https://github.com/ecrc/quark")
    (synopsis "QUeuing And Runtime for Kernels")
    (description
     "QUARK (QUeuing And Runtime for Kernels) provides a library that
enables the dynamic execution of tasks with data dependencies in a
multi-core, multi-socket, shared-memory environment.  QUARK infers
data dependencies and precedence constraints between tasks from the
way that the data is used, and then executes the tasks in an
asynchronous, dynamic fashion in order to achieve a high utilization
of the available resources.")
    (license license:bsd-2)
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url home-page)
                    (commit "db4aef9a66a00487d849cf8591927dcebe18ef2f")))
              (file-name (string-append name "-" version "-checkout"))
              (sha256
               (base32
                "1bwh8247d70lmbr13h5cb8fpr6m0k9vcaim4bq7j8mynfclb6r77"))))
    (build-system cmake-build-system)
    (arguments
     '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")
       #:phases
       (modify-phases %standard-phases
        (add-after 'unpack 'patch-makefile
                    (lambda _
                      (substitute* "CMakeLists.txt"
                        (("DESTINATION quark")  "DESTINATION include"))
                      #t)))
       ;; No target for tests
       #:tests? #f))
    (inputs `(("hwloc" ,hwloc)))
    (native-inputs `(("gfortran" ,gfortran)))))

Ludovic Courtès's avatar
Ludovic Courtès committed
108
109
110
(define-public chameleon
  (package
    (name "chameleon")
111
    (version "1.0.0")
112
    (home-page "https://gitlab.inria.fr/solverstack/chameleon")
PRUVOST Florent's avatar
PRUVOST Florent committed
113
114
115
116
117
118
119
120
121
122
    (synopsis "Dense linear algebra solver")
    (description
     "Chameleon is a dense linear algebra solver relying on sequential
task-based algorithms where sub-tasks of the overall algorithms are submitted
to a run-time system.  Such a system is a layer between the application and
the hardware which handles the scheduling and the effective execution of
tasks on the processing units.  A run-time system such as StarPU is able to
manage automatically data transfers between not shared memory
area (CPUs-GPUs, distributed nodes).")
    (license license:cecill-c)
Ludovic Courtès's avatar
Ludovic Courtès committed
123
    (source (origin
124
125
126
              (method git-fetch)
              (uri (git-reference
                    (url home-page)
127
                    (commit "da81c248e229dc879b06bec41b1f5468416b7d9a")
128
129
130
                    ;; We need the submodule in 'CMakeModules/morse_cmake'.
                    (recursive? #t)))
              (file-name (string-append name "-" version "-checkout"))
Ludovic Courtès's avatar
Ludovic Courtès committed
131
132
              (sha256
               (base32
133
                "13yz75yqd6ilnw4s5ksb5qbvp18v2q4kgwq8w9ic8lfcw96p1bh9"))))
Ludovic Courtès's avatar
Ludovic Courtès committed
134
    (build-system cmake-build-system)
135
    (outputs '("debug" "out"))
Ludovic Courtès's avatar
Ludovic Courtès committed
136
    (arguments
137
138
     '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON"
                           "-DCHAMELEON_USE_MPI=ON")
Ludovic Courtès's avatar
Ludovic Courtès committed
139

140
       ;; FIXME: MPI tests too long for gitlab-runner CI
141
142
       #:tests? #f

Ludovic Courtès's avatar
Ludovic Courtès committed
143
       #:phases  (modify-phases %standard-phases
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
                                ;; Without this variable, pkg-config removes paths in already in CFLAGS
                                ;; However, gfortran does not check CPATH to find fortran modules
                                ;; and and the module fabulous_mod cannot be found
                                (add-before 'configure 'fix-pkg-config-env
                                            (lambda _ (setenv "PKG_CONFIG_ALLOW_SYSTEM_CFLAGS" "1") #t))
                                ;; Allow tests with more MPI processes than available CPU cores,
                                ;; which is not allowed by default by OpenMPI
                                (add-before 'check 'prepare-test-environment
                                            (lambda _
                                              (setenv "OMPI_MCA_rmaps_base_oversubscribe" "1") #t))
                                ;; Some of the tests use StarPU, which expects $HOME
                                ;; to be writable.
                                (add-before 'check 'set-home
                                            (lambda _
                                              (setenv "HOME" (getcwd))
                                              #t)))))
160
161
162
    (inputs `(("lapack" ,openblas)))
    (propagated-inputs `(("starpu" ,starpu)
                         ("mpi" ,openmpi)))
Ludovic Courtès's avatar
Ludovic Courtès committed
163
164
    (native-inputs `(("pkg-config" ,pkg-config)
                     ("gfortran" ,gfortran)
165
166
                     ("python" ,python)
                     ("openssh" ,openssh)))))
167
168
169
170
171
172
173
174
175

(define-public chameleon+simgrid
  (package
   (inherit chameleon)
   (name "chameleon-simgrid")
   (arguments
    (substitute-keyword-arguments (package-arguments chameleon)
                                  ((#:configure-flags flags '())
                                   `(cons "-DCHAMELEON_SIMULATION=ON" (delete "-DCHAMELEON_USE_MPI=ON" ,flags)))))
176
177
   (inputs `(("simgrid" ,simgrid)
             ,@(package-inputs chameleon)))
178
179
180
   (propagated-inputs `(("starpu" ,starpu+simgrid)
                        ,@(delete `("starpu" ,starpu) (package-inputs chameleon))
                        ,@(delete `("mpi" ,openmpi) (package-inputs chameleon))))))
181

182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
(define-public chameleon+openmp
  (package
   (inherit chameleon)
   (name "chameleon-openmp")
   (arguments
    (substitute-keyword-arguments (package-arguments chameleon)
                                  ((#:configure-flags flags '())
                                   `(cons "-DCHAMELEON_SCHED=OPENMP" (delete "-DCHAMELEON_USE_MPI=ON" ,flags)))))
   (propagated-inputs `(,@(delete `("starpu" ,starpu) (package-inputs chameleon))
                        ,@(delete `("mpi" ,openmpi) (package-inputs chameleon))))))

(define-public chameleon+quark
  (package
   (inherit chameleon)
   (name "chameleon-quark")
   (arguments
    (substitute-keyword-arguments (package-arguments chameleon)
                                  ((#:configure-flags flags '())
                                   `(cons "-DCHAMELEON_SCHED=QUARK" (delete "-DCHAMELEON_USE_MPI=ON" ,flags)))))
   (propagated-inputs `(("quark" ,quark)
             ,@(delete `("starpu" ,starpu) (package-inputs chameleon))
             ,@(delete `("mpi" ,openmpi) (package-inputs chameleon))))))

(define-public chameleon+parsec
  (package
   (inherit chameleon)
   (name "chameleon-parsec")
   (arguments
    (substitute-keyword-arguments (package-arguments chameleon)
                                  ((#:configure-flags flags '())
                                   `(cons "-DCHAMELEON_SCHED=PARSEC" (delete "-DCHAMELEON_USE_MPI=ON" ,flags)))))
   (propagated-inputs `(("parsec" ,parsec)
             ,@(delete `("starpu" ,starpu) (package-inputs chameleon))
             ,@(delete `("mpi" ,openmpi) (package-inputs chameleon))))))

Ludovic Courtès's avatar
Ludovic Courtès committed
217
218
219
(define-public maphys
  (package
    (name "maphys")
220
    (version "0.9.8.3")
221
    (home-page "https://gitlab.inria.fr/solverstack/maphys/maphys")
Ludovic Courtès's avatar
Ludovic Courtès committed
222
223
224
225
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url home-page)
226
                    (commit version)
Ludovic Courtès's avatar
Ludovic Courtès committed
227
228
229
230
231
                    ;; We need the submodule in 'cmake_modules/morse'.
                    (recursive? #t)))
              (file-name (string-append name "-" version "-checkout"))
              (sha256
               (base32
232
                "0xkg87gaxq55jxyrnaxvx4gp8bff14ph2aca94wmki5j05mf8vh0"))))
Ludovic Courtès's avatar
Ludovic Courtès committed
233
234
    (build-system cmake-build-system)
    (arguments
235

MARAIT Gilles's avatar
MARAIT Gilles committed
236
237
     '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON"
                           "-DMAPHYS_BUILD_TESTS=ON"
238
                           "-DMAPHYS_SDS_MUMPS=ON"
239
                           "-DMAPHYS_SDS_PASTIX=ON"
240
                           "-DCMAKE_EXE_LINKER_FLAGS=-lstdc++"
241
                           "-DMAPHYS_ITE_FABULOUS=ON"
242
                           "-DMAPHYS_ORDERING_PADDLE=ON"
243
                           "-DMAPHYS_BLASMT=ON"
244
                           )
245
246

       #:phases (modify-phases %standard-phases
247
248
249
                               ;; Without this variable, pkg-config removes paths in already in CFLAGS
                               ;; However, gfortran does not check CPATH to find fortran modules
                               ;; and and the module fabulous_mod cannot be found
250
251
                               (add-before 'configure 'fix-pkg-config-env
                                           (lambda _ (setenv "PKG_CONFIG_ALLOW_SYSTEM_CFLAGS" "1") #t))
252
253
                               ;; Allow tests with more MPI processes than available CPU cores,
                               ;; which is not allowed by default by OpenMPI
254
255
256
                               (add-before 'check 'prepare-test-environment
                                           (lambda _
                                             (setenv "OMPI_MCA_rmaps_base_oversubscribe" "1") #t)))))
257

258
    (inputs `(("hwloc" ,hwloc "lib")
Ludovic Courtès's avatar
Ludovic Courtès committed
259
              ("openmpi" ,openmpi)
260
              ("ssh" ,openssh)
Ludovic Courtès's avatar
Ludovic Courtès committed
261
262
              ("scalapack" ,scalapack)
              ("openblas" ,openblas)
263
              ;; ("lapack" ,lapack)
MARAIT Gilles's avatar
MARAIT Gilles committed
264
              ("scotch" ,pt-scotch)
265
              ("mumps" ,mumps-openmpi)
MARAIT Gilles's avatar
MARAIT Gilles committed
266
              ("pastix" ,pastix)
267
              ("fabulous" ,fabulous)
268
              ("paddle", paddle)
Ludovic Courtès's avatar
Ludovic Courtès committed
269
270
271
              ("metis" ,metis)))
    (native-inputs `(("gforgran" ,gfortran)
                     ("pkg-config" ,pkg-config)))
272
    (synopsis "Sparse matrix hybrid solver")
Ludovic Courtès's avatar
Ludovic Courtès committed
273
274
    (description
     "MaPHyS (Massively Parallel Hybrid Solver) is a parallel linear solver
275
that couples direct and iterative approaches. The underlying idea is to
Ludovic Courtès's avatar
Ludovic Courtès committed
276
apply to general unstructured linear systems domain decomposition ideas
277
developed for the solution of linear systems arising from PDEs. The
Ludovic Courtès's avatar
Ludovic Courtès committed
278
279
interface problem, associated with the so called Schur complement system, is
solved using a block preconditioner with overlap between the blocks that is
280
referred to as Algebraic Additive Schwarz.To cope with the possible lack of
Ludovic Courtès's avatar
Ludovic Courtès committed
281
282
283
284
285
coarse grid mechanism that enables one to keep constant the number of
iterations when the number of blocks is increased, the solver exploits two
levels of parallelism (between the blocks and within the treatment of the
blocks).  This enables it to exploit a large number of processors with a
moderate number of blocks which ensures a reasonable convergence behavior.")
MARAIT Gilles's avatar
MARAIT Gilles committed
286
    (license license:cecill-c)))
Ludovic Courtès's avatar
Ludovic Courtès committed
287

288
289
290
(define-public paddle
  (package
    (name "paddle")
291
    (version "0.3.4")
292
293
294
295
296
    (home-page "https://gitlab.inria.fr/solverstack/paddle")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url home-page)
297
                    (commit version)
298
299
300
301
302
                    ;; We need the submodule in 'cmake_modules/morse'.
                    (recursive? #t)))
              (file-name (string-append name "-" version "-checkout"))
              (sha256
               (base32
303
                "0znb88zi739z4lr2w116810gblw1hzd6pimsrmwivjvr94a0655i"))))
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
    (build-system cmake-build-system)
    (arguments
     '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON"
                           "-DPADDLE_BUILD_TESTS=ON"
                           "-DPADDLE_ORDERING_PARMETIS=OFF")
       #:phases (modify-phases %standard-phases
                                (add-before 'configure 'change-directory
                                            (lambda _ (chdir "src") #t))
                                (add-before 'check 'prepare-test-environment
                                            (lambda _
                                              ;; Allow tests with more MPI processes than available CPU cores,
                                              ;; which is not allowed by default by OpenMPI
                                              (setenv "OMPI_MCA_rmaps_base_oversubscribe" "1") #t)))))
    (inputs `(("openmpi" ,openmpi)
              ("ssh" ,openssh)
MARAIT Gilles's avatar
MARAIT Gilles committed
319
              ("scotch" ,pt-scotch)))
320
321
322
323
324
325
326
327
328
329
330
331
332
    (native-inputs `(("gforgran" ,gfortran)
                     ("pkg-config" ,pkg-config)))
    (synopsis "Parallel Algebraic Domain Decomposition for Linear systEms")
    (description
     "This  software’s goal is  to propose  a parallel
  algebraic strategy to decompose a  sparse linear system Ax=b, enabling
  its resolution by a domain decomposition solver.  Up to now, Paddle is
  implemented for the MaPHyS linear solver.")
    (license license:cecill-c)))

(define-public fabulous
  (package
    (name "fabulous")
333
    (version "1.0.1")
334
335
336
337
338
    (home-page "https://gitlab.inria.fr/solverstack/fabulous")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url home-page)
339
                    (commit version)
340
341
342
343
344
                    ;; We need the submodule in 'cmake_modules/morse'.
                    (recursive? #t)))
              (file-name (string-append name "-" version "-checkout"))
              (sha256
               (base32
345
                "1cla01sf3kg9ykgsyx68j8ihg2383q0g7nw1gq4wpmnv7kxm4q9m"))))
346
347
348
349
350
351
352
353
354
    (build-system cmake-build-system)
    (arguments
     '(#:configure-flags '("-DFABULOUS_BUILD_C_API=ON"
                           "-DFABULOUS_BUILD_Fortran_API=ON"
                           "-DCMAKE_EXE_LINKER_FLAGS=-lstdc++"
                           "-DFABULOUS_LAPACKE_NANCHECK=OFF"
                           "-DFABULOUS_USE_CHAMELEON=OFF"
                           "-DBUILD_SHARED_LIBS=ON"
                           "-DFABULOUS_BUILD_EXAMPLES=ON"
355
                           "-DFABULOUS_BUILD_TESTS=OFF")
356
357
358
359
360
361
362
363
364
365
                         #:tests? #f))
     (inputs `(("openblas" ,openblas)
               ("lapack" ,lapack)))
     (native-inputs `(("gforgran" ,gfortran)
                      ("pkg-config" ,pkg-config)))
     (synopsis "Fast Accurate Block Linear krylOv Solver")
     (description
      "Library implementing Block-GMres with Inexact Breakdown and Deflated Restarting")
     (license license:cecill-c)))

MARAIT Gilles's avatar
MARAIT Gilles committed
366
367
368
369
370
(define-public maphys++
  (package
   (name "maphys++")
   (version "0.1")
   (home-page "https://gitlab.inria.fr/solverstack/maphys/maphyspp.git")
371
   (synopsis "Sparse matrix hybrid solver")
MARAIT Gilles's avatar
MARAIT Gilles committed
372
373
   (description
    "MaPHyS (Massively Parallel Hybrid Solver) is a parallel linear solver
374
that couples direct and iterative approaches. The underlying idea is to
MARAIT Gilles's avatar
MARAIT Gilles committed
375
apply to general unstructured linear systems domain decomposition ideas
376
377
378
developed for the solution of linear systems arising from PDEs.
This new implementation in C++ offers a wide range of hybrid methods to
solve massive sparse systems efficiently.")
MARAIT Gilles's avatar
MARAIT Gilles committed
379
380
381
382
383
   (license license:cecill-c)
   (source (origin
            (method git-fetch)
            (uri (git-reference
                  (url home-page)
384
                  (commit "f0b91e98efab1324323d5bdf0f0163bc0695d45a")
MARAIT Gilles's avatar
MARAIT Gilles committed
385
386
387
388
389
390
                  ;; We need the submodule in 'cmake_modules/morse_cmake'.
                  (recursive? #t)))
            (file-name (string-append name "-" version "-checkout"))
            (sha256
             (base32
              "03sjykh24ms4h2vzylkxcc6v7nshl3w0dhyyrv9grzckmxvmvzij"))))
MARAIT Gilles's avatar
MARAIT Gilles committed
391
392
393
394
395
396
397
   (arguments
    '(#:configure-flags '("-DMAPHYS_COMPILE_EXAMPLES=ON"
                          "-DMAPHYS_COMPILE_TESTS=ON"
                          "-DMAPHYS_USE_ARMADILLO=OFF"
                          "-DMAPHYS_USE_EIGEN=OFF"
                          "-DMAPHYS_USE_FABULOUS=OFF"
                          "-DMAPHYS_DEV_TANGLE=OFF"
398
399
                          "-DMAPHYS_USE_PASTIX=ON"
                          "-DMAPHYS_USE_MUMPS=ON")
MARAIT Gilles's avatar
MARAIT Gilles committed
400
401
402
403
                        #:phases (modify-phases %standard-phases
                                                (add-before 'configure 'fixgcc7
                                                            (lambda _
                                                              (unsetenv "C_INCLUDE_PATH")
MARAIT Gilles's avatar
MARAIT Gilles committed
404
405
406
407
408
409
                                                              (unsetenv "CPLUS_INCLUDE_PATH") #t))
                                                (add-before 'check 'prepare-test-environment
                                                            (lambda _
                                                              ;; Allow tests with more MPI processes than available CPU cores,
                                                              ;; which is not allowed by default by OpenMPI
                                                              (setenv "OMPI_MCA_rmaps_base_oversubscribe" "1") #t)))
MARAIT Gilles's avatar
MARAIT Gilles committed
410
      ))
MARAIT Gilles's avatar
MARAIT Gilles committed
411
   (build-system cmake-build-system)
MARAIT Gilles's avatar
MARAIT Gilles committed
412
413
   (inputs `(("blaspp" ,blaspp)
             ("lapackpp" ,lapackpp)
414
             ("pastix" ,pastix)
415
416
417
             ("mumps" ,mumps-openmpi)
             ("scalapack" ,scalapack) ;; should be inherited from mumps?
             ))
418
419
   (propagated-inputs `(("mpi" ,openmpi)
                        ("ssh" ,openssh)))
MARAIT Gilles's avatar
MARAIT Gilles committed
420
421
   (native-inputs `(("gcc" ,gcc-7)
                    ("gcc-lib" ,gcc-7 "lib")
422
                    ("gfortran" ,gfortran)
MARAIT Gilles's avatar
MARAIT Gilles committed
423
                    ("pkg-config" ,pkg-config)))))
MARAIT Gilles's avatar
MARAIT Gilles committed
424
425
426
427
428

(define-public blaspp
  (package
    (name "blaspp")
    (version "0.1")
MARAIT Gilles's avatar
MARAIT Gilles committed
429
    (home-page "https://bitbucket.org/icl/blaspp")
MARAIT Gilles's avatar
MARAIT Gilles committed
430
431
    (synopsis "C++ API for the Basic Linear Algebra Subroutines")
    (description
MARAIT Gilles's avatar
MARAIT Gilles committed
432
433
434
435
436
437
438
     "The Basic Linear Algebra Subprograms (BLAS) have been around for many
decades and serve as the de facto standard for performance-portable and
numerically robust implementation of essential linear algebra functionality.The
objective of BLAS++ is to provide a convenient, performance oriented API for
development in the C++ language, that, for the most part, preserves established
conventions, while, at the same time, takes advantages of modern C++ features,
such as: namespaces, templates, exceptions, etc.")
MARAIT Gilles's avatar
MARAIT Gilles committed
439
    (source (origin
MARAIT Gilles's avatar
MARAIT Gilles committed
440
441
442
             (method hg-fetch)
             (uri (hg-reference
                   (url home-page)
443
                   (changeset "7859f573d9d04dfd38176fb7612edfa6d6d3ac0b")))
MARAIT Gilles's avatar
MARAIT Gilles committed
444
445
446
             (patches (search-patches "inria/patches/blaspp-installation-directories.patch"))
             (sha256
              (base32
MARAIT Gilles's avatar
MARAIT Gilles committed
447
               "0cgk9dxrc6h3bwdpfsgh3l5qlabg7rkvv76mvvsmjdlsk7v0dqss"))))
MARAIT Gilles's avatar
MARAIT Gilles committed
448
    (arguments
MARAIT Gilles's avatar
MARAIT Gilles committed
449
450
     '(#:configure-flags '("-DBLASPP_BUILD_TESTS=OFF")
                         #:tests? #f))
MARAIT Gilles's avatar
MARAIT Gilles committed
451
     ;;'(#:configure-flags '("-DBLASPP_BUILD_TESTS=ON")
MARAIT Gilles's avatar
MARAIT Gilles committed
452
    (build-system cmake-build-system)
MARAIT Gilles's avatar
MARAIT Gilles committed
453
    (propagated-inputs `(("openblas" ,openblas))) ;; technically only blas
MARAIT Gilles's avatar
MARAIT Gilles committed
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
    (native-inputs `(("gfortran" ,gfortran)))
    (license #f)))

(define-public lapackpp
  (package
    (name "lapackpp")
    (version "0.1")
    (home-page "https://bitbucket.org/icl/lapackpp")
    (synopsis "C++ API for the Linear Algebra PACKage")
    (description
     "The Linear Algebra PACKage (LAPACK) is a standard software library for
numerical linear algebra. The objective of LAPACK++ is to provide a convenient,
performance oriented API for development in the C++ language, that, for the most
part, preserves established conventions, while, at the same time, takes
advantages of modern C++ features, such as: namespaces, templates, exceptions,
etc.")
    (source (origin
             (method hg-fetch)
             (uri (hg-reference
                   (url home-page)
                   (changeset "154d3c06b02c1b16b36b862bd46421e19f5f17a6")))
             ;;(patches (search-patches "inria/patches/lapackpp-installation-directories.patch"))
             (sha256
              (base32
               "1n5j0myczh3ca7hndv0ziz6kd62ax59qac4njiy2q8kdvcmlmrh0"))))
    (arguments
480
481
     '(#:configure-flags '("-DBUILD_LAPACKPP_TESTS=OFF"
                           "-DBUILD_SHARED_LIBS=ON")
MARAIT Gilles's avatar
MARAIT Gilles committed
482
483
       #:tests? #f))
    (build-system cmake-build-system)
MARAIT Gilles's avatar
MARAIT Gilles committed
484
    (inputs `(("blaspp" ,blaspp)))
MARAIT Gilles's avatar
MARAIT Gilles committed
485
    (native-inputs `(("gfortran" ,gfortran)))
MARAIT Gilles's avatar
MARAIT Gilles committed
486
    (license #f)))
MARAIT Gilles's avatar
MARAIT Gilles committed
487

488
(define-public pastix-6
489
490
  (package
    (name "pastix")
RAMET Pierre's avatar
RAMET Pierre committed
491
    (version "6.0.3")
492
493
494
495
496
497
498
499
500
501
502
503
    (home-page "https://gitlab.inria.fr/solverstack/pastix")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url home-page)
                    (commit (string-append "v" version))

                    ;; We need the submodule in 'cmake_modules/morse'.
                    (recursive? #t)))
              (file-name (git-file-name name version))
              (sha256
               (base32
RAMET Pierre's avatar
RAMET Pierre committed
504
                "1ccj5p1zm50x3qd6yr7j5ajh2dlpmm95lhzrbyv9rbnxrk66azid"))))
505
506
507
    (build-system cmake-build-system)
    (arguments
     '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON"
MARAIT Gilles's avatar
MARAIT Gilles committed
508
                           "-DPASTIX_WITH_MPI=ON"
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
                           "-DPASTIX_WITH_STARPU=ON")

       #:phases (modify-phases %standard-phases
                  (add-before 'check 'prepare-test-environment
                    (lambda _
                      ;; StarPU expects $HOME to be writable.
                      (setenv "HOME" (getcwd))

                      ;; The Python-driven tests want to dlopen PaSTiX
                      ;; libraries (via ctypes) so we need to help them.
                      (let* ((libraries   (find-files "." "\\.so$"))
                             (directories (map (compose canonicalize-path
                                                        dirname)
                                               libraries)))
                        (setenv "LD_LIBRARY_PATH"
                                (string-join directories ":"))

                        ;; 'ctypes.util.find_library' tries to link with
                        ;; -lpastix.
                        (setenv "LIBRARY_PATH"
                                (string-append (getenv "LIBRARY_PATH") ":"
                                               (getenv "LD_LIBRARY_PATH")))

                        ;; Allow the 'python_simple' test to find spm.py.
                        (setenv "PYTHONPATH"
                                (string-append (getcwd) "/../source"
                                               "/spm/wrappers/python/spm:"
                                               (getenv "PYTHONPATH")))
                        #t))))

       ;; XXX: The 'python_simple' test fails with:
       ;;   ValueError: Attempted relative import in non-package
       #:tests? #f))
    (native-inputs
     `(("pkg-config" ,pkg-config)
       ("gfortran" ,gfortran)))
    (inputs
     `(("gfortran:lib" ,gfortran "lib")           ;for 'gcc … -lgfortran'
       ("openblas" ,openblas)
548
       ;; ("lapack" ,lapack)         ;must be built with '-DLAPACKE_WITH_TMG=ON'
549
550
551

       ;; The following are optional dependencies.
       ("metis" ,metis)
552
       ("starpu" ,starpu)
553
554
555
556
557
558
559
560
561

       ;; Python bindings and Python tests.
       ;;
       ;; XXX: The "Generate precision dependencies" CMake machinery uses the
       ;; "import imp", which is deprecated in Python 3 and leads to failures
       ;; down the road.  Thus, stick to Python 2 for now.
       ("python2" ,python-2)

       ("python-numpy" ,python2-numpy)
562
563
       ;; ("python-scipy" ,python2-scipy)
       ))
MARAIT Gilles's avatar
MARAIT Gilles committed
564
565
    (propagated-inputs `(("hwloc" ,hwloc "lib")
                         ("scotch" ,scotch)))
566
567
568
    (synopsis "Sparse matrix direct solver")
    (description
     "PaStiX (Parallel Sparse matriX package) is a scientific library that
Ludovic Courtès's avatar
Ludovic Courtès committed
569
570
571
572
573
574
provides a high performance parallel solver for very large sparse linear
systems based on direct methods.  Numerical algorithms are implemented in
single or double precision (real or complex) using LLt, LDLt and LU with
static pivoting (for non symmetric matrices having a symmetric pattern).
This solver also provides some low-rank compression methods to reduce the
memory footprint and/or the time-to-solution.")
575
    (license license:cecill)))
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649

(define-public pastix-5
  (package
  (inherit pastix-6)
  (name "pastix")
  (version "5.2.3")
  (source (origin
            (method url-fetch)
            (uri (string-append "https://gforge.inria.fr/frs/download.php/file/36212/pastix_5.2.3.tar.bz2"))
            (sha256
             (base32
              "0iqyxr5lzjpavmxzrjj4kwayq62nip3ssjcm80d20zk0n3k7h6b4"))))
  (build-system gnu-build-system)
  (arguments
   '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
     #:phases
     (modify-phases %standard-phases
                    (add-after 'unpack 'goto-src-dir
                             (lambda _
                               (chdir "src") #t))
                    (replace 'configure
                             (lambda _
                               (call-with-output-file "config.in"
                                 (lambda (port)
                                   (format port "
HOSTARCH    = i686_pc_linux
VERSIONBIT  = _32bit
EXEEXT      =
OBJEXT      = .o
LIBEXT      = .a
CCPROG      = gcc -Wall
CFPROG      = gfortran
CF90PROG    = gfortran -ffree-form
CXXPROG     = g++

MCFPROG     = mpif90
CF90CCPOPT  = -ffree-form -x f95-cpp-input
# Compilation options for optimization (make expor)
CCFOPT      = -O3
# Compilation options for debug (make | make debug)
CCFDEB      = -g3
CXXOPT      = -O3
NVCCOPT     = -O3

LKFOPT      =
MKPROG      = make
MPCCPROG    = mpicc -Wall
MPCXXPROG   = mpic++ -Wall
CPP         = cpp
ARFLAGS     = ruv
ARPROG      = ar
EXTRALIB    = -lgfortran -lm -lrt
CTAGSPROG   = ctags

VERSIONMPI  = _mpi
VERSIONSMP  = _smp
VERSIONSCH  = _static
VERSIONINT  = _int
VERSIONPRC  = _simple
VERSIONFLT  = _real
VERSIONORD  = _scotch

###################################################################
#                  SETTING INSTALL DIRECTORIES                    #
###################################################################
# ROOT          = /path/to/install/directory
# INCLUDEDIR    = ${ROOT}/include
# LIBDIR        = ${ROOT}/lib
# BINDIR        = ${ROOT}/bin
# PYTHON_PREFIX = ${ROOT}

###################################################################
#                  SHARED LIBRARY GENERATION                      #
###################################################################
650
651
652
653
654
655
SHARED=1
SOEXT=.so
SHARED_FLAGS =  -shared -Wl,-soname,__SO_NAME__
CCFDEB       := ${CCFDEB} -fPIC
CCFOPT       := ${CCFOPT} -fPIC
CFPROG       := ${CFPROG} -fPIC
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708

###################################################################
#                          INTEGER TYPE                           #
###################################################################
# Uncomment the following lines for integer type support (Only 1)

#VERSIONINT  = _long
#CCTYPES     = -DFORCE_LONG -DINTSIZELONG
#---------------------------
VERSIONINT  = _int32
CCTYPES     = -DINTSIZE32
#---------------------------
#VERSIONINT  = _int64
#CCTYPES     = -DINTSSIZE64

###################################################################
#                           FLOAT TYPE                            #
###################################################################
CCTYPESFLT  =
# Uncomment the following lines for double precision support
VERSIONPRC  = _double
CCTYPESFLT := $(CCTYPESFLT) -DPREC_DOUBLE

# Uncomment the following lines for float=complex support
VERSIONFLT  = _complex
CCTYPESFLT := $(CCTYPESFLT) -DTYPE_COMPLEX

###################################################################
#                          FORTRAN MANGLING                       #
###################################################################
#CCTYPES    := $(CCTYPES) -DPASTIX_FM_NOCHANGE

###################################################################
#                          MPI/THREADS                            #
###################################################################

# Uncomment the following lines for sequential (NOMPI) version
#VERSIONMPI  = _nompi
#CCTYPES    := $(CCTYPES) -DFORCE_NOMPI
#MPCCPROG    = $(CCPROG)
#MCFPROG     = $(CFPROG)
#MPCXXPROG   = $(CXXPROG)

# Uncomment the following lines for non-threaded (NOSMP) version
#VERSIONSMP  = _nosmp
#CCTYPES    := $(CCTYPES) -DFORCE_NOSMP

# Uncomment the following line to enable a progression thread,
#  then use IPARM_THREAD_COMM_MODE
#CCPASTIX   := $(CCPASTIX) -DPASTIX_THREAD_COMM

# Uncomment the following line if your MPI doesn't support MPI_THREAD_MULTIPLE,
# level then use IPARM_THREAD_COMM_MODE
709
CCPASTIX   := $(CCPASTIX) -DPASTIX_FUNNELED
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741

# Uncomment the following line if your MPI doesn't support MPI_Datatype
# correctly
#CCPASTIX   := $(CCPASTIX) -DNO_MPI_TYPE

# Uncomment the following line if you want to use semaphore barrier
# instead of MPI barrier (with IPARM_AUTOSPLIT_COMM)
#CCPASTIX    := $(CCPASTIX) -DWITH_SEM_BARRIER

# Uncomment the following lines to enable StarPU.
#CCPASTIX   := $(CCPASTIX) `pkg-config libstarpu --cflags` -DWITH_STARPU
#EXTRALIB   := $(EXTRALIB) `pkg-config libstarpu --libs`
# Uncomment the correct 2 lines
#CCPASTIX   := $(CCPASTIX) -DCUDA_SM_VERSION=11
#NVCCOPT    := $(NVCCOPT) -maxrregcount 32 -arch sm_11
#CCPASTIX   := $(CCPASTIX) -DCUDA_SM_VERSION=13
#NVCCOPT    := $(NVCCOPT) -maxrregcount 32 -arch sm_13
CCPASTIX   := $(CCPASTIX) -DCUDA_SM_VERSION=20
NVCCOPT    := $(NVCCOPT) -arch sm_20

# Uncomment the following line to enable StarPU profiling
# ( IPARM_VERBOSE > API_VERBOSE_NO ).
#CCPASTIX   := $(CCPASTIX) -DSTARPU_PROFILING

# Uncomment the following line to enable CUDA (StarPU)
#CCPASTIX   := $(CCPASTIX) -DWITH_CUDA

###################################################################
#                          Options                                #
###################################################################

# Show memory usage statistics
742
CCPASTIX   := $(CCPASTIX) -DMEMORY_USAGE
743
744

# Show memory usage statistics in solver
745
CCPASTIX   := $(CCPASTIX) -DSTATS_SOPALIN
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768

# Uncomment following line for dynamic thread scheduling support
#CCPASTIX   := $(CCPASTIX) -DPASTIX_DYNSCHED

# Uncomment the following lines for Out-of-core
#CCPASTIX   := $(CCPASTIX) -DOOC -DOOC_NOCOEFINIT -DOOC_DETECT_DEADLOCKS

###################################################################
#                      GRAPH PARTITIONING                         #
###################################################################

# Uncomment the following lines for using metis ordering
#VERSIONORD  = _metis
#METIS_HOME  = ${HOME}/metis-4.0
#CCPASTIX   := $(CCPASTIX) -DMETIS -I$(METIS_HOME)/Lib
#EXTRALIB   := $(EXTRALIB) -L$(METIS_HOME) -lmetis

# Scotch always needed to compile
SCOTCH_HOME ?= ${HOME}/scotch_5.1/
SCOTCH_INC ?= $(SCOTCH_HOME)/include
SCOTCH_LIB ?= $(SCOTCH_HOME)/lib
# Uncomment on of this blocks
#scotch
769
770
CCPASTIX   := $(CCPASTIX) -I$(SCOTCH_INC) -DWITH_SCOTCH
EXTRALIB   := $(EXTRALIB) -L$(SCOTCH_LIB) -lscotch -lscotcherrexit
771
#ptscotch
772
#CCPASTIX   := $(CCPASTIX) -I$(SCOTCH_INC) -DDISTRIBUTED -DWITH_SCOTCH
773
#if scotch >= 6.0
774
#EXTRALIB   := $(EXTRALIB) -L$(SCOTCH_LIB) -lptscotch -lscotch -lptscotcherrexit
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
#else
#EXTRALIB   := $(EXTRALIB) -L$(SCOTCH_LIB) -lptscotch -lptscotcherrexit

###################################################################
#                Portable Hardware Locality                       #
###################################################################
# By default PaStiX uses hwloc to bind threads,
# comment this lines if you don't want it (not recommended)
HWLOC_HOME ?= /opt/hwloc/
HWLOC_INC  ?= $(HWLOC_HOME)/include
HWLOC_LIB  ?= $(HWLOC_HOME)/lib
CCPASTIX   := $(CCPASTIX) -I$(HWLOC_INC) -DWITH_HWLOC
EXTRALIB   := $(EXTRALIB) -L$(HWLOC_LIB) -lhwloc

###################################################################
#                             MARCEL                              #
###################################################################

# Uncomment following lines for marcel thread support
#VERSIONSMP := $(VERSIONSMP)_marcel
#CCPASTIX   := $(CCPASTIX) `pm2-config --cflags` -I${PM2_ROOT}/marcel/include/pthread
#EXTRALIB   := $(EXTRALIB) `pm2-config --libs`
# ---- Thread Posix ------
EXTRALIB   := $(EXTRALIB) -lpthread

# Uncomment following line for bubblesched framework support
# (need marcel support)
#VERSIONSCH  = _dyn
#CCPASTIX   := $(CCPASTIX) -DPASTIX_BUBBLESCHED

###################################################################
#                              BLAS                               #
###################################################################

# Choose Blas library (Only 1)
# Do not forget to set BLAS_HOME if it is not in your environnement
# BLAS_HOME=/path/to/blas
#----  Blas    ----
FELŠÖCI Marek's avatar
FELŠÖCI Marek committed
813
BLASLIB  = -lopenblas
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
#---- Gotoblas ----
#BLASLIB  = -L${BLAS_HOME} -lgoto
#----  MKL     ----
#Uncomment the correct line
#BLASLIB  = -L$(BLAS_HOME) -lmkl_intel_lp64 -lmkl_sequential -lmkl_core
#BLASLIB  = -L$(BLAS_HOME) -lmkl_intel -lmkl_sequential -lmkl_core
#----  Acml    ----
#BLASLIB  = -L$(BLAS_HOME) -lacml

###################################################################
#                             MURGE                               #
###################################################################
# Uncomment if you need MURGE interface to be thread safe
# CCPASTIX   := $(CCPASTIX) -DMURGE_THREADSAFE
# Uncomment this to have more timings inside MURGE
# CCPASTIX   := $(CCPASTIX) -DMURGE_TIME

###################################################################
#                          DO NOT TOUCH                           #
###################################################################

FOPT      := $(CCFOPT)
FDEB      := $(CCFDEB)
CCHEAD    := $(CCPROG) $(CCTYPES) $(CCFOPT)
CCFOPT    := $(CCFOPT) $(CCTYPES) $(CCPASTIX)
CCFDEB    := $(CCFDEB) $(CCTYPES) $(CCPASTIX)
NVCCOPT   := $(NVCCOPT) $(CCTYPES) $(CCPASTIX)

###################################################################
#                        MURGE COMPATIBILITY                      #
###################################################################

MAKE     = $(MKPROG)
CC       = $(MPCCPROG)
CFLAGS   = $(CCFOPT) $(CCTYPESFLT)
FC       = $(MCFPROG)
FFLAGS   = $(CCFOPT)
LDFLAGS  = $(EXTRALIB) $(BLASLIB)
CTAGS    = $(CTAGSPROG)
"
                                   ))) #t))
                    (replace 'check
                             (lambda _
                               (invoke "make" "examples")
                               (invoke "./example/bin/simple" "-lap" "100"))))))
  (native-inputs `(("perl" ,perl)
                   ,@(package-native-inputs pastix-6)))
  (propagated-inputs `(("openmpi" ,openmpi-with-mpi1-compat)
Ludovic Courtès's avatar
Ludovic Courtès committed
862
                       ("hwloc" ,hwloc-1 "lib")
863
864
865
866
                       ("openssh" ,openssh)
                       ("scotch32" ,scotch32)
                       ("pt-scotch" ,pt-scotch)
                       ,@(package-propagated-inputs pastix-6)
Ludovic Courtès's avatar
Ludovic Courtès committed
867
868
869
                       ,@(fold alist-delete
                               (package-propagated-inputs pastix-6)
                               '("hwloc" "scotch"))))))
870
871

(define-public pastix pastix-6)
AGULLO Emmanuel's avatar
AGULLO Emmanuel committed
872
873
874
875
876
877
878
879
880
881
882

(define-public pastix-nopython-notest
  (package
   (inherit pastix)
   (name "pastix-nopython-notest")
   (arguments
    (substitute-keyword-arguments (package-arguments chameleon)
                                  ((#:configure-flags flags '())
                                   `(cons "-DPASTIX_BUILD_TESTING=OFF" ,flags))))
   (inputs `(
             ,@(delete `("python2" ,python-2) (package-inputs pastix))
883
             ,@(delete `("python-numpy" ,python2-numpy) (package-inputs pastix))
884
             ;; ,@(delete `("python-scipy" ,python2-scipy) (package-inputs pastix))
AGULLO Emmanuel's avatar
AGULLO Emmanuel committed
885
             ))))
MARAIT Gilles's avatar
MARAIT Gilles committed
886
887
888
889
890

(define-public scalable-python
  (package
   (inherit python-2.7)
   (name "scalable-python")
891
   (version "2.7.13")
MARAIT Gilles's avatar
MARAIT Gilles committed
892
893
894
895
896
897
898
   (home-page "https://github.com/CSCfi/scalable-python.git")
   (source (origin
            (method git-fetch)
            (uri (git-reference
                  (url home-page)
                  (commit "b0b9d3f29298b719f9e4f684deae713c0a224b0e")
                  ))
899
900
901
902
903
904
            (patches (search-patches
                      "inria/patches/scalable-python.patch"
                      "python-2.7-search-paths.patch"
                      "python-2-deterministic-build-info.patch"
                      "python-2.7-site-prefixes.patch"
                      ))
MARAIT Gilles's avatar
MARAIT Gilles committed
905
906
907
908
909
            (sha256
             (base32
              "0ivxsf17x7vjxr5h4g20rb5i3k705vgd502ma024z95fnyzd0bqi"))))
   (arguments
    (substitute-keyword-arguments (package-arguments python-2.7)
910
911
912
913
914
915
916
917
918
919
920
921
                                  ((#:phases phases)
                                   `(modify-phases ,phases
                                                   (add-before 'configure 'permissions_gramfiles
                                                               (lambda _
                                                                 (chmod "Python/graminit.c" #o764)
                                                                 (chmod "Include/graminit.h" #o764) #t))
                                                   (add-before 'build 'fix_makefile
                                                               (lambda _
                                                                 (chmod "Python/graminit.c" #o764)
                                                                 (chmod "Include/graminit.h" #o764) #t))
                                                   (replace 'move-tk-inter (lambda _ #t)) ;; Not sure what this is anyway
                                                   ))
MARAIT Gilles's avatar
MARAIT Gilles committed
922
                                  ((#:configure-flags flags '())
923
                                   `(cons "--enable-mpi" (cons "--without-ensurepip" (delete "--with-ensurepip=install",flags))))
MARAIT Gilles's avatar
MARAIT Gilles committed
924
                                  ((#:make-flags makeflags '())
925
                                   `(cons "mpi" (cons "install" (cons "install-mpi",makeflags))))
926
                                  ((#:tests? runtests '())
927
928
                                   #f)
                                  ))
MARAIT Gilles's avatar
MARAIT Gilles committed
929
930
931
932
933
934
   (description
    "Modified python 2.7.13. Scalable Python performs the I/O operations used
e.g. by import statements in a single process and uses MPI to transmit data
to/from all other processes.")
   (propagated-inputs `(("openmpi" ,openmpi)))
   ))
935

936
;; Fix python2-sympy
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
(define-public fixed-python2-sympy
  (package
   (inherit (package-with-python2 python-sympy))
   (name "fixed-python2-sympy")
   (arguments
    `(#:python ,python-2
               #:phases
               (modify-phases %standard-phases
                              ;; Run the core tests after installation.  By default it would run
                              ;; *all* tests, which take a very long time to complete and are known
                              ;; to be flaky.
                              (delete 'check)
                              (add-after 'install 'check
                                         (lambda* (#:key outputs #:allow-other-keys)
                                                  (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
                                                  #t)))))))
953
954
955
;; Add mpi4py with python2
(define-public python2-mpi4py
  (package-with-python2 python-mpi4py))