[MUMPS] Update to MUMPS-5.0.0

Antonio Trande sagitter at fedoraproject.org
Sat Feb 21 17:31:01 UTC 2015


commit 63b0f1b9ca311d69d5e1babd54f4fa9277ac44a2
Author: Anto.Trande <sagitter at localhost.localdomain>
Date:   Sat Feb 21 18:29:56 2015 +0100

    Update to MUMPS-5.0.0

 .gitignore                   |  1 +
 MUMPS-Makefile.par.inc       | 11 +++----
 MUMPS-Makefile.seq.inc       |  9 +++---
 MUMPS-examples-mpilibs.patch |  2 +-
 MUMPS-shared-pord.patch      | 20 +++++++------
 MUMPS-shared-seq.patch       | 39 +++++++++++++------------
 MUMPS-shared.patch           | 44 ++++++++++++++--------------
 MUMPS.spec                   | 68 +++++++++++++++++++++++++++++---------------
 sources                      |  2 +-
 9 files changed, 112 insertions(+), 84 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index bfa8b24..3e5ff96 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /MUMPS_4.10.0.tar.gz
+/MUMPS_5.0.0.tar.gz
diff --git a/MUMPS-Makefile.par.inc b/MUMPS-Makefile.par.inc
index 165d064..09eec68 100644
--- a/MUMPS-Makefile.par.inc
+++ b/MUMPS-Makefile.par.inc
@@ -20,16 +20,16 @@
 #          Metis/ParMetis and SCOTCH/PT-SCOTCH (ver 5.1 and later) orderings are now available for MUMPS.
 #
 
-#SCOTCHDIR  = /usr
-#ISCOTCH    = -I$(SCOTCHDIR)/scotch/include 
+SCOTCHDIR  = /usr
+#ISCOTCH    = -I$(SCOTCHDIR)/include 
 # You have to choose one among the following two lines depending on
 # the type of analysis you want to perform. If you want to perform only
 # sequential analysis choose the first (remember to add -Dscotch in the ORDERINGSF
 # variable below); for both parallel and sequential analysis choose the second 
 # line (remember to add -Dptscotch in the ORDERINGSF variable below)
 
-#LSCOTCH    = -L$(SCOTCHDIR)/lib -lesmumps -lscotch -lscotcherr
-#LSCOTCH    = -L$(SCOTCHDIR)/lib -lptesmumps -lptscotch -lptscotcherr
+LSCOTCH    = -L$(SCOTCHDIR)/lib -lesmumps -lscotch -lscotcherr
+LSCOTCH    = -L$(SCOTCHDIR)/lib -lptesmumps -lptscotch -lptscotcherr
 
 
 LPORDDIR = $(topdir)/PORD/lib/
@@ -45,7 +45,7 @@ LPORD    = -L$(LPORDDIR) -lpord$(PLAT)
 # variable below); for both parallel and sequential analysis choose the second 
 # line (remember to add -Dparmetis in the ORDERINGSF variable below)
 
-#LMETIS    = -L$(LMETISDIR) -lmetis
+LMETIS    = -L$(LMETISDIR) -lmetis
 #LMETIS    = -L$(LMETISDIR) -lparmetis -lmetis
 
 # The following variables will be used in the compilation process.
@@ -79,6 +79,7 @@ INCPAR = $(MUMPS_INCDIR)
 #LIBPAR = $(SCALAP)  -L/usr/local/lib/ -llammpio -llamf77mpi -lmpi -llam -lutil -ldl -lpthread
 MPIFLIB = @@MPIFORTRANLIB@@
 MPICLIB = -lmpi
+METISLIB = -lmetis
 LIBPAR = $(SCALAP) $(MPIFLIB) 
 # See point 17 in the FAQ to have more details on the compilation of mpich with gfortran
 INCSEQ = -I$(topdir)/libseq
diff --git a/MUMPS-Makefile.seq.inc b/MUMPS-Makefile.seq.inc
index a4cca0b..4bccf65 100644
--- a/MUMPS-Makefile.seq.inc
+++ b/MUMPS-Makefile.seq.inc
@@ -18,15 +18,15 @@
 #          Metis/ParMetis and SCOTCH/PT-SCOTCH (ver 5.1 and later) orderings are now available for MUMPS.
 #
 
-#SCOTCHDIR  = ${HOME}/scotch_5.1_esmumps
-#ISCOTCH    = -I$(SCOTCHDIR)/include 
+SCOTCHDIR  = /usr
+ISCOTCH    = -I$(SCOTCHDIR)/include 
 # You have to choose one among the following two lines depending on
 # the type of analysis you want to perform. If you want to perform only
 # sequential analysis choose the first (remember to add -Dscotch in the ORDERINGSF
 # variable below); for both parallel and sequential analysis choose the second 
 # line (remember to add -Dptscotch in the ORDERINGSF variable below)
 
-#LSCOTCH    = -L$(SCOTCHDIR)/lib -lesmumps -lscotch -lscotcherr
+LSCOTCH    = -L$(SCOTCHDIR)/lib -lesmumps -lscotch -lscotcherr -lscotchmetis
 #LSCOTCH    = -L$(SCOTCHDIR)/lib -lptesmumps -lptscotch -lptscotcherr
 
 
@@ -43,7 +43,7 @@ LPORD    = -L$(LPORDDIR) -lpord
 # variable below); for both parallel and sequential analysis choose the second 
 # line (remember to add -Dparmetis in the ORDERINGSF variable below)
 
-#LMETIS    = -L$(LMETISDIR) -lmetis
+LMETIS    = -L$(LMETISDIR) -lmetis
 #LMETIS    = -L$(LMETISDIR) -lparmetis -lmetis
 
 # The following variables will be used in the compilation process.
@@ -77,6 +77,7 @@ LIBSEQ  =  -L$(topdir)/libseq -lmpiseq
 #LIBBLAS = -L/usr/lib/xmm/ -lf77blas -latlas
 LIBBLAS = -lblas -llapack
 LIBOTHERS = -lpthread
+METISLIB = -lmetis
 #Preprocessor defs for calling Fortran from C (-DAdd_ or -DAdd__ or -DUPPER)
 CDEFS   = -DAdd_
 
diff --git a/MUMPS-examples-mpilibs.patch b/MUMPS-examples-mpilibs.patch
index 926f14c..45550b4 100644
--- a/MUMPS-examples-mpilibs.patch
+++ b/MUMPS-examples-mpilibs.patch
@@ -4,7 +4,7 @@ Index: mumps/examples/Makefile
 ===================================================================
 --- mumps.orig/examples/Makefile
 +++ mumps/examples/Makefile
-@@ -25,29 +25,29 @@
+@@ -26,29 +26,29 @@
  LIBSMUMPS = $(libdir)/libsmumps$(PLAT)$(LIBEXT) $(LIBMUMPS_COMMON)
  
  ssimpletest:  $(LIBSMUMPS)  $$@.o
diff --git a/MUMPS-shared-pord.patch b/MUMPS-shared-pord.patch
index c1e677f..bf4790d 100644
--- a/MUMPS-shared-pord.patch
+++ b/MUMPS-shared-pord.patch
@@ -4,7 +4,7 @@ Index: mumps/PORD/lib/Makefile
 ===================================================================
 --- mumps.orig/PORD/lib/Makefile
 +++ mumps/PORD/lib/Makefile
-@@ -8,7 +8,7 @@
+@@ -9,7 +9,7 @@
  
  INCLUDES = -I../include
  
@@ -13,7 +13,7 @@ Index: mumps/PORD/lib/Makefile
  
  OBJS = graph.o gbipart.o gbisect.o ddcreate.o ddbisect.o nestdiss.o \
         multisector.o gelim.o bucket.o tree.o \
-@@ -21,12 +21,16 @@
+@@ -24,12 +24,16 @@
  .c.o:
  	$(CC) $(COPTIONS) -c $*.c $(OUTC)$*.o
  
@@ -24,8 +24,8 @@ Index: mumps/PORD/lib/Makefile
  	$(RANLIB) $@
  
 +libpord$(PLAT).so: $(OBJS)
