Skip to content

Commit

Permalink
In CI install MACE develop branch from github, and also update mkl
Browse files Browse the repository at this point in the history
installation to currently supported version
  • Loading branch information
bernstei committed Oct 17, 2023
1 parent 3e2e90a commit 22a0623
Showing 1 changed file with 33 additions and 8 deletions.
41 changes: 33 additions & 8 deletions .github/workflows/pytests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,32 @@ jobs:
- name: Install latest ASE from gitlab
run: pip install git+https://gitlab.com/ase/ase.git

- name: Install intel-mkl-full for phono3py
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list'
sudo apt-get update
sudo apt-get install intel-mkl-64bit-2018.2-046
- name: Install intel-oneapi-mkl for phono3py
run: |
# based on
# https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-download.html?operatingsystem=linux&distributions=aptpackagemanager
# download the key to system keyring
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
# add signed entry to apt sources and configure the APT client to use Intel repository:
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt update
sudo apt install intel-oneapi-mkl
sudo apt install intel-oneapi-mkl-devel
- name: Install phono3py from source
run: |
source /opt/intel/compilers_and_libraries_2018.2.199/linux/mkl/bin/mklvars.sh intel64
# find mklvars
for pkg in $( apt list --installed | fgrep "installed" | fgrep "mkl" | sed "s#/.*##" ); do
if dpkg -L $pkg | egrep -q 'vars.sh$'; then
mklvars=$( dpkg -L $pkg | egrep 'vars.sh$' )
break
fi
done
if [ -z $mklvars ]; then
echo 'Failed to find *vars.sh in any pkg named *mkl*'
exit 1
fi
source $mklvars intel64
git clone https://github.com/phonopy/phonopy
cd phonopy
Expand All @@ -71,6 +86,16 @@ jobs:
- name: Install Quippy from PyPI
run: pip install quippy-ase

- name: MACE
run: |
echo "search for torch version"
torch_version=$( pip3 install torch== 2>&1 | fgrep 'from versions' | sed -e 's/.* //' -e 's/)//' )
echo "found torch version $torch_version, installing cpu-only variant"
python3 -m pip install torch==${torch_version}+cpu -f https://download.pytorch.org/whl/torch_stable.html
echo "installing mace"
python3 -m pip install git+https://github.com/ACEsuit/mace.git@develop
python3 -c "import mace; print(mace.__file__)"
- name: Julia and ace fit
run: |
pip install pip install threadpoolctl
Expand Down

0 comments on commit 22a0623

Please sign in to comment.