Skip to content

Commit 5811bb4

Browse files
authored
Release v1.2 (#274)
* release v1.2 * remove debug script * remove unnecessary changes * remove cuda error check * added init_mdj_constnt back
1 parent 56f4378 commit 5811bb4

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ Features
5353
- MP2/DF-MP2 and CCSD (experimental);
5454
- Polarizability, IR, and NMR shielding (experimental);
5555
- QM/MM with PBC;
56-
- CHELPG, ESP, and RESP atomic charge
56+
- CHELPG, ESP, and RESP atomic charge;
57+
- Multi-GPU for density fitting (experimental)
5758

5859
Limitations
5960
--------
@@ -134,22 +135,22 @@ References
134135
---------
135136
```
136137
@misc{li2024introducting,
137-
title={Introducing GPU-acceleration into the Python-based Simulations of Chemistry Framework},
138+
title={Introducing GPU-acceleration into the Python-based Simulations of Chemistry Framework},
138139
author={Rui Li and Qiming Sun and Xing Zhang and Garnet Kin-Lic Chan},
139140
year={2024},
140141
eprint={2407.09700},
141142
archivePrefix={arXiv},
142143
primaryClass={physics.comp-ph},
143-
url={https://arxiv.org/abs/2407.09700},
144+
url={https://arxiv.org/abs/2407.09700},
144145
}
145146
146147
@misc{wu2024enhancing,
147-
title={Enhancing GPU-acceleration in the Python-based Simulations of Chemistry Framework},
148+
title={Enhancing GPU-acceleration in the Python-based Simulations of Chemistry Framework},
148149
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},
149150
year={2024},
150151
eprint={2404.09452},
151152
archivePrefix={arXiv},
152153
primaryClass={physics.comp-ph},
153-
url={https://arxiv.org/abs/2404.09452},
154+
url={https://arxiv.org/abs/2404.09452},
154155
}
155156
```

gpu4pyscf/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '1.1.0'
1+
__version__ = '1.2.0'
22

33
# monkey patch libxc reference due to a bug in nvcc
44
from pyscf.dft import libxc

gpu4pyscf/lib/gvhf-md/unrolled_md_j.cu

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include <stdio.h>
2+
#include <cuda_runtime.h>
13
#include "gvhf-rys/vhf.cuh"
24
#include "gvhf-rys/gamma_inc_unrolled.cu"
35

@@ -5016,6 +5018,7 @@ int md_j_unrolled(RysIntEnvVars *envs, JKMatrix *jk, BoundsInfo *bounds,
50165018
dim3 threads(16, 16);
50175019
dim3 blocks;
50185020
int ijkl = lij*9 + lkl;
5021+
50195022
switch (ijkl) {
50205023
case 0: // lij=0, lkl=0
50215024
blocks.x = (bounds->npairs_ij + 255) / 256;

gpu4pyscf/scf/j_engine.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ def get_j(mol, dm, hermi=1, vhfopt=None, omega=None, verbose=None):
9797
)
9898

9999
libvhf_md.init_mdj_constant(ctypes.c_int(SHM_SIZE))
100-
101100
uniq_l_ctr = vhfopt.uniq_l_ctr
102101
uniq_l = uniq_l_ctr[:,0]
103102
l_ctr_bas_loc = vhfopt.l_ctr_offsets
104103
l_symb = [lib.param.ANGULAR[i] for i in uniq_l]
105104
n_groups = len(uniq_l_ctr)
106105
tile_mappings = {}
107106
workers = gpu_specs['multiProcessorCount']
107+
108108
info = cp.empty(2, dtype=np.uint32)
109109

110110
for i in range(n_groups):
@@ -158,7 +158,7 @@ def get_j(mol, dm, hermi=1, vhfopt=None, omega=None, verbose=None):
158158
mol._atm.ctypes, ctypes.c_int(mol.natm),
159159
mol._bas.ctypes, ctypes.c_int(mol.nbas), _env.ctypes)
160160
if err != 0:
161-
raise RuntimeError(f'RYS_build_jk kernel for {llll} failed')
161+
raise RuntimeError(f'MD_build_j kernel for {llll} failed')
162162
if log.verbose >= logger.DEBUG1:
163163
ntasks = tile_ij_mapping.size * tile_kl_mapping.size
164164
t1, t1p = log.timer_debug1(f'processing {llll}, tasks ~= {ntasks}', *t1), t1

gpu4pyscf/scf/tests/test_scf_j_engine.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ def test_j_engine():
4343
ref = get_jk(mol, dm, with_k=False)[0]
4444
assert abs(lib.fp(vj1) - -2327.4715195591784) < 1e-9
4545
assert abs(vj1 - ref).max() < 1e-9
46+

0 commit comments

Comments
 (0)