OrderN / CONQUEST-release

Full public release of large scale and linear scaling DFT code CONQUEST
http://www.order-n.org/
MIT License
94 stars 24 forks source link

Extract inner cri calc into separate subroutine #349

Open connoraird opened 1 week ago

connoraird commented 1 week ago

I believe the code within the do nsf2 = 1, jb%nsup loop of m_kern_exx_cri and m_kern_exx_eri is almost identical. Therefore, we should be able to extract this into a subroutine and therefore get the gain of using BLAS and any other optimisation in one place.

The current issue is that in m_ker_exx_eri there is an option to backup_eris. If true, this contiguously accesses a 1D array via eris(kpart)%store_eris(count). With the new OpenMP thread implementation we no longer access these elements in this order.