From 4e4599ee1c334af1557cf2f09dfef2e0d337c1d8 Mon Sep 17 00:00:00 2001 From: Qiming Sun Date: Sat, 18 Nov 2023 14:16:46 -0800 Subject: [PATCH] Swith off sparsity algorithm for small system (issue #1956) --- pyscf/dft/numint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyscf/dft/numint.py b/pyscf/dft/numint.py index 9947ed5c30..0b3cfdc74c 100644 --- a/pyscf/dft/numint.py +++ b/pyscf/dft/numint.py @@ -2802,7 +2802,7 @@ def block_loop(self, mol, grids, nao=None, deriv=0, max_memory=2000, screen_index = non0tab # the xxx_sparse() functions require ngrids 8-byte aligned - allow_sparse = ngrids % ALIGNMENT_UNIT == 0 + allow_sparse = ngrids % ALIGNMENT_UNIT == 0 and nao > SWITCH_SIZE if buf is None: buf = _empty_aligned(comp * blksize * nao)