Last active
February 22, 2021 07:01
-
-
Save massich/caa7d8806ac08282f93cea00f247b8e0 to your computer and use it in GitHub Desktop.
This script is used to install Intel MKL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script installs Intel's Math Kernel Library (MKL) on Travis (both Linux and Mac) | |
# | |
# In .travis.yml, add this: | |
# | |
# - curl -fsSkL https://gist.githubusercontent.com/massich/caa7d8806ac08282f93cea00f247b8e0/raw > install_mkl.sh && source ./install_mkl.sh | |
# | |
# Note: | |
# This script requires the openmeeg's travis tools from https://gist.github.com/massich/f382ec0181ce6603b38208f9dec3e4d4 | |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then | |
export MKL_INSTALL_DIR=$(pwd)/intel | |
export ARCH_FNAME=l_mkl_2018.0.128.tgz | |
travis_wait 30 download http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12070/${ARCH_FNAME} | |
tar -xzf $DL_DIR/${ARCH_FNAME} | |
cat l_mkl_2018.0.128/silent.cfg | grep -v EULA | grep -v PSET_INSTALL_DIR > silent.cfg | |
echo "ACCEPT_EULA=accept" >> silent.cfg | |
echo "PSET_INSTALL_DIR=${MKL_INSTALL_DIR}" >> silent.cfg | |
./l_mkl_2018.0.128/install.sh --user-mode -s ./silent.cfg | |
export LD_LIBRARY_PATH="${MKL_INSTALL_DIR}/mkl/lib/intel64/:${LD_LIBRARY_PATH}" | |
. ${MKL_INSTALL_DIR}/mkl/bin/mklvars.sh intel64 ilp64 | |
else # Mac | |
export MKL_INSTALL_DIR=/opt/intel | |
export ARCH_FNAME=m_mkl_2017.4.220.dmg | |
travis_wait 30 download http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12185/${ARCH_FNAME} | |
hdiutil attach $DL_DIR/${ARCH_FNAME} | |
cat /Volumes/m_mkl_2017.4.220/m_mkl_2017.4.220.app/Contents/MacOS/silent.cfg | grep -v EULA | grep -v PSET_INSTALL_DIR > silent.cfg | |
echo "ACCEPT_EULA=accept" >> silent.cfg | |
echo "PSET_INSTALL_DIR=${MKL_INSTALL_DIR}" >> silent.cfg | |
sudo /Volumes/m_mkl_2017.4.220/m_mkl_2017.4.220.app/Contents/MacOS/install.sh -s ./silent.cfg | |
. /opt/intel/mkl/bin/mklvars.sh intel64 ilp64 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment