[149006] trunk/dports/math/mumps

dstrubbe at macports.org dstrubbe at macports.org
Tue May 24 14:56:20 PDT 2016


Revision: 149006
          https://trac.macports.org/changeset/149006
Author:   dstrubbe at macports.org
Date:     2016-05-24 14:56:20 -0700 (Tue, 24 May 2016)
Log Message:
-----------
mumps: Use linear_algebra port group, thus offering atlas and openblas as options for BLAS. Add test phase: this required undoing the patch in the examples directory which seemed confused about which libraries were being built shared.

Modified Paths:
--------------
    trunk/dports/math/mumps/Portfile
    trunk/dports/math/mumps/files/patch-shared.diff

Modified: trunk/dports/math/mumps/Portfile
===================================================================
--- trunk/dports/math/mumps/Portfile	2016-05-24 21:44:58 UTC (rev 149005)
+++ trunk/dports/math/mumps/Portfile	2016-05-24 21:56:20 UTC (rev 149006)
@@ -3,6 +3,7 @@
 
 PortSystem          1.0
 PortGroup           mpi 1.0
+PortGroup           linear_algebra 1.0
 
 name                mumps
 version             5.0.1
@@ -28,6 +29,8 @@
 
 mpi.enforce_variant scalapack
 
+linalg.setup        blas_only
+
 patch.pre_args      -p1
 patchfiles-append   patch-shared.diff
 
@@ -58,7 +61,7 @@
     reinplace "s|^SCALAP.*$|SCALAP = ${prefix}/lib/libscalapack.dylib|" ${worksrcpath}/Makefile.inc
     reinplace "s|^INCPAR.*$|INCPAR = -I\$(topdir)/include|" ${worksrcpath}/Makefile.inc
     reinplace "s|^LIBPAR.*$|LIBPAR = \$(SCALAP)|" ${worksrcpath}/Makefile.inc
-    reinplace "s|^LIBBLAS.*$|LIBBLAS = -framework Accelerate|" ${worksrcpath}/Makefile.inc
+    reinplace "s|^LIBBLAS.*$|LIBBLAS = ${linalglib}|" ${worksrcpath}/Makefile.inc
 }
 
 destroot {
@@ -68,3 +71,22 @@
 }
 
 livecheck.type      none
+
+test.run            yes
+test.target         all
+test.args-append    PREFIX="${prefix}" LPORD=../lib/libpord.a
+
+post-test {
+    if {![catch {sysctl hw.ncpu} result]} {
+        set njobs $result
+    } else {
+        set njobs 1
+    }
+    set runcmd "${mpi.exec} -np ${njobs}"
+
+    system -W ${worksrcpath}/examples "${runcmd} ./ssimpletest < input_simpletest_real"
+    system -W ${worksrcpath}/examples "${runcmd} ./dsimpletest < input_simpletest_real"
+    system -W ${worksrcpath}/examples "${runcmd} ./csimpletest < input_simpletest_cmplx"
+    system -W ${worksrcpath}/examples "${runcmd} ./zsimpletest < input_simpletest_cmplx"
+    system -W ${worksrcpath}/examples "${runcmd} ./c_example"
+}

Modified: trunk/dports/math/mumps/files/patch-shared.diff
===================================================================
--- trunk/dports/math/mumps/files/patch-shared.diff	2016-05-24 21:44:58 UTC (rev 149005)
+++ trunk/dports/math/mumps/files/patch-shared.diff	2016-05-24 21:56:20 UTC (rev 149006)
@@ -61,75 +61,6 @@
  realclean:
 -	rm -f *.o libpord.a
 +	rm -f *.o libpord$(LIBEXT) libpord$(SHAREDLIBEXT)
