[116359] trunk/dports/science/hpl/Portfile

sean at macports.org sean at macports.org
Thu Jan 23 12:13:29 PST 2014


Revision: 116359
          https://trac.macports.org/changeset/116359
Author:   sean at macports.org
Date:     2014-01-23 12:13:29 -0800 (Thu, 23 Jan 2014)
Log Message:
-----------
hpl: use mpi portgroup

Modified Paths:
--------------
    trunk/dports/science/hpl/Portfile

Modified: trunk/dports/science/hpl/Portfile
===================================================================
--- trunk/dports/science/hpl/Portfile	2014-01-23 20:13:26 UTC (rev 116358)
+++ trunk/dports/science/hpl/Portfile	2014-01-23 20:13:29 UTC (rev 116359)
@@ -2,9 +2,13 @@
 # $Id$
 
 PortSystem          1.0
+PortGroup           mpi 1.0
 
+mpi.setup
+
 name                hpl
 version             2.1
+revision            1
 categories          science
 platforms           darwin
 license             BSD
@@ -35,7 +39,7 @@
 }
 
 build.args          ARCH=MacOS TOPdir=${worksrcpath} MPlib=
-build.target	    all-j arch=macos
+build.target        all-j arch=macos
 use_parallel_build  yes
 
 test.run  yes
@@ -47,26 +51,23 @@
     xinstall ${worksrcpath}/TUNING ${destroot}${prefix}/share/hpl/
 }
 
-if {![variant_isset mpich]} {
-    default_variants    +openmpi
+if {![mpi_variant_isset]} {
+    default_variants    +mpich
 }
 
 if {![variant_isset atlas]} {
     default_variants    +accelerate
 }
 
-variant openmpi conflicts mpich description {Build with OpenMPI} {
-    depends_lib-append     port:openmpi
-    build.args-append      CC=${prefix}/bin/openmpicc \
-                           LINKER=${prefix}/bin/openmpicc
-    test.cmd cd bin/macos && ${prefix}/bin/openmpirun -n 4 ./xhpl
-}
+if {[mpi_variant_isset]} {
+    pre-build {
+        build.args-append      CC=${mpi.cc} \
+                               LINKER=${mpi.cc}
+    }
 
-variant mpich conflicts openmpi description {Build with MPICH} {
-    depends_lib-append     path:bin/mpicc-mp:mpich-default
-    build.args-append      CC=${prefix}/bin/mpicc-mp \
-                           LINKER=${prefix}/bin/mpicc-mp
-    test.cmd cd bin/macos && ${prefix}/bin/mpiexec-mp -n 4 ./xhpl
+    pre-test {
+        test.cmd cd bin/macos && ${mpi.exec} -n 4 ./xhpl
+    }
 }
 
 variant atlas conflicts accelerate description {Use ATLAS for BLAS library} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140123/2c7634e8/attachment.html>


More information about the macports-changes mailing list