Added that gets Polymath and OpenBLAS

This commit is contained in:
Samer Afach 2017-01-13 08:43:58 +01:00
parent 904cdf2b5a
commit 3e15dfb2a4
1 changed files with 45 additions and 0 deletions

45 Normal file
View File

@ -0,0 +1,45 @@
rm -rf 3rdparty
mkdir -p 3rdparty/Polymath
git clone 3rdparty/Polymath
if [ $? -ne 0 ]; then
echo 'Polymath repository cloning failed.'
exit 1
read -p "Would you like to get OpenBLAS, compile it, or should I expect it to be already in your system? [y/n]: " -n 1 -r
echo "Notice that a compiled version of OpenBLAS is faster because it will be accustomed for your CPU."
if [[ $REPLY =~ ^[Nn]$ ]]
echo "Skipped getting OpenBLAS..."
exit 0
mkdir -p 3rdparty/OpenBLAS
git clone 3rdparty/OpenBLAS
if [ $? -ne 0 ]; then
echo 'Cloning OpenBLAS failed.'
exit 1
cd 3rdparty/OpenBLAS
make -j $(nproc)
if [ $? -ne 0 ]; then
echo 'Building OpenBLAS failed.'
exit 1
#replace ln -fs with cp, to avoid linking problems with ntfs file systems
#sed -i 's/ln -fs/cp/g' Makefile
#sed -i 's/ln -fs/cp/g' Makefile.install
make PREFIX=${start_dir}/spintrum/OpenBLAS_install install
if [ $? -ne 0 ]; then
echo 'OpenBLAS installation failed.'
exit 1
cd ${start_dir}