-diff --git a/examples/Makefile b/examples/Makefile
---- a/examples/Makefile
-+++ b/examples/Makefile
-@@ -18,32 +18,32 @@ s:	ssimpletest
- d:	dsimpletest c_example
- 
- 
- include $(topdir)/Makefile.inc
- 
--LIBMUMPS_COMMON = $(libdir)/libmumps_common$(PLAT)$(LIBEXT)
-+LIBMUMPS_COMMON = $(libdir)/libmumps_common$(PLAT)$(SHAREDLIBEXT)
- 
- 
--LIBSMUMPS = $(libdir)/libsmumps$(PLAT)$(LIBEXT) $(LIBMUMPS_COMMON)
-+LIBSMUMPS = $(libdir)/libsmumps$(PLAT)$(SHAREDLIBEXT) $(LIBMUMPS_COMMON)
- 
- ssimpletest:  $(LIBSMUMPS)  $$@.o
- 	$(FL) -o $@ $(OPTL) ssimpletest.o  $(LIBSMUMPS) $(LORDERINGS) $(LIBS) $(LIBBLAS) $(LIBOTHERS)
- 
- 
--LIBDMUMPS = $(libdir)/libdmumps$(PLAT)$(LIBEXT) $(LIBMUMPS_COMMON)
-+LIBDMUMPS = $(libdir)/libdmumps$(PLAT)$(SHAREDLIBEXT) $(LIBMUMPS_COMMON)
- 
- dsimpletest: $(LIBDMUMPS)  $$@.o 
- 	$(FL) -o $@ $(OPTL) dsimpletest.o  $(LIBDMUMPS) $(LORDERINGS) $(LIBS) $(LIBBLAS) $(LIBOTHERS)
- 
- 
--LIBCMUMPS = $(libdir)/libcmumps$(PLAT)$(LIBEXT) $(LIBMUMPS_COMMON)
-+LIBCMUMPS = $(libdir)/libcmumps$(PLAT)$(SHAREDLIBEXT) $(LIBMUMPS_COMMON)
- 
- csimpletest: $(LIBCMUMPS)  $$@.o
- 	$(FL) -o $@ $(OPTL) csimpletest.o  $(LIBCMUMPS) $(LORDERINGS) $(LIBS) $(LIBBLAS) $(LIBOTHERS)
- 
- 
--LIBZMUMPS = $(libdir)/libzmumps$(PLAT)$(LIBEXT) $(LIBMUMPS_COMMON)
-+LIBZMUMPS = $(libdir)/libzmumps$(PLAT)$(SHAREDLIBEXT) $(LIBMUMPS_COMMON)
- 
- zsimpletest: $(LIBZMUMPS)  $$@.o
- 	$(FL) -o $@ $(OPTL) zsimpletest.o  $(LIBZMUMPS) $(LORDERINGS) $(LIBS) $(LIBBLAS) $(LIBOTHERS)
- 
- 
-@@ -56,23 +56,23 @@ c_example:	$(LIBDMUMPS) $$@.o
- 	$(FC) $(OPTF) $(INCS) -I. -I$(topdir)/include -c $*.F $(OUTF)$*.o
- .c.o:
- 	$(CC) $(OPTC) $(INCS) $(CDEFS) -I. -I$(topdir)/include -I$(topdir)/src -c $*.c $(OUTC)$*.o
- 
- 
--$(libdir)/libsmumps$(PLAT)$(LIBEXT):
-+$(libdir)/libsmumps$(PLAT)$(SHAREDLIBEXT):
- 	@echo 'Error: you should build the library' $@ 'first'
- 	exit 1
- 
--$(libdir)/libdmumps$(PLAT)$(LIBEXT):
-+$(libdir)/libdmumps$(PLAT)$(SHAREDLIBEXT):
- 	@echo 'Error: you should build the library' $@ 'first'
- 	exit 1
- 
--$(libdir)/libcmumps$(PLAT)$(LIBEXT):
-+$(libdir)/libcmumps$(PLAT)$(SHAREDLIBEXT):
- 	@echo 'Error: you should build the library' $@ 'first'
- 	exit 1
- 
--$(libdir)/libzmumps$(PLAT)$(LIBEXT):
-+$(libdir)/libzmumps$(PLAT)$(SHAREDLIBEXT):
- 	@echo 'Error: you should build the library' $@ 'first'
- 	exit 1
- 
- $(LIBMUMPS_COMMON):
- 	@echo 'Error: you should build the library' $@ 'first'
 diff --git a/src/Makefile b/src/Makefile
 --- a/src/Makefile
 +++ b/src/Makefile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160524/d70bb951/attachment.html>


More information about the macports-changes mailing list