Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'pyscf.pbc.df.ft_ao' has no attribute '_ft_aopair_kpts' #19

Open
ducryf opened this issue Jun 10, 2021 · 1 comment

Comments

@ducryf
Copy link

ducryf commented Jun 10, 2021

Hi

I have installed pyscf and mpifpyscf with conda. Now I am trying to run the example file 01-parallel_krhf.py as instructed in the header with OMP_NUM_THREADS=4 mpirun -np 4 python 01-parallel_krhf.py

First of all, I had to explicitly set the cell dimensions and positions with
cell.atom = 'C 0.0 0.0 0.0; C 0.8917 0.8917 0.8917; ...
cell.a = '6.740275141 0 0; 0 6.740275141 0; 0 0 6.740275141'
otherwise the simulation would crash because of an empty numpy array.

Even then the simulation crashes in mf.scf() with the following traceback:

Traceback (most recent call last):
File "01-parallel_krhf.py", line 49, in
print(mf.scf())
File "[...]/anaconda3/envs/qt/lib/python3.8/site-packages/pyscf/scf/hf.py", line 1648, in scf
kernel(self, self.conv_tol, self.conv_tol_grad,
File "[...]/anaconda3/envs/qt/lib/python3.8/site-packages/pyscf/scf/hf.py", line 127, in kernel
vhf = mf.get_veff(mol, dm)
File "[...]/anaconda3/envs/qt/lib/python3.8/site-packages/pyscf/pbc/scf/khf.py", line 649, in get_veff
vj, vk = self.get_jk(cell, dm_kpts, hermi, kpts, kpts_band)
File "[...]/anaconda3/envs/qt/lib/python3.8/site-packages/pyscf/pbc/scf/khf.py", line 631, in get_jk
vj, vk = self.with_df.get_jk(dm_kpts, hermi, kpts, kpts_band,
File "[...]/anaconda3/envs/qt/lib/python3.8/site-packages/mpi4pyscf/pbc/df/df.py", line 545, in get_jk
vk = mpi_df_jk.get_k_kpts(self, dm, hermi, kpts, kpts_band, exxdiv)
File "[...]/anaconda3/envs/qt/lib/python3.8/site-packages/mpi4pyscf/tools/mpi.py", line 604, in with_mpi
return pool.apply(_distribute_call, (None, f, dev, args, kwargs),
File "[...]/anaconda3/envs/qt/lib/python3.8/site-packages/mpi4pyscf/tools/mpi_pool.py", line 141, in apply
result = function(*master_args)
File "[...]/anaconda3/envs/qt/lib/python3.8/site-packages/mpi4pyscf/tools/mpi.py", line 584, in _distribute_call
return fn(dev, *args, **kwargs)
File "[...]/anaconda3/envs/qt/lib/python3.8/site-packages/mpi4pyscf/pbc/df/df_jk.py", line 63, in get_k_kpts
vk = df_jk.get_k_kpts(mydf, dm_kpts, hermi, kpts, kpts_band, exxdiv)
File "[...]/anaconda3/envs/qt/lib/python3.8/site-packages/pyscf/pbc/df/df_jk.py", line 162, in get_k_kpts
mydf.build(kpts_band=kpts_band)
File "[...]/anaconda3/envs/qt/lib/python3.8/site-packages/mpi4pyscf/tools/mpi.py", line 602, in with_mpi
return f(dev, *args, **kwargs)
File "[...]/anaconda3/envs/qt/lib/python3.8/site-packages/mpi4pyscf/pbc/df/df.py", line 86, in build
mydf._make_j3c(cell, mydf.auxcell, kptij_lst, cderi)
File "[...]/anaconda3/envs/qt/lib/python3.8/site-packages/mpi4pyscf/pbc/df/df.py", line 346, in _make_j3c
_assemble(mydf, kptij_lst, j3c_jobs, gen_int3c, ft_fuse, cderi_file, fswap, log)
File "[...]/anaconda3/envs/qt/lib/python3.8/site-packages/mpi4pyscf/pbc/df/df.py", line 367, in _assemble
ft_fuse(job_id, k, ish0, ish1)
File "[...]/anaconda3/envs/qt/lib/python3.8/site-packages/mpi4pyscf/pbc/df/df.py", line 313, in ft_fuse
dat = ft_ao._ft_aopair_kpts(cell, Gv[p0:p1], shls_slice, aosym, b,
AttributeError: module 'pyscf.pbc.df.ft_ao' has no attribute '_ft_aopair_kpts'

How can I fix this issue?
Is mpi4pyscf supposed to run with pyscf 1.7 or do I have to revert to an earlier version?

Thanks in advance

@dsloanm-epcc
Copy link

I see this same error running 01-parallel_hf.py with pyscf 2.0.1 and the current mpi4pyscf master. Downgrading to pyscf 1.7.5 works around it.

It looks like the problem is _ft_aopair_kpts was renamed to ft_aopair_kpts in this commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants