Ticket #39845: Portfile

File Portfile, 2.8 KB (added by dstrubbe (David Strubbe), 11 years ago)
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id$
3
4PortSystem          1.0
5
6name                hpl
7version             2.1
8categories          science
9platforms           darwin
10license             BSD
11maintainers         gmail.com:dstrubbe
12
13description         High Performance Computing Linpack Benchmark
14long_description    See how your machine compares to the TOP500! \
15                    HPL is a software package that solves a (random) dense linear \
16                    system  in double  precision (64 bits) arithmetic on \
17                    distributed-memory computers. It can thus be regarded as a \
18                    portable as well as freely available implementation of the \
19                    High Performance Computing Linpack Benchmark.
20homepage            http://www.netlib.org/benchmark/hpl
21master_sites        ${homepage}
22
23checksums           rmd160  4d4a981e16ca12d52c31d5f5c9557bed01616081 \
24                    sha156  460f7f36cc97a1a1fcc60e43d5833e6efb0aa03c
25
26#variant threads?
27
28# patch enables parallel build
29patchfiles          patch-Makefile.diff
30
31use_configure       no
32
33pre-build {
34    file copy ${worksrcpath}/setup/Make.FreeBSD_PIV_CBLAS ${worksrcpath}/Make.macos
35}
36
37build.args          ARCH=MacOS TOPdir=${worksrcpath} MPlib=
38build.target        all-j arch=macos
39use_parallel_build  yes
40
41test.run  yes
42
43destroot {
44    xinstall ${worksrcpath}/bin/macos/xhpl ${destroot}${prefix}/bin/
45    xinstall -d ${destroot}${prefix}/share/hpl
46    xinstall ${worksrcpath}/bin/macos/HPL.dat ${destroot}${prefix}/share/hpl/
47    xinstall ${worksrcpath}/TUNING ${destroot}${prefix}/share/hpl/
48}
49
50if {![variant_isset mpich]} {
51    default_variants    +openmpi
52}
53
54if {![variant_isset atlas]} {
55    default_variants    +accelerate
56}
57
58variant openmpi conflicts mpich description {Build with OpenMPI} {
59    depends_lib-append     port:openmpi
60    build.args-append      CC=${prefix}/bin/openmpicc \
61                           LINKER=${prefix}/bin/openmpicc
62    test.cmd cd bin/macos && ${prefix}/bin/openmpirun -n 4 ./xhpl
63}
64
65variant mpich conflicts openmpi description {Build with MPICH} {
66    depends_lib-append     path:bin/mpicc:mpich
67    build.args-append      CC=${prefix}/bin/mpicc \
68                           LINKER=${prefix}/bin/mpicc
69    test.cmd cd bin/macos && ${prefix}/bin/openmpirun -n 4 ./xhpl
70}
71
72variant atlas conflicts accelerate description {Use ATLAS for BLAS library} {
73    depends_lib-append     port:atlas
74    build.args-append      LAlib="${prefix}/lib/libsatlas.dylib"
75}
76
77variant accelerate conflicts atlas description {Use Accelerate for BLAS library} {
78    build.args-append      LAlib="/usr/lib/libblas.dylib"
79}
80
81livecheck.type      regex
82livecheck.url       [lindex ${master_sites} 0]
83livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}