Commit a0c8584f authored by FELŠÖCI Marek's avatar FELŠÖCI Marek
Browse files

hacky mumps-mkl: add link to MPI

parent 946f277e
......@@ -6,6 +6,7 @@
(define-module (hacky mumps-mkl)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (gnu packages mpi)
#:use-module (gnu packages maths)
#:use-module (srfi srfi-1)
#:use-module (non-free mkl))
......@@ -18,14 +19,16 @@
`(("blas" ,mkl)
,@(alist-delete "openblas" (package-inputs mumps))))
(arguments
(substitute-keyword-arguments (package-arguments mumps)
((#:phases phases)
`(modify-phases ,phases
(replace 'configure
(lambda* (#:key inputs #:allow-other-keys)
(call-with-output-file "Makefile.inc"
(lambda (port)
(format port "
(substitute-keyword-arguments
(package-arguments mumps)
(
(#:phases phases)
`(modify-phases ,phases
(replace 'configure
(lambda* (#:key inputs #:allow-other-keys)
(call-with-output-file "Makefile.inc"
(lambda (port)
(format port "
PLAT =
LIBEXT = .a
OUTC = -o
......@@ -43,9 +46,12 @@ FL = mpifort~]
AR = ar vr # rules require trailing space, ugh...
RANLIB = ranlib
BLASDIR = ~a
LIBBLAS = -Wl,-rpath=$(BLASDIR) -Wl,-rpath='$$ORIGIN' -L$(BLASDIR) -L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl~@[
LIBBLAS = -Wl,-rpath=$(BLASDIR) -Wl,-rpath='$$ORIGIN' -L$(BLASDIR)
LIBBLAS += -L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_intel_lp64
LIBBLAS += -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl~@[
SCALAPDIR = ~a
SCALAP = -Wl,-rpath=$(SCALAPDIR) -Wl,-rpath='$$ORIGIN' -L$(SCALAPDIR) -lscalapack~]
SCALAP = -Wl,-rpath=$(SCALAPDIR) -Wl,-rpath='$$ORIGIN' -L$(SCALAPDIR)
SCALAP += -lscalapack~]
LIBOTHERS = -pthread
CDEFS = -DAdd_
PIC = -fPIC
......@@ -64,7 +70,8 @@ LMETIS = -Wl,-rpath $(METISDIR)/lib -L$(METISDIR)/lib -lmetis
ORDERINGSF += -Dmetis~]~@[~:{
SCOTCHDIR = ~a
ISCOTCH = -I$(SCOTCHDIR)/include
LSCOTCH = -Wl,-rpath $(SCOTCHDIR)/lib -L$(SCOTCHDIR)/lib ~a-lesmumps -lscotch -lscotcherr
LSCOTCH = -Wl,-rpath $(SCOTCHDIR)/lib -L$(SCOTCHDIR)/lib ~a-lesmumps
LSCOTCH += -lscotch -lscotcherr
ORDERINGSF += ~a~}~]
ORDERINGSC = $(ORDERINGSF)
LORDERINGS = $(LPORD) $(LMETIS) $(LSCOTCH) $(LIBSEQ)
......@@ -84,5 +91,42 @@ IORDERINGSC = $(IPORD) $(IMETIS) $(ISCOTCH)"
`((,ptscotch
"-lptesmumps -lptscotch -lptscotcherr "
"-Dptscotch")))))))))))))
(synopsis "Multifrontal sparse direct solver (using MKL instead of
(synopsis "Multifrontal sparse direct solver (using Intel® MKL instead of
OpenBLAS)")))
(define-public mumps-mkl-metis
(package
(inherit mumps-mkl)
(name "mumps-mkl-metis")
(inputs
(alist-delete "scotch" (package-inputs mumps-mkl)))))
(define-public mumps-mkl-openmpi
(package
(inherit mumps-mkl)
(name "mumps-mkl-openmpi")
(inputs
`(("mpi" ,openmpi)
("scalapack" ,scalapack)
("pt-scotch" ,pt-scotch)
,@(alist-delete "scotch" (package-inputs mumps-mkl))))
(arguments
(substitute-keyword-arguments
(package-arguments mumps-mkl)
((#:phases phases)
`(modify-phases ,phases
(add-before 'check 'mpi-setup
,%openmpi-setup)
(replace 'check
(lambda _
((assoc-ref ,phases 'check)
#:exec-prefix '("mpirun" "-n" "2"))))))))
(synopsis "Multifrontal sparse direct solver (using Intel® MKL instead of
OpenBLAS and MPI)")))
(define-public mumps-mkl-metis-openmpi
(package
(inherit mumps-mkl-openmpi)
(name "mumps-mkl-metis-openmpi")
(inputs
(alist-delete "pt-scotch" (package-inputs mumps-mkl-openmpi)))))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment