[141256] trunk/dports/science/hpl/Portfile
dstrubbe at macports.org
dstrubbe at macports.org
Tue Oct 13 13:01:04 PDT 2015
Revision: 141256
https://trac.macports.org/changeset/141256
Author: dstrubbe at macports.org
Date: 2015-10-13 13:01:04 -0700 (Tue, 13 Oct 2015)
Log Message:
-----------
hpl:
* MPI is required, actually.
* Fortran is not used, so variants for Fortran compilers should not be offered.
* Offer OpenBLAS(-devel) for linear algebra.
* Detect number of CPUs and use that for MPI execution in the test phase.
* Add notes to tell how to execute.
Modified Paths:
--------------
trunk/dports/science/hpl/Portfile
Modified: trunk/dports/science/hpl/Portfile
===================================================================
--- trunk/dports/science/hpl/Portfile 2015-10-13 19:43:41 UTC (rev 141255)
+++ trunk/dports/science/hpl/Portfile 2015-10-13 20:01:04 UTC (rev 141256)
@@ -25,7 +25,7 @@
checksums rmd160 4d4a981e16ca12d52c31d5f5c9557bed01616081 \
sha156 460f7f36cc97a1a1fcc60e43d5833e6efb0aa03c
-mpi.setup
+mpi.setup require -fortran
#variant threads?
@@ -51,34 +51,43 @@
xinstall ${worksrcpath}/TUNING ${destroot}${prefix}/share/hpl/
}
-if {![mpi_variant_isset]} {
- default_variants +mpich
+if {![variant_isset atlas] && ![variant_isset openblas]} {
+ default_variants +accelerate
}
-if {![variant_isset atlas]} {
- default_variants +accelerate
+pre-build {
+ build.args-append CC=${mpi.cc} LINKER=${mpi.cc}
}
-if {[mpi_variant_isset]} {
- pre-build {
- build.args-append CC=${mpi.cc} \
- LINKER=${mpi.cc}
+pre-test {
+ if {![catch {sysctl hw.ncpu} result]} {
+ set njobs $result
+ } else {
+ set njobs 4
}
- pre-test {
- test.cmd cd bin/macos && ${mpi.exec} -n 4 ./xhpl
- }
+ test.cmd cd bin/macos && ${mpi.exec} -n ${njobs} ./xhpl
}
-variant atlas conflicts accelerate description {Use ATLAS for BLAS library} {
+pre-fetch {
+ notes "Execute as: cd ${prefix}/share/hpl && ${mpi.exec} -n 4 xhpl"
+}
+
+variant atlas conflicts accelerate openblas description {Use ATLAS for BLAS library} {
depends_lib-append port:atlas
build.args-append LAlib="${prefix}/lib/libsatlas.dylib"
}
-variant accelerate conflicts atlas description {Use Accelerate for BLAS library} {
+variant accelerate conflicts atlas openblas description {Use Accelerate for BLAS library} {
build.args-append LAlib="/usr/lib/libblas.dylib"
}
+variant openblas conflicts atlas accelerate description {Use OpenBLAS for BLAS library} {
+ # allow OpenBLAS-devel too
+ depends_lib-append path:lib/libopenblas.dylib:OpenBLAS
+ build.args-append LAlib="${prefix}/lib/libopenblas.dylib"
+}
+
livecheck.type regex
livecheck.url [lindex ${master_sites} 0]
livecheck.regex ${name}-(\[0-9.\]+)${extract.suffix}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151013/04cd7720/attachment.html>
More information about the macports-changes
mailing list