-+	$(CC) -shared $(OBJS) -Wl,-soname,libpord$(PLAT)-4.10.0.so -o libpord$(PLAT)-4.10.0.so -Wl,-z,defs
-+	ln -s libpord$(PLAT)-4.10.0.so $@
++	$(CC) -shared $(OBJS) -Wl,-soname,libpord$(PLAT)-5.0.0.so -o libpord$(PLAT)-5.0.0.so -Wl,-z,defs
++	ln -s libpord$(PLAT)-5.0.0.so $@
 +
  clean:
  	rm -f *.o
@@ -38,15 +38,15 @@ Index: mumps/Makefile
 --- mumps.orig/Makefile
 +++ mumps/Makefile
 @@ -51,7 +51,7 @@
- 	(cd examples ; $(MAKE) z)
- 
+ dexamples:	d
+ 	(cd examples ; $(MAKE) d)
  
 -requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT)
 +requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT).a $(libdir)/libpord$(PLAT).so
  
  # dummy MPI library (sequential version)
  
-@@ -59,19 +59,25 @@
+@@ -59,19 +59,26 @@
  	(cd libseq; $(MAKE))
  
  # Build the libpord.a library and copy it into $(topdir)/lib
@@ -54,7 +54,7 @@ Index: mumps/Makefile
 +$(libdir)/libpord$(PLAT).a:
  	if [ "$(LPORDDIR)" != "" ] ; then \
  	  cd $(LPORDDIR); \
- 	  $(MAKE) CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" RANLIB="$(RANLIB)" OUTC=$(OUTC) LIBEXT=$(LIBEXT); \
+ 	  $(MAKE) CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" RANLIB="$(RANLIB)" OUTC="$(OUTC)" LIBEXT=$(LIBEXT); \
  	fi;
  	if [ "$(LPORDDIR)" != "" ] ; then \
 -	  cp $(LPORDDIR)/libpord$(LIBEXT) $@; \
@@ -67,11 +67,13 @@ Index: mumps/Makefile
 +	if [ "$(LPORDDIR)" != "" ] ; then \
 +	cp -a $(LPORDDIR)/libpord*.so lib/; fi;
 +
++
  clean:
  	(cd src; $(MAKE) clean)
  	(cd examples; $(MAKE) clean)
 -	(cd $(libdir); $(RM) *$(PLAT)$(LIBEXT))
 +	(cd $(libdir); $(RM) *$(PLAT).a *$(PLAT).so)
  	(cd libseq; $(MAKE) clean)
- 	if [ $(LPORDDIR) != "" ] ; then \
+ 	if [ "$(LPORDDIR)" != "" ] ; then \
  	  cd $(LPORDDIR); $(MAKE) realclean; \
+
diff --git a/MUMPS-shared-seq.patch b/MUMPS-shared-seq.patch
index 61ffa36..5bc115f 100644
--- a/MUMPS-shared-seq.patch
+++ b/MUMPS-shared-seq.patch
@@ -2,13 +2,13 @@ Create a shared version of the sequential library, MUST BE LAST IN SERIES
 
 --- libseq/Makefile
 +++ libseq/Makefile
-@@ -12,10 +12,13 @@
+@@ -13,10 +13,13 @@
  libmpiseq$(PLAT)$(LIBEXT): mpi.o mpic.o elapse.o
  	$(AR)$@ mpi.o mpic.o elapse.o
  	$(RANLIB) $@
 +libmpiseq$(PLAT).so: mpi.o mpic.o elapse.o
-+	$(FC) -shared $^ -Wl,-soname,libmpiseq$(PLAT).so.4.10.0 -o libmpiseq$(PLAT).so.4.10.0
-+	ln -s libmpiseq$(PLAT).so.4.10.0 $@
++	$(FC) -shared $^ -Wl,-soname,libmpiseq$(PLAT).so.5.0.0 -o libmpiseq$(PLAT).so.5.0.0
++	ln -s libmpiseq$(PLAT).so.5.0.0 $@
  .f.o:
 -	$(FC) $(OPTF)              -c $*.f $(OUTF)$*.o
 +	$(FC) $(OPTF)              -fPIC -c $*.f $(OUTF)$*.o
@@ -19,8 +19,8 @@ Create a shared version of the sequential library, MUST BE LAST IN SERIES
  clean:
  	$(RM) *.o *$(LIBEXT)
 
---- Makefile
-+++ Makefile
+--- Makefile.mod1	2015-02-20 19:51:32.021098000 +0100
++++ Makefile	2015-02-20 19:52:13.535854348 +0100
 @@ -57,6 +57,7 @@
  
  libseqneeded:
@@ -30,25 +30,24 @@ Create a shared version of the sequential library, MUST BE LAST IN SERIES
  # Build the libpord.a library and copy it into $(topdir)/lib
  $(libdir)/libpord$(PLAT).a:
 
---- src/Makefile.orig	2014-06-24 23:07:51.684304000 +0200
-+++ src/Makefile	2014-06-24 23:10:12.263494831 +0200
-@@ -59,7 +59,7 @@
+--- src/Makefile.mod1	2015-02-20 19:36:17.726477000 +0100
++++ src/Makefile	2015-02-20 19:49:59.847640480 +0100
+@@ -160,7 +160,7 @@
  	$(RANLIB) $@
  
- $(libdir)/libmumps_common$(PLAT).so:	$(OBJS_COMMON)
--	$(FC) -shared $^ -Wl,-soname,libmumps_common$(PLAT)-4.10.0.so -L$(libdir) $(LORDERINGS) -lpthread $(MUMPS_LIBF77) $(OPTL) -lopen-rte $(OPTL) -lopen-pal $(MPIFLIB) $(MPICLIB) -o $(libdir)/libmumps_common$(PLAT)-4.10.0.so $(OPTL) -Wl,-z,defs
-+	$(FC) -shared $^ -Wl,-soname,libmumps_common$(PLAT)-4.10.0.so -L$(libdir) $(LORDERINGS) -lpthread $(MUMPS_LIBF77) $(LIBSEQ) $(OPTL) -o $(libdir)/libmumps_common$(PLAT)-4.10.0.so $(OPTL) -Wl,-z,defs
- 	ln -s libmumps_common$(PLAT)-4.10.0.so $@
+ $(libdir)/libmumps_common$(PLAT).so:	$(OBJS_COMMON_MOD) $(OBJS_COMMON_OTHER)
+-	$(FC) -shared $^ -Wl,-soname,libmumps_common$(PLAT)-5.0.0.so -L$(libdir) $(LORDERINGS) -lpthread $(MUMPS_LIBF77) $(OPTL) -lopen-rte $(OPTL) -lopen-pal $(MPIFLIB) $(MPICLIB) $(METISLIB) -o $(libdir)/libmumps_common$(PLAT)-5.0.0.so $(OPTL) -Wl,-z,defs
++	$(FC) -shared $^ -Wl,-soname,libmumps_common$(PLAT)-5.0.0.so -L$(libdir) $(LORDERINGS) -lpthread $(MUMPS_LIBF77) $(LIBSEQ) $(OPTL) $(METISLIB) -o $(libdir)/libmumps_common$(PLAT)-5.0.0.so $(OPTL) -Wl,-z,defs
+ 	ln -s libmumps_common$(PLAT)-5.0.0.so $@
  
- $(libdir)/lib$(ARITH)mumps$(PLAT).a:    $(OBJS)
-@@ -67,7 +67,7 @@
+ $(libdir)/lib$(ARITH)mumps$(PLAT).a:    $(OBJS_MOD) $(OBJS_OTHER)
+@@ -168,7 +168,7 @@
  	$(RANLIB) $@
  
- $(libdir)/lib$(ARITH)mumps$(PLAT).so:    $(OBJS)
--	$(FC) -shared $^ -Wl,-soname,lib$(ARITH)mumps$(PLAT)-4.10.0.so -L$(libdir) -lmumps_common$(PLAT) $(MUMPS_LIBF77) $(OPTL) -lopen-rte $(OPTL) -lopen-pal $(LORDERINGS) $(MPIFLIB) -lblas $(SCALAP) -o $(libdir)/lib$(ARITH)mumps$(PLAT)-4.10.0.so $(OPTL) -Wl,-z,defs
-+	$(FC) -shared $^ -Wl,-soname,lib$(ARITH)mumps$(PLAT)-4.10.0.so -L$(libdir) -lmumps_common$(PLAT) $(LORDERINGS) $(MUMPS_LIBF77) $(LIBSEQ) $(OPTL) -lblas $(SCALAP) -o $(libdir)/lib$(ARITH)mumps$(PLAT)-4.10.0.so $(OPTL) -Wl,-z,defs
- 	ln -s lib$(ARITH)mumps$(PLAT)-4.10.0.so $@
+ $(libdir)/lib$(ARITH)mumps$(PLAT).so:    $(OBJS_MOD) $(OBJS_OTHER)
+-	$(FC) -shared $^ -Wl,-soname,lib$(ARITH)mumps$(PLAT)-5.0.0.so -L$(libdir) -lmumps_common$(PLAT) $(MUMPS_LIBF77) $(OPTL) -lopen-rte $(OPTL) -lopen-pal $(LORDERINGS) $(MPIFLIB) $(METISLIB) -lblas $(SCALAP) -o $(libdir)/lib$(ARITH)mumps$(PLAT)-5.0.0.so $(OPTL) -Wl,-z,defs
++	$(FC) -shared $^ -Wl,-soname,lib$(ARITH)mumps$(PLAT)-5.0.0.so -L$(libdir) -lmumps_common$(PLAT) $(LORDERINGS) $(MUMPS_LIBF77) $(LIBSEQ) $(OPTL) $(METISLIB) -lblas $(SCALAP) -o $(libdir)/lib$(ARITH)mumps$(PLAT)-5.0.0.so $(OPTL) -Wl,-z,defs
+ 	ln -s lib$(ARITH)mumps$(PLAT)-5.0.0.so $@
+ 
  
- $(ARITH)mumps_load.o:		$(ARITH)mumps_comm_buffer.o \
-
 
diff --git a/MUMPS-shared.patch b/MUMPS-shared.patch
index a692bf1..5c5b936 100644
--- a/MUMPS-shared.patch
+++ b/MUMPS-shared.patch
@@ -4,7 +4,7 @@ Index: mumps/src/Makefile
 ===================================================================
 --- mumps.orig/src/Makefile
 +++ mumps/src/Makefile
-@@ -19,8 +19,10 @@
+@@ -23,8 +23,10 @@
  
  include $(topdir)/Makefile.inc
  
@@ -15,36 +15,37 @@ Index: mumps/src/Makefile
 +              $(libdir)/lib$(ARITH)mumps$(PLAT).a \
 +              $(libdir)/lib$(ARITH)mumps$(PLAT).so
  
- OBJS_COMMON = \
-         mumps_part9.o\
-@@ -52,14 +54,22 @@
-         $(ARITH)mumps_struc_def.o
+ OBJS_COMMON_MOD = \
+         ana_omp_m.o\
+@@ -153,14 +155,23 @@
+         $(ARITH)type3_root.o\
+ 	$(ARITH)mumps_restart.o
  
- 
--$(libdir)/libmumps_common$(PLAT)$(LIBEXT):	$(OBJS_COMMON)
+-$(libdir)/libmumps_common$(PLAT)$(LIBEXT):      $(OBJS_COMMON_MOD) $(OBJS_COMMON_OTHER)
 -	$(AR)$@ $?
-+$(libdir)/libmumps_common$(PLAT).a:	$(OBJS_COMMON)
++$(libdir)/libmumps_common$(PLAT).a:      $(OBJS_COMMON_MOD) $(OBJS_COMMON_OTHER)
 +	$(AR) $@ $?
  	$(RANLIB) $@
  
--$(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT):    $(OBJS)
+-$(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT):    $(OBJS_MOD) $(OBJS_OTHER)
 -	$(AR)$@ $?
-+$(libdir)/libmumps_common$(PLAT).so:	$(OBJS_COMMON)
-+	$(FC) -shared $^ -Wl,-soname,libmumps_common$(PLAT)-4.10.0.so -L$(libdir) $(LORDERINGS) -lpthread $(MUMPS_LIBF77) $(OPTL) -lopen-rte $(OPTL) -lopen-pal $(MPIFLIB) $(MPICLIB) -o $(libdir)/libmumps_common$(PLAT)-4.10.0.so $(OPTL) -Wl,-z,defs
-+	ln -s libmumps_common$(PLAT)-4.10.0.so $@
++$(libdir)/libmumps_common$(PLAT).so:	$(OBJS_COMMON_MOD) $(OBJS_COMMON_OTHER)
++	$(FC) -shared $^ -Wl,-soname,libmumps_common$(PLAT)-5.0.0.so -L$(libdir) $(LORDERINGS) -lpthread $(MUMPS_LIBF77) $(OPTL) -lopen-rte $(OPTL) -lopen-pal $(MPIFLIB) $(MPICLIB) $(METISLIB) -o $(libdir)/libmumps_common$(PLAT)-5.0.0.so $(OPTL) -Wl,-z,defs
++	ln -s libmumps_common$(PLAT)-5.0.0.so $@
 +
-+$(libdir)/lib$(ARITH)mumps$(PLAT).a:    $(OBJS)
++$(libdir)/lib$(ARITH)mumps$(PLAT).a:    $(OBJS_MOD) $(OBJS_OTHER)
 +	$(AR) $@ $?
  	$(RANLIB) $@
  
-+$(libdir)/lib$(ARITH)mumps$(PLAT).so:    $(OBJS)
-+	$(FC) -shared $^ -Wl,-soname,lib$(ARITH)mumps$(PLAT)-4.10.0.so -L$(libdir) -lmumps_common$(PLAT) $(MUMPS_LIBF77) $(OPTL) -lopen-rte $(OPTL) -lopen-pal $(LORDERINGS) $(MPIFLIB) -lblas $(SCALAP) -o $(libdir)/lib$(ARITH)mumps$(PLAT)-4.10.0.so $(OPTL) -Wl,-z,defs
-+	ln -s lib$(ARITH)mumps$(PLAT)-4.10.0.so $@
++$(libdir)/lib$(ARITH)mumps$(PLAT).so:    $(OBJS_MOD) $(OBJS_OTHER)
++	$(FC) -shared $^ -Wl,-soname,lib$(ARITH)mumps$(PLAT)-5.0.0.so -L$(libdir) -lmumps_common$(PLAT) $(MUMPS_LIBF77) $(OPTL) -lopen-rte $(OPTL) -lopen-pal $(LORDERINGS) $(MPIFLIB) $(METISLIB) -lblas $(SCALAP) -o $(libdir)/lib$(ARITH)mumps$(PLAT)-5.0.0.so $(OPTL) -Wl,-z,defs
++	ln -s lib$(ARITH)mumps$(PLAT)-5.0.0.so $@
++
 +
+ # Dependencies between modules:
  $(ARITH)mumps_load.o:		$(ARITH)mumps_comm_buffer.o \
- 				$(ARITH)mumps_struc_def.o
- 
-@@ -89,13 +99,13 @@
+ 				$(ARITH)mumps_struc_def.o \
+@@ -258,13 +269,13 @@
  
  .SUFFIXES: .c .F .o
  .F.o:
@@ -56,8 +57,9 @@ Index: mumps/src/Makefile
  
  $(ARITH)mumps_c.o:	mumps_c.c
  	$(CC) $(OPTC) $(INCS) $(CDEFS) -DMUMPS_ARITH=MUMPS_ARITH_$(ARITH) \
--	      $(IORDERINGSC) $(ORDERINGSC) -I../include -c $? $(OUTC)$@
-+	      $(IORDERINGSC) $(ORDERINGSC) -I../include -fPIC -c $? $(OUTC)$@
+-	      $(IORDERINGSC) $(ORDERINGSC) -I../include -c mumps_c.c $(OUTC)$@
++	      $(IORDERINGSC) $(ORDERINGSC) -I../include -fPIC -c mumps_c.c $(OUTC)$@
  
  
  clean:
+
diff --git a/MUMPS.spec b/MUMPS.spec
index 891e496..9c64eb0 100644
--- a/MUMPS.spec
+++ b/MUMPS.spec
@@ -8,14 +8,18 @@
 %global _incmpidir %{_includedir}/openmpi-%{_arch}
 %global _libmpidir %{_libdir}/openmpi/lib
 
+%if 0%{?fedora} > 20
 ## Define if use openmpi or not
 %global with_openmpi 1
