Skip to content

Conversation

@DerkKooi
Copy link

@DerkKooi DerkKooi commented Dec 17, 2024

numint.py contains the line

blksize = min(blksize, MIN_BLK_SIZE)

Now either min or MIN here should be replaced by max/MAX to make this correct. My suggestion is that it should be blksize = max(blksize, MIN_BLK_SIZE) as right now the behavior is such that that much too small block sizes are selected for small systems. On the other hand, a minimum block size seems like it would run out of memory for larger systems (?).

@DerkKooi
Copy link
Author

CC: @awvwgk @tvogels @jhrmnn

@wxj6000
Copy link
Contributor

wxj6000 commented Dec 17, 2024

Hi @DerkKooi, thank you for opening the discussion.

When your device has less than 16 GB memory, the default MIN_BLKSIZE is 4096 which is pretty small. We probably can use MIN_BLKSIZE = 16384 for better performance. But the configurations of those devices can be very diverse, MIN_BLKSIZE = 4096 is just for safety.

MIN_BLKSIZE is for the sparsity of AO on grids. Smaller blksize benefits the sparsity of atomic orbitals on grids, therefore improves the performance.
On the other hand, the values of atomic orbitals on grids should fit in the memory. Based on these two constraints, we set blksize = min(blksize, MIN_BLK_SIZE).

Can you provide your device info? And how the block sizes are selected for a small system?

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

Successfully merging this pull request may close these issues.

2 participants