From 80d56dc7675e5d865bf16210a45178e4da43c5b8 Mon Sep 17 00:00:00 2001 From: Tong Lianheng Date: Tue, 22 Mar 2016 12:45:37 +0000 Subject: [PATCH] Hans Pabst's update on installer for libxsmm. Version 1.3 is now the default, an -o option is added to downloader command in toolkit, and PRECISION=2 option has been added so that only double precision kernels are generated, halving build time as well as size of the library svn-origin-rev: 16724 --- tools/toolchain/scripts/checksums.sha256 | 2 + tools/toolchain/scripts/install_libxsmm.sh | 42 +-------------------- tools/toolchain/scripts/package_versions.sh | 2 +- tools/toolchain/scripts/tool_kit.sh | 8 +++- 4 files changed, 11 insertions(+), 43 deletions(-) diff --git a/tools/toolchain/scripts/checksums.sha256 b/tools/toolchain/scripts/checksums.sha256 index 5a75bcba0f..461413016f 100644 --- a/tools/toolchain/scripts/checksums.sha256 +++ b/tools/toolchain/scripts/checksums.sha256 @@ -37,6 +37,8 @@ cc7e8c6623055fc6bc032dfda2d08b2201a8d86577ab72c3f66bee9b86cbebe9 *libsmm_dnn_neh dd58aee2bc5505e23b0761835bf2b9a90e5f050c6708ef68c5028373970673f8 *libsmm_dnn_x86_64-2015-07-02.a 167bdc76b44b7961871ea5973ffc545035d44f577152c4a9ab8d2be795ce27d1 *openmpi-1.8.6.tar.gz 864d46f1e95084e44c8493729531974de2ee647c156a0a9bd965ce1747161eb1 *libxsmm-1.1.tar.gz +6fe23cebc25df93fe6997daf9be2072c126aab2bfc32a9dde946b448d2d1c49e *libxsmm-1.2.tar.gz +f7abd2f96bdba6d6182954f359e8bde87b2d56392d5e9ac3236210b8fa77face *libxsmm-1.3.tar.gz 0778679a6b693d7b7caff37ff9d2856dc2bfc51318bf8373859bfa74253da3dc *mpich-3.2.tar.gz # GNU (external) packages diff --git a/tools/toolchain/scripts/install_libxsmm.sh b/tools/toolchain/scripts/install_libxsmm.sh index 0299d79d0b..1e8355e2c9 100755 --- a/tools/toolchain/scripts/install_libxsmm.sh +++ b/tools/toolchain/scripts/install_libxsmm.sh @@ -45,36 +45,6 @@ EOF fi fi echo "Installing from scratch into ${pkg_install_dir}" - # choose which math library should libxsmm use as a - # fall-back option, currently libxsmm make supports - # openblas, mkl or system lapack. We will just use - # reflapack in place of the system lapack here. - case $FAST_MATH_MODE in - openblas) - require_env OPENBLAS_LDFLAGS - openblas_flag=1 - mkl_flag=0 - # find possible openblas lib and record its suffix if exists - blas_threads="$(find_in_paths "libopenblas*.*" $LIB_PATHS)" - blas_threads="${blas_threads#*libopenblas}" - blas_threads="${blas_threads%%.*}" - ;; - mkl) - # mkl exists if MKLROOT is set, and libxsmm make - # only recognizes MKLROOT - require_env MKLROOT - mkl_flag=1 - openblas_flag=0 - ;; - *) - # check reflapack. reflapack exists if - # REFLAPACK_LDFLAGS is set - require_env REFLAPACK_LDFLAGS - openblas_flag=0 - mkl_flag=0 - blas_threads='' - ;; - esac # note that we do not have to set -L flags to ld for the # linked math libraries for the libxsmm build, as for a # library this is not required, you just have to provide @@ -89,12 +59,8 @@ EOF CC=$CC \ FC=$FC \ MNK="1 4 5 6 8 9 13 16 17 22 23 24 26 32" \ - SSE=1 \ - JIT=1 \ PREFETCH=1 \ - MKL=${mkl_flag} \ - OPENBLAS=${openblas_flag} \ - BLAS_THREADS=${blas_threads} \ + PRECISION=2 \ PREFIX=${pkg_install_dir} \ > make.log 2>&1 make -j $NPROCS \ @@ -102,12 +68,8 @@ EOF CC=$CC \ FC=$FC \ MNK="1 4 5 6 8 9 13 16 17 22 23 24 26 32" \ - SSE=1 \ - JIT=1 \ PREFETCH=1 \ - MKL=${mkl_flag} \ - OPENBLAS=${openblas_flag} \ - BLAS_THREADS=${blas_threads} \ + PRECISION=2 \ PREFIX=${pkg_install_dir} \ install > install.log 2>&1 cd .. diff --git a/tools/toolchain/scripts/package_versions.sh b/tools/toolchain/scripts/package_versions.sh index 61155712a0..aff62d2fab 100644 --- a/tools/toolchain/scripts/package_versions.sh +++ b/tools/toolchain/scripts/package_versions.sh @@ -21,5 +21,5 @@ scalapack_ver=${scalapack_ver:-2.0.2} scotch_ver=${scotch_ver:-6.0.0} superlu_ver=${superlu_ver:-3.3} valgrind_ver=${valgrind_ver:-3.11.0} -libxsmm_ver=${libxsmm_ver:-1.1} +libxsmm_ver=${libxsmm_ver:-1.3} make_ver=${make_ver:-4.1} diff --git a/tools/toolchain/scripts/tool_kit.sh b/tools/toolchain/scripts/tool_kit.sh index b1d8b8045d..d10289b114 100644 --- a/tools/toolchain/scripts/tool_kit.sh +++ b/tools/toolchain/scripts/tool_kit.sh @@ -548,15 +548,17 @@ download_pkg_no_checksum() { download_pkg() { # usage: download_pkg [-n] [-o output_filename] url local __wget_flags='' + local __filename='' local __url='' while [ $# -ge 1 ] ; do case "$1" in -n) - local __wget_flags="$__wget_flags --no-check-certificate" + __wget_flags="$__wget_flags --no-check-certificate" ;; -o) shift __wget_flags="$__wget_flags -O $1" + __filename="$1" ;; *) __url="$1" @@ -564,7 +566,9 @@ download_pkg() { esac shift done - local __filename="$(basename $__url)" + if [ "$__filename" = "" ] ; then + __filename="$(basename $__url)" + fi # env variable for checksum file must be provided require_env SHA256_CHECKSUMS # download