Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
guix-hpc
guix-hpc-non-free
Commits
a0c8584f
Commit
a0c8584f
authored
May 14, 2020
by
FELŠÖCI Marek
Browse files
hacky mumps-mkl: add link to MPI
parent
946f277e
Changes
1
Hide whitespace changes
Inline
Side-by-side
hacky/mumps-mkl.scm
View file @
a0c8584f
...
...
@@ -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
)))))
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment