Skip to content

Commit

Permalink
Test python3.8 solvent tdscf grad
Browse files Browse the repository at this point in the history
  • Loading branch information
sunqm committed Sep 19, 2023
1 parent 4c0998d commit 8050331
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 56 deletions.
105 changes: 53 additions & 52 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
#python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -40,54 +41,54 @@ jobs:
with:
token: ${{secrets.CODECOV_TOKEN}}

linux-build-aarch64:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
pyver: [cp37-cp37m, cp38-cp38, cp39-cp39]
env:
img: quay.io/pypa/manylinux2014_aarch64
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
- name: Build Wheel
run: |
docker run --rm -v ${{ github.workspace }}:/src/pyscf:rw --workdir=/src/pyscf ${{ env.img }} \
bash -exc '/opt/python/${{ matrix.pyver }}/bin/pip install --upgrade pip setuptools && \
/opt/python/${{ matrix.pyver }}/bin/pip install "numpy!=1.16,!=1.17" "scipy!=1.5" h5py pytest pytest-cov pytest-timer pyberny geometric && \
yum install -y epel-release && \
yum-config-manager --enable epel && \
yum install -y openblas-devel gcc cmake curl && \
cd ./pyscf/lib && curl -o deps.tar.gz -L "https://github.com/pyscf/pyscf-build-deps/blob/master/pyscf-2.2-aarch64-deps.tar.gz?raw=true" && \
tar xzf deps.tar.gz && \
mkdir build && cd build && \
cmake -DBUILD_LIBXC=OFF -DBUILD_XCFUN=OFF -DBUILD_LIBCINT=OFF .. && \
make -j2 && cd .. && rm -Rf build && cd ../.. && \
export OMP_NUM_THREADS=1 && export PYTHONPATH=$(pwd):$PYTHONPATH && \
echo 'pbc_tools_pbc_fft_engine = "NUMPY"' > .pyscf_conf.py && \
echo "dftd3_DFTD3PATH = './pyscf/lib/deps/lib'" >> .pyscf_conf.py && \
echo "scf_hf_SCF_mute_chkfile = True" >> .pyscf_conf.py && \
ulimit -s 20000 && /opt/python/${{ matrix.pyver }}/bin/pytest pyscf/ --ignore=pyscf/adc --ignore=pyscf/pbc/df --ignore=pyscf/pbc/cc -s -c setup.cfg --cov-report xml --cov-report term --cov-config .coveragerc --cov pyscf'
macos-build:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install and Test
run: ./.github/workflows/run_ci.sh
- name: Upload to codecov
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
# linux-build-aarch64:
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# os: [ubuntu-20.04]
# pyver: [cp37-cp37m, cp38-cp38, cp39-cp39]
# env:
# img: quay.io/pypa/manylinux2014_aarch64
# steps:
# - uses: actions/checkout@v3
# - name: Set up QEMU
# id: qemu
# uses: docker/setup-qemu-action@v2
# - name: Build Wheel
# run: |
# docker run --rm -v ${{ github.workspace }}:/src/pyscf:rw --workdir=/src/pyscf ${{ env.img }} \
# bash -exc '/opt/python/${{ matrix.pyver }}/bin/pip install --upgrade pip setuptools && \
# /opt/python/${{ matrix.pyver }}/bin/pip install "numpy!=1.16,!=1.17" "scipy!=1.5" h5py pytest pytest-cov pytest-timer pyberny geometric && \
# yum install -y epel-release && \
# yum-config-manager --enable epel && \
# yum install -y openblas-devel gcc cmake curl && \
# cd ./pyscf/lib && curl -o deps.tar.gz -L "https://github.com/pyscf/pyscf-build-deps/blob/master/pyscf-2.2-aarch64-deps.tar.gz?raw=true" && \
# tar xzf deps.tar.gz && \
# mkdir build && cd build && \
# cmake -DBUILD_LIBXC=OFF -DBUILD_XCFUN=OFF -DBUILD_LIBCINT=OFF .. && \
# make -j2 && cd .. && rm -Rf build && cd ../.. && \
# export OMP_NUM_THREADS=1 && export PYTHONPATH=$(pwd):$PYTHONPATH && \
# echo 'pbc_tools_pbc_fft_engine = "NUMPY"' > .pyscf_conf.py && \
# echo "dftd3_DFTD3PATH = './pyscf/lib/deps/lib'" >> .pyscf_conf.py && \
# echo "scf_hf_SCF_mute_chkfile = True" >> .pyscf_conf.py && \
# ulimit -s 20000 && /opt/python/${{ matrix.pyver }}/bin/pytest pyscf/ --ignore=pyscf/adc --ignore=pyscf/pbc/df --ignore=pyscf/pbc/cc -s -c setup.cfg --cov-report xml --cov-report term --cov-config .coveragerc --cov pyscf'
#
# macos-build:
# runs-on: macos-latest
# strategy:
# fail-fast: false
# matrix:
# python-version: ["3.7"]
# steps:
# - uses: actions/checkout@v3
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install and Test
# run: ./.github/workflows/run_ci.sh
# - name: Upload to codecov
# uses: codecov/[email protected]
# with:
# token: ${{secrets.CODECOV_TOKEN}}
2 changes: 1 addition & 1 deletion .github/workflows/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ echo 'pbc_tools_pbc_fft_engine = "NUMPY"' > .pyscf_conf.py
echo "dftd3_DFTD3PATH = './pyscf/lib/deps/lib'" >> .pyscf_conf.py
echo "scf_hf_SCF_mute_chkfile = True" >> .pyscf_conf.py

pytest pyscf/ -s -c setup.cfg \
pytest pyscf/solvent/ -s -c setup.cfg \
--cov-report xml --cov-report term --cov-config .coveragerc --cov pyscf
6 changes: 3 additions & 3 deletions pyscf/solvent/test/test_ddcosmo_tdscf_grad.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

def setUpModule():
global mol0, mol1, mol2
mol0 = gto.M(atom='H 0. 0. 1.804; F 0. 0. 0.', verbose=0, unit='B')
mol1 = gto.M(atom='H 0. 0. 1.803; F 0. 0. 0.', verbose=0, unit='B')
mol2 = gto.M(atom='H 0. 0. 1.805; F 0. 0. 0.', verbose=0, unit='B')
mol0 = gto.M(atom='H 0. 0. 1.804; F 0. 0. 0.', verbose=0, unit='B', verbose=5)
mol1 = gto.M(atom='H 0. 0. 1.803; F 0. 0. 0.', verbose=0, unit='B', verbose=5)
mol2 = gto.M(atom='H 0. 0. 1.805; F 0. 0. 0.', verbose=0, unit='B', verbose=5)

def tearDownModule():
global mol0, mol1, mol2
Expand Down

0 comments on commit 8050331

Please sign in to comment.