Skip to content

Commit

Permalink
Release v1.2 (#274)
Browse files Browse the repository at this point in the history
* release v1.2

* remove debug script

* remove unnecessary changes

* remove cuda error check

* added init_mdj_constnt back
  • Loading branch information
wxj6000 authored Dec 9, 2024
1 parent 56f4378 commit 5811bb4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ Features
- MP2/DF-MP2 and CCSD (experimental);
- Polarizability, IR, and NMR shielding (experimental);
- QM/MM with PBC;
- CHELPG, ESP, and RESP atomic charge
- CHELPG, ESP, and RESP atomic charge;
- Multi-GPU for density fitting (experimental)

Limitations
--------
Expand Down Expand Up @@ -134,22 +135,22 @@ References
---------
```
@misc{li2024introducting,
title={Introducing GPU-acceleration into the Python-based Simulations of Chemistry Framework},
title={Introducing GPU-acceleration into the Python-based Simulations of Chemistry Framework},
author={Rui Li and Qiming Sun and Xing Zhang and Garnet Kin-Lic Chan},
year={2024},
eprint={2407.09700},
archivePrefix={arXiv},
primaryClass={physics.comp-ph},
url={https://arxiv.org/abs/2407.09700},
url={https://arxiv.org/abs/2407.09700},
}
@misc{wu2024enhancing,
title={Enhancing GPU-acceleration in the Python-based Simulations of Chemistry Framework},
title={Enhancing GPU-acceleration in the Python-based Simulations of Chemistry Framework},
author={Xiaojie Wu and Qiming Sun and Zhichen Pu and Tianze Zheng and Wenzhi Ma and Wen Yan and Xia Yu and Zhengxiao Wu and Mian Huo and Xiang Li and Weiluo Ren and Sheng Gong and Yumin Zhang and Weihao Gao},
year={2024},
eprint={2404.09452},
archivePrefix={arXiv},
primaryClass={physics.comp-ph},
url={https://arxiv.org/abs/2404.09452},
url={https://arxiv.org/abs/2404.09452},
}
```
2 changes: 1 addition & 1 deletion gpu4pyscf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '1.1.0'
__version__ = '1.2.0'

# monkey patch libxc reference due to a bug in nvcc
from pyscf.dft import libxc
Expand Down
3 changes: 3 additions & 0 deletions gpu4pyscf/lib/gvhf-md/unrolled_md_j.cu
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <stdio.h>
#include <cuda_runtime.h>
#include "gvhf-rys/vhf.cuh"
#include "gvhf-rys/gamma_inc_unrolled.cu"

Expand Down Expand Up @@ -5016,6 +5018,7 @@ int md_j_unrolled(RysIntEnvVars *envs, JKMatrix *jk, BoundsInfo *bounds,
dim3 threads(16, 16);
dim3 blocks;
int ijkl = lij*9 + lkl;

switch (ijkl) {
case 0: // lij=0, lkl=0
blocks.x = (bounds->npairs_ij + 255) / 256;
Expand Down
4 changes: 2 additions & 2 deletions gpu4pyscf/scf/j_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ def get_j(mol, dm, hermi=1, vhfopt=None, omega=None, verbose=None):
)

libvhf_md.init_mdj_constant(ctypes.c_int(SHM_SIZE))

uniq_l_ctr = vhfopt.uniq_l_ctr
uniq_l = uniq_l_ctr[:,0]
l_ctr_bas_loc = vhfopt.l_ctr_offsets
l_symb = [lib.param.ANGULAR[i] for i in uniq_l]
n_groups = len(uniq_l_ctr)
tile_mappings = {}
workers = gpu_specs['multiProcessorCount']

info = cp.empty(2, dtype=np.uint32)

for i in range(n_groups):
Expand Down Expand Up @@ -158,7 +158,7 @@ def get_j(mol, dm, hermi=1, vhfopt=None, omega=None, verbose=None):
mol._atm.ctypes, ctypes.c_int(mol.natm),
mol._bas.ctypes, ctypes.c_int(mol.nbas), _env.ctypes)
if err != 0:
raise RuntimeError(f'RYS_build_jk kernel for {llll} failed')
raise RuntimeError(f'MD_build_j kernel for {llll} failed')
if log.verbose >= logger.DEBUG1:
ntasks = tile_ij_mapping.size * tile_kl_mapping.size
t1, t1p = log.timer_debug1(f'processing {llll}, tasks ~= {ntasks}', *t1), t1
Expand Down
1 change: 1 addition & 0 deletions gpu4pyscf/scf/tests/test_scf_j_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ def test_j_engine():
ref = get_jk(mol, dm, with_k=False)[0]
assert abs(lib.fp(vj1) - -2327.4715195591784) < 1e-9
assert abs(vj1 - ref).max() < 1e-9

0 comments on commit 5811bb4

Please sign in to comment.