CCSD with frozen core crahes
Open
Nobody has claimed this yet.
- Dominant language
- Cuda
- Stars
- 351
- Forks
- 84
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 35
Description
I am trying to run frozen core CCSD with GPU4PySCF and getting axis dimension mismatch.
Code snippet:
from gpu4pyscf.cc import ccsd_incore as cc_gpu
mf = scf.RHF(mol).to_gpu()
mf.kernel()
mycc_gpu_fc = cc_gpu.CCSD(mf)
mycc_gpu_fc.set_frozen()
mycc_gpu_fc.kernel()
Error trace:
Traceback (most recent call last):
File "test_fc_ccsd.py", line 35, in <module>
test_gpu(mol)
File "test_fc_ccsd.py", line 21, in test_gpu
mycc_gpu_fc.kernel()
File ".venv/lib/python3.12/site-packages/pyscf/cc/ccsd.py", line 1084, in kernel
return self.ccsd(t1, t2, eris)
^^^^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.12/site-packages/pyscf/cc/ccsd.py", line 1099, in ccsd
kernel(self, eris, t1, t2, max_cycle=self.max_cycle,
File ".venv/lib/python3.12/site-packages/pyscf/cc/ccsd.py", line 71, in kernel
t1new, t2new = mycc.update_amps(t1, t2, eris)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.12/site-packages/gpu4pyscf/cc/ccsd_incore.py", line 55, in update_amps
wpq, t1new, t2new, wVOov, wVooV = _direct_ovvv_vvvv(mycc, t1, t2)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.12/site-packages/gpu4pyscf/cc/ccsd_incore.py", line 182, in _direct_ovvv_vvvv
t1po = orbv.dot(cupy.asarray(t1).T)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "cupy/_core/core.pyx", line 1810, in cupy._core.core._ndarray_base.dot
File "cupy/_core/_routines_linalg.pyx", line 510, in cupy._core._routines_linalg.dot
ValueError: Axis dimension mismatch
See file for a quick test: test_fc_ccsd.py
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the attached test_fc_ccsd.py reproduction and trace execution through gpu4pyscf/cc/ccsd_incore.py, especially update_amps and _direct_ovvv_vvvv. Compare the frozen-core path with the reported Cupy dot operation; the work is done when the frozen-core CCSD kernel completes without the axis dimension mismatch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- hpc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100