Skip to content

Commit

Permalink
fix clang compile; fix new scipy error
Browse files Browse the repository at this point in the history
  • Loading branch information
hczhai committed Jun 28, 2023
1 parent 484e738 commit 3ef5d9d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ jobs:
- name: run test (serial-pytest, linux)
if: matrix.parallel == 'serial-pytest' && matrix.os == 'ubuntu-20.04'
run: |
python -m pip install pytest 'pyscf==2.1.0'
python -m pip install pytest 'pyscf==2.1.0' 'scipy==1.10.1'
export PYTHONPATH=$(pwd)/build:$(pwd):${PYTHONPATH}
py.test -s pyblock2/unit_test/*.py
- name: run test (serial-pytest, macos)
if: matrix.parallel == 'serial-pytest' && matrix.os == 'macos-11'
run: |
python -m pip install pytest 'pyscf==2.0.1'
python -m pip install pytest 'pyscf==2.0.1' 'scipy==1.10.1'
export PYTHONPATH=$(pwd)/build:$(pwd):${PYTHONPATH}
py.test -s pyblock2/unit_test/*.py
Expand Down
13 changes: 7 additions & 6 deletions src/ic/wick.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ struct WickExpr {
int n_br = 0;
for (auto &wi : x.indices)
n_br += !gstr.count(wi);
if (has_br = (n_br > 0))
if ((has_br = (n_br > 0)))
break;
}
for (auto &term : terms) {
Expand Down Expand Up @@ -3423,6 +3423,7 @@ struct WickGraph {
if (uroots[i] == 0)
tt.push_back(i);
size_t tx = 0;
array<double, 4> empty = {};
auto fw = [&tscale, &uout, &inv_edges, &edges, &uroots,
&mscale](int a) -> array<double, 4> {
double rs = 0.0, rd = 0.0, rp = 0.0, rg = 0.0;
Expand Down Expand Up @@ -3493,7 +3494,7 @@ struct WickGraph {
int nsz = 0;
for (auto &wt : term.tensors)
nsz += wt.indices.size() != 0;
if (need_einsum = nsz > 2)
if ((need_einsum = nsz > 2))
break;
if (term.ctr_indices.size() == 0)
continue;
Expand All @@ -3502,14 +3503,14 @@ struct WickGraph {
for (auto &wi : wt.indices)
idx_cnt[wi]++;
for (auto &wi : idx_cnt)
if (need_einsum = (wi.second > 2 ||
(wi.second == 2 &&
!term.ctr_indices.count(wi.first))))
if ((need_einsum = (wi.second > 2 ||
(wi.second == 2 &&
!term.ctr_indices.count(wi.first)))))
break;
if (need_einsum)
break;
for (auto &wi : left_idx)
if (need_einsum = (idx_cnt.count(wi) != 1))
if ((need_einsum = (idx_cnt.count(wi) != 1)))
break;
if (need_einsum)
break;
Expand Down

0 comments on commit 3ef5d9d

Please sign in to comment.