+%else
+%global with_openmpi 0
+%endif
 
 Name: MUMPS
-Version: 4.10.0
-Release: 24%{?dist}
+Version: 5.0.0
+Release: 1%{?dist}
 Summary: A MUltifrontal Massively Parallel sparse direct Solver
-License: Public Domain
+License: CeCILL-C 
 Group: Development/Libraries
 URL: http://mumps.enseeiht.fr/
 Source0: http://mumps.enseeiht.fr/%{name}_%{version}.tar.gz
@@ -35,14 +39,12 @@ Patch2: %{name}-shared.patch
 Patch3: %{name}-shared-seq.patch
 
 BuildRequires: gcc-gfortran, blas-devel, lapack-devel
+BuildRequires: metis-devel, scotch-devel
 
 BuildRequires: openssh-clients
 Requires:      %{name}-common = %{version}-%{release}
 Requires:      environment-modules 
 
-Obsoletes:     %{name}-doc < 4.10.0-12
-Obsoletes:     %{name}-examples < 4.10.0-11
-
 %description
 MUMPS implements a direct solver for large sparse linear systems, with a
 particular focus on symmetric positive definite matrices.  It can
@@ -84,6 +86,7 @@ Group: Development/Libraries
 BuildRequires: openmpi-devel >= 1.7.2
 BuildRequires: blacs-openmpi-devel >= 2.0.2
 BuildRequires: scalapack-openmpi-devel >= 2.0.2
+BuildRequires: metis-devel, ptscotch-openmpi-devel
 
 Requires: %{name}-common = %{version}-%{release}
 Requires: openmpi
@@ -125,6 +128,11 @@ sed -e 's|@@MPIFORTRANLIB@@|-lmpi_mpifh|g' -i Makefile.inc
 
 MUMPS_MPI=openmpi
 MUMPS_INCDIR=-I%{_includedir}/openmpi-%{_arch}
+LMETISDIR=%{_libdir}
+LMETIS="-L%{_libdir} -lmetis"
+SCOTCHDIR=%{_prefix}
+ISCOTCH=-I%{_includedir}/openmpi-%{_arch}
+LSCOTCH="-L%{_libdir}/openmpi/lib -lesmumps -lscotch -lscotcherr -lptesmumps -lptscotch -lptscotcherr"
 
 export MPIBLACSLIBS="-lmpiblacs"
 
@@ -137,7 +145,11 @@ make \
  FC=%{_libdir}/openmpi/bin/mpif77 \
  MUMPS_MPI="$MUMPS_MPI" \
  MUMPS_INCDIR="$MUMPS_INCDIR" \
