Skip to content

Commit

Permalink
toolchain/OpenBLAS: import patch
Browse files Browse the repository at this point in the history
popular distros and HPC package managers (Spack) seem to use this, so we
probably want it too
  • Loading branch information
dev-zero authored and oschuett committed Nov 3, 2018
1 parent 88b9e0a commit dcd4bab
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
1 change: 1 addition & 0 deletions tools/toolchain/scripts/checksums.sha256
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ fa253dc26ddb661b6269df58144eff607ea3f76a9bcfe574b0c7726e1dfcb997 *valgrind-3.10.
5ef38b15d9c652985774869efd548b8e3e972e1e99475c673b25537ed7bcf394 *OpenBLAS-0.2.20.tar.gz
49d88f4494ae780e3d7fa51769c00d982d7cdb73e696054ac3baa81d42f13bab *OpenBLAS-0.3.3.tar.gz
f1b066a4481a50678caeb7656bf3e6764f45619686ac465f257c8017a2dc1ff0 *79ea839b635d1fd84b6ce8a47e086f01d64198e6.patch
a1102ee67d299568e167f72423f55cc0d1af615b6bce4e1ec5145f805951e48f *288aeea8a285da8551c465681c7b9330a5486e7e.patch
aad618d19e07c155955d3b72b14427a19ba78cba44e601a2fa770ae94d6e501a *plumed-2.2b.tgz
a1cf9eb1bfb1bd3467024e47173a6e85881c3908961b7bb29f3348af9837018b *libsmm_dnn_haswell-2015-11-10.a
83401053d5b7e95596c80b6699662b13c3e6853b6912ca8056183b23bcc2bf50 *libsmm_dnn_haswell-2015-07-02.a
Expand Down
29 changes: 21 additions & 8 deletions tools/toolchain/scripts/install_openblas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ with_openblas=${1:-__INSTALL__}
OPENBLAS_CFLAGS=''
OPENBLAS_LDFLAGS=''
OPENBLAS_LIBS=''
PATCHES=(
https://github.com/xianyi/OpenBLAS/commit/79ea839b635d1fd84b6ce8a47e086f01d64198e6.patch
https://github.com/xianyi/OpenBLAS/commit/288aeea8a285da8551c465681c7b9330a5486e7e.patch
)

! [ -d "${BUILDDIR}" ] && mkdir -p "${BUILDDIR}"
cd "${BUILDDIR}"
case "$with_openblas" in
Expand All @@ -32,18 +37,26 @@ case "$with_openblas" in
-o OpenBLAS-${openblas_ver}.tar.gz

fi
if [ -f 79ea839b635d1fd84b6ce8a47e086f01d64198e6.patch ] ; then
echo "79ea839b635d1fd84b6ce8a47e086f01d64198e6.patch is found"
else
# parallel build patch
download_pkg ${DOWNLOADER_FLAGS} \
"https://github.com/xianyi/OpenBLAS/commit/79ea839b635d1fd84b6ce8a47e086f01d64198e6.patch"
fi

for patch in "${PATCHES[@]}" ; do
fname="${patch##*/}"
if [ -f "${fname}" ] ; then
echo "${fname} is found"
else
# parallel build patch
download_pkg ${DOWNLOADER_FLAGS} "${patch}"
fi
done

echo "Installing from scratch into ${pkg_install_dir}"
[ -d OpenBLAS-${openblas_ver} ] && rm -rf OpenBLAS-${openblas_ver}
tar -zxf OpenBLAS-${openblas_ver}.tar.gz
cd OpenBLAS-${openblas_ver}
patch -p1 < ../79ea839b635d1fd84b6ce8a47e086f01d64198e6.patch

for patch in "${PATCHES[@]}" ; do
patch -p1 < ../"${patch##*/}"
done

# First attempt to make openblas using auto detected
# TARGET, if this fails, then make with forced
# TARGET=NEHALEM
Expand Down

0 comments on commit dcd4bab

Please sign in to comment.