diff options
author | Maurice Brémond <Maurice.Bremond@inria.fr> | 2019-10-14 17:44:54 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-10-14 18:25:31 +0200 |
commit | 06e1239502e7cc91f62161f8bab35bbe0119f2e5 (patch) | |
tree | 0f41a73cbd777b822e989b5f7bbb553ffeade417 /gnu/packages/maths.scm | |
parent | 5dbc79eb60f4d72953e11f3a7558ef3037b8bdb6 (diff) | |
download | guix-06e1239502e7cc91f62161f8bab35bbe0119f2e5.tar guix-06e1239502e7cc91f62161f8bab35bbe0119f2e5.tar.gz |
gnu: mumps: Build and install shared libraries.
* gnu/packages/patches/mumps-shared-libseq.patch,
gnu/packages/patches/mumps-shared-mumps.patch,
gnu/packages/patches/mumps-shared-pord.patch: New files.
* gnu/local.mk (dist_patch_DATA): Add them.
* gnu/packages/maths.scm (mumps)[source](patches): Add them.
[arguments]: In 'configure' phase, adjust "Makefile.inc" for shared
library support. In 'install' phase, install libmpiseq.so when it
exists.
Co-authored-by: Ludovic Courtès <ludovic.courtes@inria.fr>
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r-- | gnu/packages/maths.scm | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index ee633e32f8..06b34e2b89 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -2180,7 +2180,10 @@ bindings to almost all functions of SLEPc.") (sha256 (base32 "0jklh54x4y3ik1zkw6db7766kakjm5910diyaghfxxf8vwsgr26r")) - (patches (search-patches "mumps-build-parallelism.patch")))) + (patches (search-patches "mumps-build-parallelism.patch" + "mumps-shared-libseq.patch" + "mumps-shared-mumps.patch" + "mumps-shared-pord.patch")))) (build-system gnu-build-system) (inputs `(("fortran" ,gfortran) @@ -2210,15 +2213,17 @@ CC = gcc FC = gfortran FL = gfortran INCSEQ = -I$(topdir)/libseq -LIBSEQ = -L$(topdir)/libseq -lmpiseq +LIBSEQ = $(topdir)/libseq/libmpiseq.a LIBSEQNEEDED = libseqneeded~; CC = mpicc FC = mpifort FL = mpifort~] AR = ar vr # rules require trailing space, ugh... RANLIB = ranlib -LIBBLAS = -L~a -lopenblas~@[ -SCALAP = -L~a -lscalapack~] +BLASDIR = ~a +LIBBLAS = -Wl,-rpath=$(BLASDIR) -Wl,-rpath='$$ORIGIN' -L$(BLASDIR) -lopenblas~@[ +SCALAPDIR = ~a +SCALAP = -Wl,-rpath=$(SCALAPDIR) -Wl,-rpath='$$ORIGIN' -L$(SCALAPDIR) -lscalapack~] LIBOTHERS = -pthread CDEFS = -DAdd_ PIC = -fPIC @@ -2229,18 +2234,18 @@ INCS = $(INCSEQ) LIBS = $(SCALAP) $(LIBSEQ) LPORDDIR = $(topdir)/PORD/lib IPORD = -I$(topdir)/PORD/include -LPORD = -L$(LPORDDIR) -lpord +LPORD = $(LPORDDIR)/libpord.a ORDERINGSF = -Dpord~@[ METISDIR = ~a IMETIS = -I$(METISDIR)/include -LMETIS = -L$(METISDIR)/lib -lmetis +LMETIS = -Wl,-rpath $(METISDIR)/lib -L$(METISDIR)/lib -lmetis ORDERINGSF += -Dmetis~]~@[~:{ SCOTCHDIR = ~a ISCOTCH = -I$(SCOTCHDIR)/include -LSCOTCH = -L$(SCOTCHDIR)/lib ~a-lesmumps -lscotch -lscotcherr +LSCOTCH = -Wl,-rpath $(SCOTCHDIR)/lib -L$(SCOTCHDIR)/lib ~a-lesmumps -lscotch -lscotcherr ORDERINGSF += ~a~}~] ORDERINGSC = $(ORDERINGSF) -LORDERINGS = $(LPORD) $(LMETIS) $(LSCOTCH) +LORDERINGS = $(LPORD) $(LMETIS) $(LSCOTCH) $(LIBSEQ) IORDERINGSF = $(ISCOTCH) IORDERINGSC = $(IPORD) $(IMETIS) $(ISCOTCH)" (assoc-ref inputs "mpi") @@ -2294,6 +2299,8 @@ IORDERINGSC = $(IPORD) $(IMETIS) $(ISCOTCH)" (copy-recursively "include" (string-append out "/include")) (when (file-exists? "libseq/libmpiseq.a") (install-file "libseq/libmpiseq.a" libdir)) + (when (file-exists? "libseq/libmpiseq.so") + (install-file "libseq/libmpiseq.so" libdir)) #t)))))) (home-page "http://mumps.enseeiht.fr") (synopsis "Multifrontal sparse direct solver") |