- MUMPS_LIBF77="-L%{_libdir}/openmpi -L%{_libdir}/openmpi/lib -lmpi -lmpi_mpifh -lscalapack $MPIBLACSLIBS" all
+ MUMPS_LIBF77="-L%{_libdir}/openmpi -L%{_libdir}/openmpi/lib -lmpi -lmpi_mpifh -lscalapack $MPIBLACSLIBS" \
+ LMETISDIR="$LMETISDIR" LMETIS="$LMETIS" \
+ SCOTCHDIR=$SCOTCHDIR \
+ ISCOTCH=$ISCOTCH \
+ LSCOTCH="$LSCOTCH" all
 %{_openmpi_unload}
 cp -pr lib/* %{name}-%{version}-$MPI_COMPILER_NAME/lib
 rm -rf lib/*
@@ -157,7 +169,13 @@ sed -e 's|@@-O@@|-Wl,--as-needed|g' -i Makefile.inc
 make \
  MUMPS_LIBF77="-L%{_libdir} -lblas -llapack" \
  LIBSEQ="-L../libseq -lmpiseq" \
- INCSEQ="-I../libseq" all
+ INCSEQ="-I../libseq" \
+ LMETISDIR=%{_libdir} \
+ LMETIS="-L%{_libdir} -lmetis" \
+ SCOTCHDIR=%{_prefix} \
+ ISCOTCH=-I%{_includedir} \
+ LSCOTCH="-L%{_libdir} -lesmumps -lscotch -lscotcherr -lscotchmetis" \
+ all
 #######################################################
 
 # Make sure documentation is using Unicode.
@@ -186,28 +204,22 @@ LD_LIBRARY_PATH=$PWD:../lib:$LD_LIBRARY_PATH \
 LD_LIBRARY_PATH=$PWD:../lib:$LD_LIBRARY_PATH \
  ./c_example
 
-#Tests fail with the error:
-##Primary job  terminated normally, but 1 process returned
-##a non-zero exit code.. Per user-direction, the job has been aborted.
-#Need to add -gmca option (see MCA in 'mpirun --help'), failed
-#in koji buildsystem
-
 %if 0%{?with_openmpi}
 %if 0%{?rhel}
 module load %{_sysconfdir}/modulefiles/openmpi-%{_arch}
 %else
 %{_openmpi_load}
 %endif
-#LD_LIBRARY_PATH=$PWD:../%%{name}-%%{version}-openmpi/lib:$LD_LIBRARY_PATH \
-# mpirun -gmca orte_abort_on_non_zero_status 0 ./ssimpletest < input_simpletest_real
-#LD_LIBRARY_PATH=$PWD:../%%{name}-%%{version}-openmpi/lib:$LD_LIBRARY_PATH \
-# mpirun -gmca orte_abort_on_non_zero_status 0 ./dsimpletest < input_simpletest_real
-#LD_LIBRARY_PATH=$PWD:../%%{name}-%%{version}-openmpi/lib:$LD_LIBRARY_PATH \
-# mpirun -gmca orte_abort_on_non_zero_status 0 ./csimpletest < input_simpletest_cmplx
-#LD_LIBRARY_PATH=$PWD:../%%{name}-%%{version}-openmpi/lib:$LD_LIBRARY_PATH \
-# mpirun -gmca orte_abort_on_non_zero_status 0 ./zsimpletest < input_simpletest_cmplx
 LD_LIBRARY_PATH=$PWD:../%{name}-%{version}-openmpi/lib:$LD_LIBRARY_PATH \
-mpirun -np 3 ./c_example
+ ./ssimpletest < input_simpletest_real
+LD_LIBRARY_PATH=$PWD:../%{name}-%{version}-openmpi/lib:$LD_LIBRARY_PATH \
+ ./dsimpletest < input_simpletest_real
+LD_LIBRARY_PATH=$PWD:../%{name}-%{version}-openmpi/lib:$LD_LIBRARY_PATH \
+ ./csimpletest < input_simpletest_cmplx
+LD_LIBRARY_PATH=$PWD:../%{name}-%{version}-openmpi/lib:$LD_LIBRARY_PATH \
+ ./zsimpletest < input_simpletest_cmplx
+LD_LIBRARY_PATH=$PWD:../%{name}-%{version}-openmpi/lib:$LD_LIBRARY_PATH \
+ ./c_example
 %{_openmpi_unload}
 cd ../
 %endif
@@ -306,12 +318,22 @@ install -cpm 644 ChangeLog LICENSE README $RPM_BUILD_ROOT%{_pkgdocdir}
 %files common
 ## This directory contains README*, LICENSE, ChangeLog, UserGuide files
 %{_pkgdocdir}/
+%if 0%{?fedora}
+%license %{_pkgdocdir}/LICENSE
+%endif
 
 %files examples
 %dir %{_libexecdir}/%{name}-%{version}
 %{_libexecdir}/%{name}-%{version}/examples/
 
 %changelog
+* Fri Feb 20 2015 Antonio Trande <sagitter at fedoraproject.org> - 5.0.0-1
+- Update to MUMPS-5.0.0
+- License changed in CeCILL-C
+- Linked against Metis
+- Linked serial version against Scotch
+- Linked MPI version against PT-Scotch
+
 * Mon Nov 10 2014 Antonio Trande <sagitter at fedoraproject.org> - 4.10.0-24
 - Removed OpenMPI minimal release request for EPEL
 - Fixed scalapack minimal release request
diff --git a/sources b/sources
index d1d609e..5096bde 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-959e9981b606cd574f713b8422ef0d9f  MUMPS_4.10.0.tar.gz
+3c6aeab847e9d775ca160194a9db2b75  MUMPS_5.0.0.tar.gz


More information about the scm-commits mailing list