summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Ermakov2015-12-09 20:10:26 +0300
committerAlexey Ermakov2015-12-09 20:10:26 +0300
commitfadc0ffe59288dae84078a5a01738894b97e0f08 (patch)
tree5cd98a4030f5f6d99ff060a7ca91239a58dafa5a
downloadaur-fadc0ffe59288dae84078a5a01738894b97e0f08.tar.gz
Initial commit
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD31
-rw-r--r--hpl-2.1-arch.patch94
3 files changed, 146 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a6c4dd2950ab
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+# Generated by mksrcinfo v8
+# Wed Dec 9 17:09:59 UTC 2015
+pkgbase = hpl
+ pkgdesc = A portable implementation of the high-performance Linpack benchmark for distributed-memory computers
+ pkgver = 2.1
+ pkgrel = 1
+ url = http://www.netlib.org/benchmark/hpl/
+ arch = i686
+ arch = x86_64
+ license = custom:bsd
+ makedepends = git
+ depends = openmpi
+ depends = cblas
+ depends = lapack
+ source = http://www.netlib.org/benchmark/hpl/hpl-2.1.tar.gz
+ source = hpl-2.1-arch.patch
+ md5sums = 091aa58c3e62bdf598b403420d8387ef
+ md5sums = bed9f02937529d6e30441fe4faf8ffd7
+
+pkgname = hpl
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f3bcffc9d34e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: Alexey Ermakov <fufler[at]gmail[dot]com>
+
+pkgname=hpl
+pkgver=2.1
+pkgrel=1
+pkgdesc="A portable implementation of the high-performance Linpack benchmark for distributed-memory computers"
+arch=('i686' 'x86_64')
+url="http://www.netlib.org/benchmark/hpl/"
+license=('custom:bsd')
+depends=('openmpi' 'cblas' 'lapack')
+makedepends=('git')
+source=("http://www.netlib.org/benchmark/hpl/hpl-${pkgver}.tar.gz" "hpl-${pkgver}-arch.patch")
+md5sums=('091aa58c3e62bdf598b403420d8387ef' 'bed9f02937529d6e30441fe4faf8ffd7')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p1 -i "${srcdir}/hpl-${pkgver}-arch.patch"
+ sed -i "s|\"hpl-${pkgver}.tar.gz\"|\"http://www.netlib.org/benchmark/hpl/hpl-${pkgver}.tar.gz\"|g" www/*.html
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ cp setup/Make.Linux_PII_CBLAS_gm Make.mpicc
+ make TOPdir="`pwd`" arch=mpicc ARCH=mpicc DESTDIR="$pkgdir/"
+}
+
+package(){
+ install -D -m 0755 "${srcdir}/${pkgname}-${pkgver}/bin/mpicc/xhpl" "${pkgdir}/usr//bin/xhpl"
+ install -D -m 0644 "${srcdir}/${pkgname}-${pkgver}/bin/mpicc/HPL.dat" "${pkgdir}/etc/hpl/HPL.dat"
+ install -D -m 0644 "${srcdir}/${pkgname}-${pkgver}/COPYRIGHT" "${pkgdir}/usr/share/licenses/hpl/LICENSE"
+}
diff --git a/hpl-2.1-arch.patch b/hpl-2.1-arch.patch
new file mode 100644
index 000000000000..130dad66fdbe
--- /dev/null
+++ b/hpl-2.1-arch.patch
@@ -0,0 +1,94 @@
+diff --git a/setup/Make.Linux_PII_CBLAS_gm b/setup/Make.Linux_PII_CBLAS_gm
+index b1c6401..997177b 100644
+--- a/setup/Make.Linux_PII_CBLAS_gm
++++ b/setup/Make.Linux_PII_CBLAS_gm
+@@ -56,6 +56,14 @@ LN_S = ln -s
+ MKDIR = mkdir
+ RM = /bin/rm -f
+ TOUCH = touch
++
++LBITS := $(shell getconf LONG_BIT)
++ifeq ($(LBITS),64)
++ SYSLIBDIR=/usr/lib64
++else
++ SYSLIBDIR=/usr/lib
++endif
++
+ #
+ # ----------------------------------------------------------------------
+ # - Platform identifier ------------------------------------------------
+@@ -92,9 +100,9 @@ MPlib =
+ # header files, LAlib is defined to be the name of the library to be
+ # used. The variable LAdir is only used for defining LAinc and LAlib.
+ #
+-LAdir = $(HOME)/netlib/ARCHIVES/Linux_PII
++LAdir = $(SYSLIBDIR)/
+ LAinc =
+-LAlib = $(LAdir)/libcblas.a $(LAdir)/libatlas.a
++LAlib = -L$(LAdir) -lcblas
+ #
+ # ----------------------------------------------------------------------
+ # - F77 / C interface --------------------------------------------------
+@@ -168,13 +176,13 @@
+ #
+ CC = mpicc
+ CCNOOPT = $(HPL_DEFS)
+-CCFLAGS = $(HPL_DEFS) -fomit-frame-pointer -O3 -funroll-loops -W -Wall
++CCFLAGS = $(HPL_DEFS) $(CFLAGS) -fomit-frame-pointer -O3 -funroll-loops -W -Wall
+ #
+ # On some platforms, it is necessary to use the Fortran linker to find
+ # the Fortran internals used in the BLAS library.
+ #
+ LINKER = mpif77
+-LINKFLAGS = $(CCFLAGS)
++LINKFLAGS = $(CCFLAGS) -Wl,--as-needed
+ #
+ ARCHIVER = ar
+ ARFLAGS = r
+diff --git a/testing/ptest/HPL_pdinfo.c b/testing/ptest/HPL_pdinfo.c
+index e24530e..fd1ec80 100644
+--- a/testing/ptest/HPL_pdinfo.c
++++ b/testing/ptest/HPL_pdinfo.c
+@@ -48,6 +48,8 @@
+ * Include files
+ */
+ #include "hpl.h"
++#include <stdlib.h>
++#include <string.h>
+
+ #ifdef STDC_HEADERS
+ void HPL_pdinfo
+@@ -275,6 +277,8 @@ void HPL_pdinfo
+ char * lineptr;
+ int error=0, fid, i, j, lwork, maxp, nprocs,
+ rank, size;
++ char * confdir = NULL;
++ char conffile[1024] = {0};
+ /* ..
+ * .. Executable Statements ..
+ */
+@@ -291,14 +295,22 @@ void HPL_pdinfo
+ */
+ if( rank == 0 )
+ {
++ if ( ( confdir = getenv("MPI_SYSCONFIG") ) == NULL )
++ strcpy(conffile, "/etc");
++ else
++ strncpy(conffile, confdir, 1023);
++
++ strncat(conffile, "/hpl/HPL.dat", 1023);
++
+ /*
+ * Open file and skip data file header
+ */
+- if( ( infp = fopen( "HPL.dat", "r" ) ) == NULL )
++ if( ( infp = fopen( "HPL.dat", "r" ) ) == NULL &&
++ ( infp = fopen( conffile, "r" ) ) == NULL )
+ {
+ HPL_pwarn( stderr, __LINE__, "HPL_pdinfo",
+ "cannot open file HPL.dat" );
+- error = 1; goto label_error;
++ exit( 1 );
+ }
+
+ (void) fgets( line, HPL_LINE_MAX - 2, infp );